CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HFDataFrame.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HFDATAFRAME_H
2 #define DIGIHCAL_HFDATAFRAME_H
3 
7 #include <vector>
8 #include <ostream>
9 
15 class HFDataFrame {
16 public:
17  typedef HcalDetId key_type;
18 
19  HFDataFrame(); // for persistence
20  explicit HFDataFrame(const HcalDetId& id);
21 
22  const HcalDetId& 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 private:
58  int size_;
61 };
62 
63 std::ostream& operator<<(std::ostream&, const HFDataFrame&);
64 
65 #endif
HcalDetId id_
Definition: HFDataFrame.h:56
int i
Definition: DBlmapReader.cc:9
HcalDetId key_type
For the sorted collection.
Definition: HFDataFrame.h:17
int hcalPresamples_
Definition: HFDataFrame.h:59
bool zsUnsuppressed() const
was ZS unsuppressed?
Definition: HFDataFrame.h:32
bool zsMarkAndPass() const
was ZS MarkAndPass?
Definition: HFDataFrame.h:30
void setFiberIdleOffset(int offset)
Definition: HFDataFrame.cc:53
uint32_t zsCrossingMask() const
zs crossing mask (which sums considered)
Definition: HFDataFrame.h:34
const HcalElectronicsId & elecId() const
Definition: HFDataFrame.h:23
int fiberIdleOffset() const
offset of bunch number for this channel relative to nominal set in the unpacker (range is +7-&gt;-7...
Definition: HFDataFrame.cc:48
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
HcalQIESample data_[MAXSAMPLES]
Definition: HFDataFrame.h:60
void setReadoutIds(const HcalElectronicsId &eid)
Definition: HFDataFrame.cc:25
const HcalQIESample & sample(int i) const
access a sample
Definition: HFDataFrame.h:39
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: HFDataFrame.cc:29
void setPresamples(int ps)
Definition: HFDataFrame.cc:22
constexpr size_t nSamples
void setSample(int i, const HcalQIESample &sam)
Definition: HFDataFrame.h:50
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:26
void setSize(int size)
Definition: HFDataFrame.cc:17
HcalElectronicsId electronicsId_
Definition: HFDataFrame.h:57
static const int MAXSAMPLES
Definition: HFDataFrame.h:54
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
Definition: HFDataFrame.h:28
const HcalDetId & id() const
Definition: HFDataFrame.h:22
Readout chain identification for Hcal.
const HcalQIESample & operator[](int i) const
access a sample
Definition: HFDataFrame.h:37
void setZSInfo(bool unsuppressed, bool markAndPass, uint32_t crossingMask=0)
Definition: HFDataFrame.cc:41