/////////////////////////////////////////////////////////////////////////////// // plain copy of TCMD bank /////////////////////////////////////////////////////////////////////////////// #ifndef STNTUPLE_OBJ_TTcmd_hh #define STNTUPLE_OBJ_TTcmd_hh #include "TObject.h" #include "TMath.h" #include "Stntuple/base/TStnArrayI.hh" #include "CalorGeometry/CalConstants.hh" #include "CalorGeometry/CalParameters.hh" class TTcmd { //------------------------------------------------------------------------------ // data members - this is initial version, not bitmap for modules yet //------------------------------------------------------------------------------ protected: TStnArrayI fData; //------------------------------------------------------------------------------ // functions //------------------------------------------------------------------------------ public: // ****** constructors and destructor TTcmd(); virtual ~TTcmd(); // ****** init methods Int_t Init(Int_t NWords); // ****** accessors TStnArrayI* Data () { return &fData; } // Matchbox data have 36 words per card. There are 12 cards for 12 wedges. // 0: bank number // 1: bank version // 2: number of cards = 12 // 3: pointer to card 0 // 14: pointer to card 11 // 15: pointer to end of block // 16-51: first Matchbox data // 412-447: last Matchbox data Int_t MatchBox(Int_t card, Int_t word) { return fData.At(16 + card*36 + word); } // Prematch data have 18 words per card. There are 4 cards for 4 walls. // 448: number of cards = 4 // 449: pointer to card 0 // 452: pointer to card 3 // 453: pointer to end of block // 454-471: first prematch data // 508-525: last prematch data Int_t PreMatch(Int_t card, Int_t word) { return fData.At(454 + card*18 + word); } // MTSC data have 3 words altogether. // 526: number of cards = 1 // 527: pointer to card 0 // 528: pointer to end of block // 529: MTSC header word // 530: trigger output bit 00-19 // 531: trigger output bit 20-39 Int_t MTSC(Int_t word) { return fData.At(529 + word); } void Print(Option_t* opt = "") const ; ClassDef(TTcmd,1) }; #endif