CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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; };
104  void setZeroSuppression(const bool& zeroSuppression) { zeroSuppression_ = zeroSuppression; };
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
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)
tuple runType
Definition: runPedHist.py:37
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 dccId(DetId const &, EcalElectronicsMapping 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)
unsigned rtHalf(DetId const &, EcalElectronicsMapping const *)
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