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