CMS 3D CMS Logo

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