CMS 3D CMS Logo

EcalDCCHeaderBlock.h
Go to the documentation of this file.
1 #ifndef RAWECAL_ECALDCCHEADERBLOCK_H
2 #define RAWECAL_ECALDCCHEADERBLOCK_H
3 
4 #include <boost/cstdint.hpp>
5 
12 #include <vector>
13 
14 #define MAX_TCC_SIZE 4
15 #define MAX_TT_SIZE 70
16 
18 public:
19  typedef int key_type;
20 
22 
23  // run types pre-global runs
24  COSMIC = 0,
25  BEAMH4 = 1,
26  BEAMH2 = 2,
27  MTCC = 3,
28  LASER_STD = 4,
36  LED_STD = 12,
37 
38  // physics triggers in global runs
42 
43  // gap events in global runs
44  LASER_GAP = 16,
47  LED_GAP = 19,
48 
49  // physics triggers in local runs
52  HALO_LOCAL = 22,
54 
55  };
56 
62  };
63 
65 
67  short LaserPower;
68  short LaserFilter;
69  short wavelength;
70  short delay;
71  short MEMVinj;
72  short mgpa_content;
73  short ped_offset;
74  };
75 
77  EcalDCCHeaderBlock(const int& dccId);
78 
79  // partitional and geometrical:
80  // CMS: 1-9 EE-, 10-45 EB, 46-54 EE+
81  // TB and COSM: 1 (10 in case of EcalRawToDigi)
82  const int& id() const { return dccId_; }
83 
84  // as found in raw data, namely
85  // CMS: 601-654 TB and COSM: 0-35
86  const int fedId() const { return fedId_; }
87 
88  void setId(const int& dccId) { dccId_ = dccId; };
89  void setFedId(const int& fedId) { fedId_ = fedId; };
90 
91  void setErrors(const int& dccErrors) { dccErrors_ = dccErrors; };
92  void setDccInTTCCommand(const int& dccInTTCCommand) { dccInTTCCommand_ = dccInTTCCommand; };
93  void setRunNumber(const int& run) { runNumber_ = run; }
94  void setLV1(const int& LV1) { LV1event_ = LV1; }
95  void setBX(const int& BX) { BX_ = BX; }
96  void setOrbit(const int& orbit) { orbitNumber_ = orbit; }
97  void setEventSettings(const EcalDCCEventSettings& EventSettings) { EventSettings_ = EventSettings; };
98  void setRunType(const short& runType) { runType_ = runType; };
99  void setZs(const short& zs) { zs_ = zs; };
100  void setBasicTriggerType(const short& triggerType) { basic_trigger_type_ = triggerType; };
101  //void setSequence(const short& sequence) { sequence_=sequence; } ;
102  void setRtHalf(const short& rtHalf) { rtHalf_ = rtHalf; };
103  void setMgpaGain(const short& mgpaGain) { mgpaGain_ = mgpaGain; };
104  void setMemGain(const short& memGain) { memGain_ = memGain; };
105  void setSelectiveReadout(const bool& selectiveReadout) { selectiveReadout_ = selectiveReadout; };
106  void setZeroSuppression(const bool& zeroSuppression) { zeroSuppression_ = zeroSuppression; };
107  void setTestZeroSuppression(const bool& testZeroSuppression) { testZeroSuppression_ = testZeroSuppression; };
108  void setSrpStatus(const short& srpStatus) { srpStatus_ = srpStatus; };
109  void setTccStatus(const std::vector<short>& tccStatus) { tccStatus_ = tccStatus; };
110  void setTriggerTowerFlags(const std::vector<short>& triggerTowerFlag) { triggerTowerFlag_ = triggerTowerFlag; };
111  void setFEStatus(const std::vector<short>& feStatus) { feStatus_ = feStatus; };
112 
113  void setFEBx(const std::vector<short>& feBx) { feBx_ = feBx; }
114  void setTCCBx(const std::vector<short>& tccBx) { tccBx_ = tccBx; }
115  void setSRPBx(const short& srpBx) { srpBx_ = srpBx; }
116 
117  void setFELv1(const std::vector<short>& feLv1) { feLv1_ = feLv1; }
118  void setTCCLv1(const std::vector<short>& tccLv1) { tccLv1_ = tccLv1; }
119  void setSRPLv1(const short& srpLv1) { srpLv1_ = srpLv1; }
120 
121  //TODO add all the get methods
122 
123  int getDCCErrors() const { return dccErrors_; }
124  int getDccInTCCCommand() const { return dccInTTCCommand_; };
125  int getRunNumber() const { return runNumber_; }
126  int getLV1() const { return LV1event_; }
127  int getBX() const { return BX_; }
128  int getOrbit() const { return orbitNumber_; }
130  short getRunType() const { return runType_; }
131  short getZs() const { return zs_; }
132  short getBasicTriggerType() const { return basic_trigger_type_; }
133 
134  short getRtHalf() const { return rtHalf_; }
135  short getMgpaGain() const { return mgpaGain_; }
136  short getMemGain() const { return memGain_; }
137  short getSelectiveReadout() const { return selectiveReadout_; }
138  bool getZeroSuppression() const { return zeroSuppression_; }
140  short getSrpStatus() const { return srpStatus_; }
141  const std::vector<short>& getTccStatus() const { return tccStatus_; }
142  const std::vector<short>& getTriggerTowerFlag() const { return triggerTowerFlag_; }
143  const std::vector<short>& getFEStatus() const { return feStatus_; }
144 
145  const std::vector<short>& getFEBxs() const { return feBx_; }
146  const std::vector<short>& getTCCBx() const { return tccBx_; }
147  short getSRPBx() const { return srpBx_; }
148 
149  const std::vector<short>& getFELv1() const { return feLv1_; }
150  const std::vector<short>& getTCCLv1() const { return tccLv1_; }
151  short getSRPLv1() const { return srpLv1_; }
152 
153 private:
154  int dccId_; //to be used as the Key
155  int fedId_;
159  short runType_;
160  short zs_;
161 
163 
166  int BX_;
168 
169  short rtHalf_;
170  short mgpaGain_;
171  short memGain_;
175 
176  short srpStatus_;
177  std::vector<short> tccStatus_;
178  std::vector<short> triggerTowerFlag_;
179  std::vector<short> feStatus_;
180 
181  std::vector<short> feBx_;
182  std::vector<short> tccBx_;
183  short srpBx_;
184 
185  std::vector<short> feLv1_;
186  std::vector<short> tccLv1_;
187  short srpLv1_;
188 };
189 
190 #endif
EcalDCCEventSettings getEventSettings() const
const std::vector< short > & getTccStatus() const
void setSelectiveReadout(const bool &selectiveReadout)
EcalDCCEventSettings EventSettings_
const std::vector< short > & getTCCLv1() const
void setFedId(const int &fedId)
const std::vector< short > & getFEBxs() const
short getMgpaGain() const
void setBasicTriggerType(const short &triggerType)
std::vector< short > feStatus_
int getDccInTCCCommand() const
void setRtHalf(const short &rtHalf)
int key_type
For the sorted collection.
void setTCCBx(const std::vector< short > &tccBx)
std::vector< short > tccLv1_
short getMemGain() const
short getSRPBx() const
void setSRPBx(const short &srpBx)
void setFEStatus(const std::vector< short > &feStatus)
void setRunNumber(const int &run)
std::vector< short > tccStatus_
const std::vector< short > & getFELv1() const
std::vector< short > tccBx_
void setDccInTTCCommand(const int &dccInTTCCommand)
void setZeroSuppression(const bool &zeroSuppression)
std::vector< short > feBx_
const int fedId() const
void setMemGain(const short &memGain)
short getSrpStatus() const
short getSRPLv1() const
unsigned rtHalf(DetId const &)
void setTestZeroSuppression(const bool &testZeroSuppression)
const std::vector< short > & getTriggerTowerFlag() const
short getRtHalf() const
void setTccStatus(const std::vector< short > &tccStatus)
short getBasicTriggerType() const
bool getTestZeroSuppression() const
void setEventSettings(const EcalDCCEventSettings &EventSettings)
const int & id() const
void setSRPLv1(const short &srpLv1)
const std::vector< short > & getTCCBx() const
std::vector< short > feLv1_
std::vector< short > triggerTowerFlag_
void setErrors(const int &dccErrors)
void setFEBx(const std::vector< short > &feBx)
void setFELv1(const std::vector< short > &feLv1)
void setSrpStatus(const short &srpStatus)
void setOrbit(const int &orbit)
void setMgpaGain(const short &mgpaGain)
void setTriggerTowerFlags(const std::vector< short > &triggerTowerFlag)
void setId(const int &dccId)
void setLV1(const int &LV1)
void setBX(const int &BX)
unsigned dccId(DetId const &)
short getSelectiveReadout() const
void setTCCLv1(const std::vector< short > &tccLv1)
void setRunType(const short &runType)
const std::vector< short > & getFEStatus() const
short getRunType() const
void setZs(const short &zs)
bool getZeroSuppression() const