00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef StTriggerData2008_hh
00033 #define StTriggerData2008_hh
00034
00035 #include "StTriggerData.h"
00036 #include "StDaqLib/TRG/trgStructures2008.h"
00037
00038 class StTriggerData2008 : public StTriggerData {
00039 public:
00040 StTriggerData2008();
00041 StTriggerData2008(const TrgDataType2008*, int run);
00042 ~StTriggerData2008();
00043
00044 void dump() const;
00045
00046
00047 unsigned int version() const;
00048 unsigned int numberOfPreXing() const;
00049 unsigned int numberOfPostXing() const;
00050
00051
00052 unsigned int token() const;
00053 unsigned int triggerWord() const;
00054 unsigned int actionWord() const;
00055 unsigned short busyStatus() const;
00056 unsigned short dsmInput() const;
00057 unsigned short trgToken() const;
00058 unsigned short dsmAddress() const;
00059 unsigned short mAddBits() const;
00060 unsigned short bcData(int channel) const;
00061
00062
00063 int L2ResultsOffset(StL2AlgorithmId id) const;
00064 bool isL2Triggered(StL2TriggerResultType id) const;
00065
00066
00067 unsigned int bunchCounterHigh() const;
00068 unsigned int bunchCounterLow() const;
00069 unsigned int bunchId48Bit() const;
00070 unsigned int bunchId7Bit() const;
00071 unsigned int spinBit() const;
00072 unsigned int spinBitYellowFilled() const;
00073 unsigned int spinBitYellowUp() const;
00074 unsigned int spinBitYellowDown() const;
00075 unsigned int spinBitYellowUnpol() const;
00076 unsigned int spinBitBlueFilled() const;
00077 unsigned int spinBitBlueUp() const;
00078 unsigned int spinBitBlueDown() const;
00079 unsigned int spinBitBlueUnpol() const;
00080
00081
00082 unsigned short tcuBits() const;
00083 unsigned short lastDSM(int address) const;
00084 unsigned short bemcLayer1DSM(int channel, int prepost=0) const;
00085 unsigned short eemcLayer1DSM(int channel, int prepost=0) const;
00086 unsigned short emcLayer2DSM(int channel) const;
00087 unsigned short fpdLayer1DSMRaw(StBeamDirection eastwest, int channel, int prepost=0) const;
00088 unsigned short fpdLayer1DSM(StBeamDirection eastwest, int module, int board, int prepost=0) const;
00089 unsigned short fpdLayer2DSMRaw(int channel) const;
00090 unsigned short fpdLayer2DSM(StBeamDirection eastwest, int module) const;
00091
00092
00093 unsigned short ctbRaw(int address, int prepost=0) const;
00094 unsigned short ctb(int pmt, int prepost=0) const;
00095 unsigned short ctbTraySlat(int tray, int slat, int prepost=0) const;
00096 unsigned short ctbSum(int prepost=0) const;
00097
00098
00099 unsigned short bbcADC(StBeamDirection eastwest, int pmt, int prepost=0) const;
00100 unsigned short bbcTDC(StBeamDirection eastwest, int pmt, int prepost=0) const;
00101 unsigned short bbcADCSum(StBeamDirection eastwest, int prepost=0) const;
00102 unsigned short bbcADCSumLargeTile(StBeamDirection eastwest, int prepost=0) const;
00103 unsigned short bbcEarliestTDC(StBeamDirection eastwest, int prepost=0) const;
00104 unsigned short bbcTimeDifference() const;
00105
00106
00107 unsigned short fpd(StBeamDirection eastwest, int module, int pmt, int prepost=0) const;
00108 unsigned short fpdSum(StBeamDirection eastwest, int module) const;
00109
00110
00111 unsigned short nQTdata(int prepost=0) const;
00112 unsigned int* QTdata(int prepost=0) const;
00113
00114
00115 unsigned short zdcAtChannel(int channel, int prepost=0) const;
00116 unsigned short zdcAtAddress(int address, int prepost=0) const;
00117 unsigned short zdcUnAttenuated(StBeamDirection eastwest, int prepost=0) const;
00118 unsigned short zdcAttenuated(StBeamDirection eastwest, int prepost=0) const;
00119 unsigned short zdcADC(StBeamDirection eastwest, int pmt, int prepost=0) const;
00120 unsigned short zdcTDC(StBeamDirection eastwest, int prepost=0) const;
00121 unsigned short zdcHardwareSum(int prepost=0) const;
00122
00123
00124 unsigned short zdcSMD(StBeamDirection eastwest, int verthori, int strip, int prepost=0) const;
00125
00126
00127 unsigned char bemcHighTower(int patch_id, int prepost=0) const;
00128 unsigned char bemcJetPatch (int patch_id, int prepost=0) const;
00129 unsigned char eemcHighTower(int patch_id, int prepost=0) const;
00130 unsigned char eemcJetPatch (int patch_id, int prepost=0) const;
00131 unsigned char bemcHighestTowerADC(int prepost=0) const;
00132 unsigned char eemcHighestTowerADC(int prepost=0) const;
00133
00134
00135 unsigned short vpdADC(StBeamDirection eastwest, int pmt, int prepost=0) const;
00136 unsigned short vpdTDC(StBeamDirection eastwest, int pmt, int prepost=0) const;
00137 unsigned short vpdEarliestTDC(StBeamDirection eastwest, int prepost=0) const;
00138 unsigned short vpdTimeDifference() const;
00139
00140
00141 unsigned short mtdAtAddress(int address, int prepost=0) const;
00142 unsigned short mtdAdc(StBeamDirection eastwest, int pmt, int prepost=0) const;
00143 unsigned short mtdTdc(StBeamDirection eastwest, int pmt, int prepost=0) const;
00144
00145
00146 unsigned short tofAtAddress(int address, int prepost=0) const;
00147 unsigned short tofMultiplicity(int prepost=0) const;
00148
00149
00150 char* getTriggerStructure();
00151 TrgDataType2008* getTriggerStructure2008();
00152 int getRawSize() const;
00153
00154
00155 unsigned char* getDsm0_BEMCE(int prepost=0) const { return 0;}
00156 unsigned char* getDsm0_BEMCW(int prepost=0) const { return 0;}
00157 unsigned char* getDsm0_EEMC(int prepost=0) const;
00158 unsigned short* getDsm1_BEMC(int prepost=0) const { return 0;}
00159 unsigned short* getDsm1_EEMC(int prepost=0) const;
00160 unsigned short* getDsm2_EMC() const;
00161 unsigned short* getDsm3() const;
00162 unsigned char* getDsm_FMS(int prepost=0) const;
00163 unsigned char* getDsm01_FMS(int prepost=0) const;
00164 unsigned char* getDsm02_FMS(int prepost=0) const;
00165 unsigned short* getDsm1_FMS(int prepost=0) const;
00166 unsigned short* getDsm2_FMS() const;
00167 unsigned int l2ResultLength() const;
00168 const unsigned int* l2Result() const;
00169
00170 protected:
00171 TrgDataType2008 *mData;
00172
00173 ClassDef(StTriggerData2008,1)
00174 };
00175
00176 #endif