CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorTriggerPrimitiveDigi.h
Go to the documentation of this file.
1 #ifndef CASTORTRIGGERPRIMITIVEDIGI_H
2 #define CASTORTRIGGERPRIMITIVEDIGI_H 1
3 
4 #include <ostream>
5 #include <vector>
8 
16 public:
18 
19  CastorTriggerPrimitiveDigi(); // for persistence
20  explicit CastorTriggerPrimitiveDigi(const HcalCastorDetId& id);
21 
22  const HcalCastorDetId& id() const { return id_; }
23  int size() const { return (size_&0xF); }
24  int presamples() const { return hcalPresamples_&0xF; }
25 
27  bool zsMarkAndPass() const { return (hcalPresamples_&0x10); }
29  bool zsUnsuppressed() const { return (hcalPresamples_&0x20); }
30 
31  void setZSInfo(bool unsuppressed, bool markAndPass);
32 
33  const HcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
34  const HcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
35 
37  const HcalTriggerPrimitiveSample& t0() const { return data_[presamples()]; }
39  bool SOI_fineGrain() const { return t0().fineGrain(); }
41  int SOI_compressedEt() const { return t0().compressedEt(); }
42 
43  int tpchannel(int i) const { return ( ( data_[i].raw() & 0xf800 ) >> 11 ); }
44  int tpdata(int i) const { return ( data_[i].raw() & 0x01ff ); }
45  bool isSOI(int i ) const { return ( ( data_[i].raw() & 0x0200 ) == 0x0200 ) ; }
46  int SOI_tpchannel() const { return ( ( data_[presamples()].raw() & 0xf800 ) >> 11 ); }
47  int SOI_tpdata() const { return ( data_[presamples()].raw() & 0x01ff ); }
48 
49  void setSize(int size);
50  void setPresamples(int ps);
51  void setSample(int i, const HcalTriggerPrimitiveSample& sam) { data_[i]=sam; }
52 
53  static const int MAXSAMPLES = 10;
54 private:
56  int size_;
59 };
60 
61 std::ostream& operator<<(std::ostream& s, const CastorTriggerPrimitiveDigi& digi);
62 
63 
64 #endif
int i
Definition: DBlmapReader.cc:9
bool zsUnsuppressed() const
was ZS unsuppressed?
HcalCastorDetId key_type
For the sorted collection.
const HcalCastorDetId & id() const
void setSample(int i, const HcalTriggerPrimitiveSample &sam)
HcalTriggerPrimitiveSample data_[MAXSAMPLES]
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int SOI_compressedEt() const
Compressed ET for the &quot;Sample of Interest&quot;.
bool zsMarkAndPass() const
was ZS MarkAndPass?
const HcalTriggerPrimitiveSample & operator[](int i) const
const HcalTriggerPrimitiveSample & t0() const
Full &quot;Sample of Interest&quot;.
bool fineGrain() const
get the fine-grain bit
void setZSInfo(bool unsuppressed, bool markAndPass)
const HcalTriggerPrimitiveSample & sample(int i) const
int compressedEt() const
get the encoded/compressed Et
bool SOI_fineGrain() const
Fine-grain bit for the &quot;Sample of Interest&quot;.