File indexing completed on 2024-04-06 12:04:05
0001 #ifndef RAWECAL_ESDCCHEADERBLOCK_H
0002 #define RAWECAL_ESDCCHEADERBLOCK_H
0003 #include <vector>
0004
0005 class ESDCCHeaderBlock {
0006 public:
0007 typedef int key_type;
0008
0009 enum ESDCCRunType {
0010 PEDESTAL_RUN = 1,
0011 TESTPULSE_RUN = 2,
0012 COSMIC_RUN = 3,
0013 BEAM_RUN = 4,
0014 PHYSICS_RUN = 5,
0015 TEST_RUN = 6,
0016 GLOBAL_COSMIC_RUN = 7
0017 };
0018
0019 enum ESSeqType { STD_SEQ = 0, DELTASCAN_SEQ = 1, DELAYSCAN_SEQ = 2, PULSESHAPE_SEQ = 3 };
0020
0021 enum ESTriggerType { PHYSICS_TRIGGER = 1, CALIBRATION_TRIGGER = 2, TEST_TRIGGER = 3, TECHNICAL_EXTERNAL_TRIGGER = 4 };
0022
0023 ESDCCHeaderBlock();
0024 ESDCCHeaderBlock(const int& dccId);
0025
0026 const int& id() const { return dccId_; }
0027 void setId(const int& dccId) { dccId_ = dccId; };
0028
0029 const int fedId() const { return fedId_; }
0030 void setFedId(const int& fedId) { fedId_ = fedId; };
0031
0032 void setLV1(const int& LV1) { LV1_ = LV1; };
0033 void setBX(const int& BX) { BX_ = BX; }
0034 void setGain(const int& gain) { gain_ = gain; }
0035 void setPrecision(const int& precision) { precision_ = precision; }
0036 void setDAC(const int& dac) { dac_ = dac; }
0037 void setEventLength(const int& evtLen) { evtLen_ = evtLen; };
0038 void setDCCErrors(const int& dccErrs) { dccErrs_ = dccErrs; };
0039 void setRunNumber(const int& runNum) { runNum_ = runNum; };
0040 void setRunType(const int& runType) { runType_ = runType; };
0041 void setSeqType(const int& seqType) { seqType_ = seqType; };
0042 void setTriggerType(const int& trgType) { trgType_ = trgType; };
0043 void setCompressionFlag(const int& compFlag) { compFlag_ = compFlag; };
0044 void setOrbitNumber(const int& orbit) { orbit_ = orbit; };
0045 void setMajorVersion(const int& vmajor) { vmajor_ = vmajor; };
0046 void setMinorVersion(const int& vminor) { vminor_ = vminor; };
0047 void setOptoRX0(const int& optoRX0) { optoRX0_ = optoRX0; };
0048 void setOptoRX1(const int& optoRX1) { optoRX1_ = optoRX1; };
0049 void setOptoRX2(const int& optoRX2) { optoRX2_ = optoRX2; };
0050 void setOptoBC0(const int& optoBC0) { optoBC0_ = optoBC0; };
0051 void setOptoBC1(const int& optoBC1) { optoBC1_ = optoBC1; };
0052 void setOptoBC2(const int& optoBC2) { optoBC2_ = optoBC2; };
0053 void setFEChannelStatus(const std::vector<int>& FEch) { FEch_ = FEch; };
0054
0055 void setPacketLength(const int& packetLen) { packetLen_ = packetLen; };
0056 void setBC(const int& bc) { bc_ = bc; };
0057 void setEV(const int& ev) { ev_ = ev; };
0058
0059 void setBMMeasurements(const int& BMMeasurements) { BMMeasurements_ = BMMeasurements; };
0060 void setBeginOfSpillSec(const int& beginOfSpillSec) { beginOfSpillSec_ = beginOfSpillSec; };
0061 void setBeginOfSpillMilliSec(const int& beginOfSpillMilliSec) { beginOfSpillMilliSec_ = beginOfSpillMilliSec; };
0062 void setEndOfSpillSec(const int& endOfSpillSec) { endOfSpillSec_ = endOfSpillSec; };
0063 void setEndOfSpillMilliSec(const int& endOfSpillMilliSec) { endOfSpillMilliSec_ = endOfSpillMilliSec; };
0064 void setBeginOfSpillLV1(const int& beginOfSpillLV1) { beginOfSpillLV1_ = beginOfSpillLV1; };
0065 void setEndOfSpillLV1(const int& endOfSpillLV1) { endOfSpillLV1_ = endOfSpillLV1; };
0066
0067 void setTimeStampSec(const int& timestamp_sec) { timestamp_sec_ = timestamp_sec; };
0068 void setTimeStampUSec(const int& timestamp_usec) { timestamp_usec_ = timestamp_usec; };
0069 void setSpillNumber(const int& spillNum) { spillNum_ = spillNum; };
0070 void setEventInSpill(const int& evtInSpill) { evtInSpill_ = evtInSpill; };
0071 void setCAMACError(const int& camacErr) { camacErr_ = camacErr; };
0072 void setVMEError(const int& vmeErr) { vmeErr_ = vmeErr; };
0073 void setADCChannelStatus(const std::vector<int>& ADCch_status) { ADCch_status_ = ADCch_status; };
0074 void setADCChannel(const std::vector<int>& ADCch) { ADCch_ = ADCch; };
0075 void setTDCChannelStatus(const std::vector<int>& TDCch_status) { TDCch_status_ = TDCch_status; };
0076 void setTDCChannel(const std::vector<int>& TDCch) { TDCch_ = TDCch; };
0077
0078 int getLV1() const { return LV1_; }
0079 int getBX() const { return BX_; }
0080 int getGain() const { return gain_; }
0081 int getPrecision() const { return precision_; }
0082 int getDAC() const { return dac_; }
0083 int getEventLength() const { return evtLen_; }
0084 int getDCCErrors() const { return dccErrs_; }
0085 int getRunNumber() const { return runNum_; }
0086 int getRunType() const { return runType_; }
0087 int getSeqType() const { return seqType_; }
0088 int getTriggerType() const { return trgType_; }
0089 int getCompressionFlag() const { return compFlag_; }
0090 int getOrbitNumber() const { return orbit_; }
0091 int getMajorVersion() const { return vmajor_; }
0092 int getMinorVersion() const { return vminor_; }
0093 int getOptoRX0() const { return optoRX0_; }
0094 int getOptoRX1() const { return optoRX1_; }
0095 int getOptoRX2() const { return optoRX2_; }
0096 int getOptoBC0() const { return optoBC0_; }
0097 int getOptoBC1() const { return optoBC1_; }
0098 int getOptoBC2() const { return optoBC2_; }
0099 const std::vector<int>& getFEChannelStatus() const { return FEch_; }
0100 int getPacketLength() const { return packetLen_; }
0101 int getBC() const { return bc_; }
0102 int getEV() const { return ev_; }
0103 int getBMMeasurements() const { return BMMeasurements_; }
0104 int getBeginOfSpillSec() const { return beginOfSpillSec_; }
0105 int getBeginOfSpillMiliSec() const { return beginOfSpillMilliSec_; }
0106 int getEndOfSpillSec() const { return endOfSpillSec_; }
0107 int getEndOfSpillMiliSec() const { return endOfSpillMilliSec_; }
0108 int getBeginOfSpillLV1() const { return beginOfSpillLV1_; }
0109 int getEndOfSpillLV1() const { return endOfSpillLV1_; }
0110 int getTimeStampSec() const { return timestamp_sec_; }
0111 int getTimeStampUSec() const { return timestamp_usec_; }
0112 int getSpillNumber() const { return spillNum_; }
0113 int getEventInSpill() const { return evtInSpill_; }
0114 int getCAMACError() const { return camacErr_; }
0115 int getVMEError() const { return vmeErr_; }
0116 const std::vector<int>& getADCChannelStatus() const { return ADCch_status_; }
0117 const std::vector<int>& getADCChannel() const { return ADCch_; }
0118 const std::vector<int>& getTDCChannelStatus() const { return TDCch_status_; }
0119 const std::vector<int>& getTDCChannel() const { return TDCch_; }
0120
0121 private:
0122 int dccId_;
0123 int fedId_;
0124 int LV1_;
0125 int BX_;
0126 int gain_;
0127 int precision_;
0128 int dac_;
0129 int evtLen_;
0130 int dccErrs_;
0131 int runNum_;
0132 int runType_;
0133 int seqType_;
0134 int trgType_;
0135 int compFlag_;
0136 int orbit_;
0137 int vmajor_;
0138 int vminor_;
0139 int optoRX0_;
0140 int optoRX1_;
0141 int optoRX2_;
0142 int optoBC0_;
0143 int optoBC1_;
0144 int optoBC2_;
0145 std::vector<int> FEch_;
0146 int packetLen_;
0147 int bc_;
0148 int ev_;
0149 int BMMeasurements_;
0150 int beginOfSpillSec_;
0151 int beginOfSpillMilliSec_;
0152 int endOfSpillSec_;
0153 int endOfSpillMilliSec_;
0154 int beginOfSpillLV1_;
0155 int endOfSpillLV1_;
0156 int timestamp_sec_;
0157 int timestamp_usec_;
0158 int spillNum_;
0159 int evtInSpill_;
0160 int camacErr_;
0161 int vmeErr_;
0162 std::vector<int> ADCch_status_;
0163 std::vector<int> ADCch_;
0164 std::vector<int> TDCch_status_;
0165 std::vector<int> TDCch_;
0166 };
0167
0168 #endif