CMS 3D CMS Logo

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