//_____________________________________________________________________________ // description of PES data block for STNTUPLE (P.Murat) // ---------------------------------------------------- // keep in mind that PES numbering scheme has a non-trivial feature // (see cdf-415, table 35): // side: west=0, east=1 // wedge: 0:7 // layer: 0:1 // strip: 1-200 (and this is really nice!) //_____________________________________________________________________________ #include ClassImp(TPesDataBlock) //______________________________________________________________________________ void TPesDataBlock::Streamer(TBuffer &R__b) { // Stream an object of class TPesDataBlock. if (R__b.IsReading()) { Version_t R__v = R__b.ReadVersion(); if (R__v) { } R__b.ReadFastArray((Short_t*) fNStrips,2*8*2); for (int is=0; is<2; is++) { for (int iw=0; iw<8; iw++) { for (int il=0; il<2; il++) { if (fNStrips[is][iw][il] > 0) { R__b.ReadFastArray(fAdcCounts[is][iw][il],200); } } } } } else { R__b.WriteVersion(TPesDataBlock::IsA()); R__b.WriteFastArray((Short_t*) fNStrips,2*8*2); for (int is=0; is<2; is++) { for (int iw=0; iw<8; iw++) { for (int il=0; il<2; il++) { if (fNStrips[is][iw][il] > 0) { R__b.WriteFastArray(fAdcCounts[is][iw][il],200); } } } } } } //_____________________________________________________________________________ TPesDataBlock::TPesDataBlock() { Clear(); } //_____________________________________________________________________________ TPesDataBlock::~TPesDataBlock() { } //_____________________________________________________________________________ void TPesDataBlock::Clear(Option_t* opt) { memset(fNStrips ,0,2*8*2*sizeof(Short_t)); memset(fAdcCounts,0,2*8*2*200*sizeof(Short_t)); } //_____________________________________________________________________________ void TPesDataBlock::Print(Option_t* opt) const { for (int side=0; side<2; side++) { for (int iw=0; iw<8; iw++) { printf(" side, wedge, ns[0], ns[1]: %3i %3i %3i %3i \n", side, iw, fNStrips[side][iw][0],fNStrips[side][iw][1]); } } }