CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
13 #include <vector>
14 
15 #define MAX_TCC_SIZE 4
16 #define MAX_TT_SIZE 70
17 
18 
19 
21 {
22 
23  public:
24 
25  typedef int key_type;
26 
28 
29  // run types pre-global runs
30  COSMIC =0,
31  BEAMH4 =1,
32  BEAMH2 =2,
33  MTCC =3,
42  LED_STD =12,
43 
44  // physics triggers in global runs
48 
49  // gap events in global runs
50  LASER_GAP =16,
53  LED_GAP =19,
54 
55  // physics triggers in local runs
60 
61  };
62 
68  };
69 
71  TTC_LASER = 4,
72  TTC_LED = 5,
75  };
76 
78  short LaserPower;
79  short LaserFilter;
80  short wavelength;
81  short delay;
82  short MEMVinj;
83  short mgpa_content;
84  short ped_offset;
85  };
86 
88  EcalDCCHeaderBlock(const int& dccId);
89 
90  // partitional and geometrical:
91  // CMS: 1-9 EE-, 10-45 EB, 46-54 EE+
92  // TB and COSM: 1 (10 in case of EcalRawToDigi)
93  const int& id() const { return dccId_; }
94 
95  // as found in raw data, namely
96  // CMS: 601-654 TB and COSM: 0-35
97  const int fedId() const { return fedId_; }
98 
99  void setId(const int& dccId) { dccId_=dccId; };
100  void setFedId(const int& fedId) { fedId_=fedId; };
101 
102  void setErrors(const int& dccErrors) { dccErrors_=dccErrors; };
103  void setDccInTTCCommand(const int& dccInTTCCommand) { dccInTTCCommand_=dccInTTCCommand; };
104  void setRunNumber(const int& run){runNumber_ = run;}
105  void setLV1(const int& LV1){LV1event_ = LV1;}
106  void setBX(const int& BX){BX_ = BX;}
107  void setOrbit(const int& orbit){orbitNumber_ = orbit;}
108  void setEventSettings(const EcalDCCEventSettings& EventSettings) { EventSettings_=EventSettings; };
109  void setRunType(const short& runType) { runType_=runType; };
110  void setZs(const short& zs) { zs_=zs;};
111  void setBasicTriggerType(const short& triggerType) { basic_trigger_type_=triggerType; };
112  //void setSequence(const short& sequence) { sequence_=sequence; } ;
113  void setRtHalf(const short& rtHalf) { rtHalf_=rtHalf; } ;
114  void setMgpaGain(const short& mgpaGain) { mgpaGain_=mgpaGain; };
115  void setMemGain(const short& memGain) { memGain_=memGain; };
116  void setSelectiveReadout(const bool& selectiveReadout) { selectiveReadout_=selectiveReadout; };
117  void setZeroSuppression(const bool& zeroSuppression) { zeroSuppression_=zeroSuppression; };
118  void setTestZeroSuppression(const bool& testZeroSuppression) { testZeroSuppression_ = testZeroSuppression; };
119  void setSrpStatus(const short& srpStatus) { srpStatus_=srpStatus; };
120  void setTccStatus(const std::vector<short>& tccStatus) { tccStatus_=tccStatus; };
121  void setTriggerTowerFlags(const std::vector<short>& triggerTowerFlag) { triggerTowerFlag_ = triggerTowerFlag; };
122  void setFEStatus(const std::vector<short>& feStatus) { feStatus_ = feStatus; };
123 
124  void setFEBx(const std::vector<short>& feBx) { feBx_ = feBx; }
125  void setTCCBx(const std::vector<short>& tccBx){ tccBx_ = tccBx; }
126  void setSRPBx(const short & srpBx) { srpBx_ = srpBx; }
127 
128  void setFELv1(const std::vector<short>& feLv1) { feLv1_ = feLv1; }
129  void setTCCLv1(const std::vector<short>& tccLv1){ tccLv1_ = tccLv1; }
130  void setSRPLv1(const short & srpLv1) { srpLv1_ = srpLv1; }
131 
132 
133 
134 
135 
136  //TODO add all the get methods
137 
138  int getDCCErrors() const{ return dccErrors_;}
139  int getDccInTCCCommand() const{ return dccInTTCCommand_; };
140  int getRunNumber() const {return runNumber_ ;}
141  int getLV1() const {return LV1event_ ;}
142  int getBX() const {return BX_ ;}
143  int getOrbit() const {return orbitNumber_;}
145  short getRunType() const {return runType_ ;}
146  short getZs() const {return zs_ ;}
147  short getBasicTriggerType() const {return basic_trigger_type_ ;}
148 
149  short getRtHalf() const { return rtHalf_; }
150  short getMgpaGain() const { return mgpaGain_;}
151  short getMemGain() const { return memGain_;}
152  short getSelectiveReadout() const { return selectiveReadout_;}
153  bool getZeroSuppression() const { return zeroSuppression_;}
155  short getSrpStatus() const { return srpStatus_;}
156  const std::vector<short>& getTccStatus() const { return tccStatus_ ;}
157  const std::vector<short>& getTriggerTowerFlag() const { return triggerTowerFlag_ ;}
158  const std::vector<short>& getFEStatus() const { return feStatus_ ;}
159 
160  const std::vector<short>& getFEBxs() const { return feBx_;}
161  const std::vector<short>& getTCCBx() const { return tccBx_;}
162  short getSRPBx() const { return srpBx_; }
163 
164  const std::vector<short>& getFELv1() const { return feLv1_;}
165  const std::vector<short>& getTCCLv1()const { return tccLv1_;}
166  short getSRPLv1() const { return srpLv1_; }
167 
168 
169  private:
170 
171  int dccId_; //to be used as the Key
172  int fedId_;
176  short runType_;
177  short zs_;
178 
180 
183  int BX_;
185 
186  short rtHalf_;
187  short mgpaGain_;
188  short memGain_;
192 
193  short srpStatus_;
194  std::vector<short> tccStatus_;
195  std::vector<short> triggerTowerFlag_;
196  std::vector<short> feStatus_;
197 
198  std::vector<short> feBx_;
199  std::vector<short> tccBx_;
200  short srpBx_;
201 
202  std::vector<short> feLv1_;
203  std::vector<short> tccLv1_;
204  short srpLv1_;
205 
206 };
207 
208 #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_
unsigned dccId(const DetId &)
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
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)
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