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  HcalUMNioDigi();
18  HcalUMNioDigi(const uint16_t* ptr, int words);
19  HcalUMNioDigi(const std::vector<uint16_t>& words);
20 
21  uint32_t runNumber() const;
22  uint32_t orbitNumber() const;
23  uint16_t bunchNumber() const;
24  uint32_t eventNumber() const;
25 
26  uint8_t eventType() const;
27  uint16_t spillCounter() const;
28  bool isSpill() const;
29 
30  bool invalid() const { return (payload_.size() < 16) || (payload_[6] & 0xF000) != 0x2000; }
31 
32  int numberUserWords() const;
33  uint16_t idUserWord(int iword) const;
34  uint32_t valueUserWord(int iword) const;
35  bool hasUserWord(int id) const;
36  uint32_t getUserWord(int id) const;
37  bool getUserWord(int id, uint32_t& value) const;
38 
39 private:
40  std::vector<uint16_t> payload_;
41 };
42 
43 std::ostream& operator<<(std::ostream&, const HcalUMNioDigi&);
44 
45 #endif
HcalUMNioDigi::eventType
uint8_t eventType() const
Definition: HcalUMNioDigi.cc:35
HcalUMNioDigi::invalid
bool invalid() const
Definition: HcalUMNioDigi.h:30
HcalUMNioDigi::idUserWord
uint16_t idUserWord(int iword) const
Definition: HcalUMNioDigi.cc:57
HcalUMNioDigi::bunchNumber
uint16_t bunchNumber() const
Definition: HcalUMNioDigi.cc:24
HcalUMNioDigi::orbitNumber
uint32_t orbitNumber() const
Definition: HcalUMNioDigi.cc:19
HcalUMNioDigi::valueUserWord
uint32_t valueUserWord(int iword) const
Definition: HcalUMNioDigi.cc:62
HcalUMNioDigi::numberUserWords
int numberUserWords() const
Definition: HcalUMNioDigi.cc:51
HcalUMNioDigi
Definition: HcalUMNioDigi.h:15
HcalUMNioDigi::payload_
std::vector< uint16_t > payload_
Definition: HcalUMNioDigi.h:40
HcalUMNioDigi::isSpill
bool isSpill() const
Definition: HcalUMNioDigi.cc:45
value
Definition: value.py:1
operator<<
std::ostream & operator<<(std::ostream &, const HcalUMNioDigi &)
Definition: HcalUMNioDigi.cc:90
HcalUMNioDigi::eventNumber
uint32_t eventNumber() const
Definition: HcalUMNioDigi.cc:29
HcalUMNioDigi::hasUserWord
bool hasUserWord(int id) const
Definition: HcalUMNioDigi.cc:67
HcalUMNioDigi::HcalUMNioDigi
HcalUMNioDigi()
Definition: HcalUMNioDigi.cc:4
HcalUMNioDigi::runNumber
uint32_t runNumber() const
Definition: HcalUMNioDigi.cc:13
HcalUMNioDigi::spillCounter
uint16_t spillCounter() const
Definition: HcalUMNioDigi.cc:40
HcalUMNioDigi::getUserWord
uint32_t getUserWord(int id) const
Definition: HcalUMNioDigi.cc:71