CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalUpgradeDataFrame.h
Go to the documentation of this file.
1 #ifndef DIGIHCAL_HCALUpgradeDATAFRAME_H
2 #define DIGIHCAL_HCALUpgradeDATAFRAME_H
3 
4 #include <vector>
5 #include <ostream>
9 
16 public:
17  typedef HcalDetId key_type;
18 
21  HcalUpgradeDataFrame(HcalDetId id, int capId, int samples, int presamples) ;
22 
23  const HcalDetId& id() const { return id_; }
24  const HcalElectronicsId& elecId() const { return electronicsId_; }
25 
26  int size() const { return size_ ; }
27  int presamples() const { return presamples_&0xF ; }
28  bool zsMarkAndPass() const { return (presamples_&0x10); }
29  bool zsUnsuppressed() const { return (presamples_&0x20); }
30  uint32_t zsCrossingMask() const { return (presamples_&0x3FF000)>>12; }
31 
32  int startingCapId() const { return capId_ ; }
33  int capId(int iSample=0) const { return (capId_+iSample)%4; }
34 
35  bool valid(int iSample=0) const { return dv_[iSample] ; }
36  uint16_t adc(int iSample=0) const { return adc_[iSample] ; }
37  uint16_t tdc(int iSample=0) const { return tdc_[iSample] ; }
38  HcalUpgradeQIESample operator[](int iSample) const;
39 
40  void setSize(int size) ;
41  void setPresamples(int presamples) ;
42  void setZSInfo(bool unsuppressed, bool markAndPass, uint32_t crossingMask=0);
43  void setStartingCapId(int capId) { capId_ = capId ; }
44  void setSample(int iSample, uint16_t adc, uint16_t tdc, bool dv) ;
45  void setReadoutIds(const HcalElectronicsId& eid);
46 
47  static const int MAXSAMPLES = 10 ;
48 private:
51  int capId_ ;
53  bool dv_[MAXSAMPLES] ;
54  uint16_t adc_[MAXSAMPLES];
55  uint16_t tdc_[MAXSAMPLES] ;
56 };
57 
58 std::ostream& operator<<(std::ostream&, const HcalUpgradeDataFrame&) ;
59 
62 
63 
64 #endif
const HcalElectronicsId & elecId() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static const int MAXSAMPLES
uint32_t zsCrossingMask() const
void setPresamples(int presamples)
int capId(int iSample=0) const
bool valid(int iSample=0) const
uint16_t tdc(int iSample=0) const
void setStartingCapId(int capId)
HcalDetId key_type
For the sorted collection.
void setZSInfo(bool unsuppressed, bool markAndPass, uint32_t crossingMask=0)
uint16_t tdc_[MAXSAMPLES]
void setSample(int iSample, uint16_t adc, uint16_t tdc, bool dv)
uint16_t adc_[MAXSAMPLES]
void setReadoutIds(const HcalElectronicsId &eid)
const HcalDetId & id() const
HcalUpgradeQIESample operator[](int iSample) const
HcalElectronicsId electronicsId_
uint16_t adc(int iSample=0) const
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
edm::SortedCollection< HcalUpgradeDataFrame > HcalUpgradeDigiCollection