CMS 3D CMS Logo

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