CMS 3D CMS Logo

HcalCalibDataFrame.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HcalCalibDATAFRAME_H
2 #define DIGIHCAL_HcalCalibDATAFRAME_H
3 
7 #include <vector>
8 #include <ostream>
9 
16 public:
18 
19  HcalCalibDataFrame(); // for persistence
20  explicit HcalCalibDataFrame(const HcalCalibDetId& id);
21 
22  const HcalCalibDetId& id() const { return id_; }
23  const HcalElectronicsId& elecId() const { return electronicsId_; }
24 
26  int size() const { return size_ & 0xF; }
28  int presamples() const { return hcalPresamples_ & 0xF; }
30  bool zsMarkAndPass() const { return (hcalPresamples_ & 0x10); }
32  bool zsUnsuppressed() const { return (hcalPresamples_ & 0x20); }
34  uint32_t zsCrossingMask() const { return (hcalPresamples_ & 0x3FF000) >> 12; }
35 
37  const HcalQIESample& operator[](int i) const { return data_[i]; }
39  const HcalQIESample& sample(int i) const { return data_[i]; }
40 
42  bool validate(int firstSample = 0, int nSamples = 100) const;
43 
45  int fiberIdleOffset() const;
46 
47  void setSize(int size);
48  void setPresamples(int ps);
49  void setSample(int i, const HcalQIESample& sam) { data_[i] = sam; }
50  void setZSInfo(bool unsuppressed, bool markAndPass, uint32_t crossingMask = 0);
51  void setReadoutIds(const HcalElectronicsId& eid);
52  void setFiberIdleOffset(int offset);
53 
54  static const int MAXSAMPLES = 10;
55 
56 private:
59  int size_;
62 };
63 
64 std::ostream& operator<<(std::ostream&, const HcalCalibDataFrame&);
65 
66 #endif
HcalCalibDataFrame::size_
int size_
Definition: HcalCalibDataFrame.h:59
HcalCalibDataFrame::zsUnsuppressed
bool zsUnsuppressed() const
was ZS unsuppressed?
Definition: HcalCalibDataFrame.h:32
mps_fire.i
i
Definition: mps_fire.py:428
HcalCalibDetId
Definition: HcalCalibDetId.h:45
HcalCalibDataFrame::fiberIdleOffset
int fiberIdleOffset() const
offset of bunch number for this channel relative to nominal set in the unpacker (range is +7->-7....
Definition: HcalCalibDataFrame.cc:44
HcalCalibDataFrame::HcalCalibDataFrame
HcalCalibDataFrame()
Definition: HcalCalibDataFrame.cc:3
HcalCalibDataFrame::setZSInfo
void setZSInfo(bool unsuppressed, bool markAndPass, uint32_t crossingMask=0)
Definition: HcalCalibDataFrame.cc:35
HcalCalibDataFrame::validate
bool validate(int firstSample=0, int nSamples=100) const
validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is a...
Definition: HcalCalibDataFrame.cc:20
PresampleTask_cfi.nSamples
nSamples
Definition: PresampleTask_cfi.py:7
HcalQIESample
Definition: HcalQIESample.h:32
HcalCalibDataFrame::hcalPresamples_
int hcalPresamples_
Definition: HcalCalibDataFrame.h:60
HcalCalibDataFrame::elecId
const HcalElectronicsId & elecId() const
Definition: HcalCalibDataFrame.h:23
HcalCalibDataFrame::data_
HcalQIESample data_[MAXSAMPLES]
Definition: HcalCalibDataFrame.h:61
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
DigiNZS_cff.markAndPass
markAndPass
Definition: DigiNZS_cff.py:6
HcalCalibDetId.h
HcalCalibDataFrame
Definition: HcalCalibDataFrame.h:15
HcalCalibDataFrame::operator[]
const HcalQIESample & operator[](int i) const
access a sample
Definition: HcalCalibDataFrame.h:37
operator<<
std::ostream & operator<<(std::ostream &, const HcalCalibDataFrame &)
Definition: HcalCalibDataFrame.cc:61
castor_dqm_sourceclient-live_cfg.firstSample
firstSample
Definition: castor_dqm_sourceclient-live_cfg.py:64
HcalCalibDataFrame::setPresamples
void setPresamples(int ps)
Definition: HcalCalibDataFrame.cc:17
HcalQIESample.h
HcalCalibDataFrame::presamples
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware)
Definition: HcalCalibDataFrame.h:28
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
HcalCalibDataFrame::setReadoutIds
void setReadoutIds(const HcalElectronicsId &eid)
Definition: HcalCalibDataFrame.cc:18
HcalElectronicsId.h
HcalCalibDataFrame::key_type
HcalCalibDetId key_type
For the sorted collection.
Definition: HcalCalibDataFrame.h:17
HcalCalibDataFrame::id_
HcalCalibDetId id_
Definition: HcalCalibDataFrame.h:57
HcalCalibDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: HcalCalibDataFrame.h:54
HcalCalibDataFrame::sample
const HcalQIESample & sample(int i) const
access a sample
Definition: HcalCalibDataFrame.h:39
HcalCalibDataFrame::size
int size() const
total number of samples in the digi
Definition: HcalCalibDataFrame.h:26
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
HcalCalibDataFrame::id
const HcalCalibDetId & id() const
Definition: HcalCalibDataFrame.h:22
HcalCalibDataFrame::setFiberIdleOffset
void setFiberIdleOffset(int offset)
Definition: HcalCalibDataFrame.cc:49
HcalCalibDataFrame::zsCrossingMask
uint32_t zsCrossingMask() const
zs crossing mask (which sums considered)
Definition: HcalCalibDataFrame.h:34
HcalCalibDataFrame::electronicsId_
HcalElectronicsId electronicsId_
Definition: HcalCalibDataFrame.h:58
HcalCalibDataFrame::zsMarkAndPass
bool zsMarkAndPass() const
was ZS MarkAndPass?
Definition: HcalCalibDataFrame.h:30
HcalCalibDataFrame::setSample
void setSample(int i, const HcalQIESample &sam)
Definition: HcalCalibDataFrame.h:49
HcalCalibDataFrame::setSize
void setSize(int size)
Definition: HcalCalibDataFrame.cc:9