CMS 3D CMS Logo

HcalUMNioDigi.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALDIGI_HCALUMNIODIGI_H
2 #define DATAFORMATS_HCALDIGI_HCALUMNIODIGI_H 1
3 
4 #include <vector>
5 #include <cstdint>
6 #include <ostream>
7 
16 public:
17 
18  HcalUMNioDigi();
19  HcalUMNioDigi(const uint16_t* ptr, int words);
20  HcalUMNioDigi(const std::vector<uint16_t>& words);
21 
22  uint32_t runNumber() const;
23  uint32_t orbitNumber() const;
24  uint16_t bunchNumber() const;
25  uint32_t eventNumber() const;
26 
27  uint8_t eventType() const;
28  uint16_t spillCounter() const;
29  bool isSpill() const;
30 
31  bool invalid() const { return (payload_.size()<16) || (payload_[6]&0xF000)!=0x2000; }
32 
33  int numberUserWords() const;
34  uint16_t idUserWord(int iword) const;
35  uint32_t valueUserWord(int iword) const;
36  bool hasUserWord(int id) const;
37  uint32_t getUserWord(int id) const;
38  bool getUserWord(int id, uint32_t& value) const;
39 
40 private:
41  std::vector<uint16_t> payload_;
42 };
43 
44 std::ostream& operator<<(std::ostream&, const HcalUMNioDigi&);
45 
46 
47 #endif
bool isSpill() const
uint32_t getUserWord(int id) const
bool invalid() const
Definition: HcalUMNioDigi.h:31
uint32_t eventNumber() const
std::vector< uint16_t > payload_
Definition: HcalUMNioDigi.h:41
uint32_t valueUserWord(int iword) const
uint8_t eventType() const
uint16_t bunchNumber() const
Definition: value.py:1
uint16_t idUserWord(int iword) const
bool hasUserWord(int id) const
std::ostream & operator<<(std::ostream &, const HcalUMNioDigi &)
uint32_t orbitNumber() const
int numberUserWords() const
uint16_t spillCounter() const
uint32_t runNumber() const