CMS 3D CMS Logo

HGCalRawDataEmulatorInfo.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of HGCAL offline software.
4  * Authors:
5  * Laurent Forthomme, CERN
6  * Pedro Silva, CERN
7  *
8  ****************************************************************************/
9 
10 #ifndef DataFormats_HGCalDigi_HGCalRawDataEmulatorInfo_h
11 #define DataFormats_HGCalDigi_HGCalRawDataEmulatorInfo_h
12 
13 #include <bitset>
14 #include <unordered_map>
15 #include <vector>
16 
21 public:
22  HGCalECONDEmulatorInfo() = default;
23  explicit HGCalECONDEmulatorInfo(bool, bool, bool, bool, bool, bool, const std::vector<std::vector<bool> >& = {});
24 
25  void clear();
26 
27  void addERxChannelsEnable(const std::vector<bool>&);
28  std::vector<bool> channelsEnabled(size_t) const;
29 
32 
33  bool bitO() const { return header_bits_.test(StatusBits::O); }
34  bool bitB() const { return header_bits_.test(StatusBits::B); }
35  bool bitE() const { return header_bits_.test(StatusBits::E); }
36  bool bitT() const { return header_bits_.test(StatusBits::T); }
37  bool bitH() const { return header_bits_.test(StatusBits::H); }
38  bool bitS() const { return header_bits_.test(StatusBits::S); }
39 
40 private:
41  enum StatusBits { O = 0, B, E, T, H, S };
42  std::bitset<6> header_bits_;
43  std::vector<std::vector<bool> > erx_pois_;
44 };
45 
48 public:
50 
51  inline void clear() { econd_info_.clear(); }
52 
53  void addECONDEmulatedInfo(unsigned int, const HGCalECONDEmulatorInfo&);
54 
55 private:
56  std::unordered_map<unsigned int, HGCalECONDEmulatorInfo> econd_info_;
57 };
58 
61 public:
62  HGCalSlinkEmulatorInfo() = default;
63 
64  inline void clear() { cb_info_.clear(); }
65 
68 
69 private:
70  std::unordered_map<unsigned int, HGCalCaptureBlockEmulatorInfo> cb_info_;
71 };
72 
73 #endif
std::unordered_map< unsigned int, HGCalECONDEmulatorInfo > econd_info_
Definition: APVGainStruct.h:7
HGCalSlinkEmulatorInfo()=default
std::vector< std::vector< bool > > erx_pois_
HGCalCaptureBlockEmulatorInfo & captureBlockEmulatedInfo(unsigned int)
std::vector< bool > channelsEnabled(size_t) const
std::unordered_map< unsigned int, HGCalCaptureBlockEmulatorInfo > cb_info_
HGCROCEventRecoStatus eventRecoStatus() const
void addERxChannelsEnable(const std::vector< bool > &)
Map of capture block emulator truth information within a S-link payload.
HGCalECONDEmulatorInfo()=default
void addECONDEmulatedInfo(unsigned int, const HGCalECONDEmulatorInfo &)
Map of ECON-D emulator truth information within a capture block.
void addCaptureBlockEmulatedInfo(unsigned int, const HGCalCaptureBlockEmulatorInfo &)
long double T