CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Types | Public Member Functions | Private Types | Private Attributes
HGCalECONDEmulatorInfo Class Reference

#include <HGCalRawDataEmulatorInfo.h>

Public Types

enum  HGCROCEventRecoStatus {
  PerfectReco = 0, GoodReco = 1, FailedReco = 2, AmbiguousReco = 3,
  PerfectReco = 0, GoodReco = 1, FailedReco = 2, AmbiguousReco = 3
}
 
enum  HGCROCEventRecoStatus {
  PerfectReco = 0, GoodReco = 1, FailedReco = 2, AmbiguousReco = 3,
  PerfectReco = 0, GoodReco = 1, FailedReco = 2, AmbiguousReco = 3
}
 

Public Member Functions

void addChannelsEnable (uint64_t poi)
 
void addERxChannelsEnable (const std::vector< bool > &)
 
bool bitB () const
 
bool bitB () const
 
bool bitE () const
 
bool bitE () const
 
bool bitH () const
 
bool bitH () const
 
bool bitO () const
 
bool bitO () const
 
bool bitS () const
 
bool bitS () const
 
bool bitT () const
 
bool bitT () const
 
std::vector< bool > channelsEnabled (size_t ch_id) const
 
std::vector< bool > channelsEnabled (size_t) const
 
void clear ()
 
HGCROCEventRecoStatus eventRecoStatus () const
 
HGCROCEventRecoStatus eventRecoStatus () const
 
 HGCalECONDEmulatorInfo ()=default
 
 HGCalECONDEmulatorInfo (bool obit, bool bbit, bool ebit, bool tbit, bool hbit, bool sbit, std::vector< uint64_t > enabled_channels={})
 
 HGCalECONDEmulatorInfo ()=default
 
 HGCalECONDEmulatorInfo (bool, bool, bool, bool, bool, bool, const std::vector< std::vector< bool > > &={})
 

Private Types

enum  StatusBits {
  O = 0, B, E, T,
  H, S, O = 0, B,
  E, T, H, S
}
 
enum  StatusBits {
  O = 0, B, E, T,
  H, S, O = 0, B,
  E, T, H, S
}
 

Private Attributes

std::vector< std::vector< bool > > erx_pois_
 
std::bitset< 6 > header_bits_
 
std::vector< std::bitset< 37 > > pois_
 

Detailed Description

Short summary of the truth information when an ECON-D data frame is generated

Note
It can be used to check that the unpacking outputs match the main fields. For the moment it stores information on the error bits and channel status

Definition at line 20 of file HGCalRawDataEmulatorInfo.h.

Member Enumeration Documentation

◆ HGCROCEventRecoStatus [1/2]

Enumerator
PerfectReco 
GoodReco 
FailedReco 
AmbiguousReco 
PerfectReco 
GoodReco 
FailedReco 
AmbiguousReco 

Definition at line 30 of file HGCalRawDataEmulatorInfo.h.

◆ HGCROCEventRecoStatus [2/2]

Enumerator
PerfectReco 
GoodReco 
FailedReco 
AmbiguousReco 
PerfectReco 
GoodReco 
FailedReco 
AmbiguousReco 

Definition at line 30 of file HGCalECONDEmulatorInfo.h.

◆ StatusBits [1/2]

◆ StatusBits [2/2]

Constructor & Destructor Documentation

◆ HGCalECONDEmulatorInfo() [1/4]

HGCalECONDEmulatorInfo::HGCalECONDEmulatorInfo ( )
default

◆ HGCalECONDEmulatorInfo() [2/4]

HGCalECONDEmulatorInfo::HGCalECONDEmulatorInfo ( bool  obit,
bool  bbit,
bool  ebit,
bool  tbit,
bool  hbit,
bool  sbit,
const std::vector< std::vector< bool > > &  enabled_channels = {} 
)
explicit

Definition at line 16 of file HGCalRawDataEmulatorInfo.cc.

References B, erx_pois_, data-class-funcs::H, and header_bits_.

22  {
23  header_bits_[StatusBits::O] = obit;
25  header_bits_[StatusBits::E] = ebit;
28  header_bits_[StatusBits::S] = sbit;
29  for (const auto& ch_en : enabled_channels)
30  erx_pois_.emplace_back(ch_en);
31 }
Definition: APVGainStruct.h:7
std::vector< std::vector< bool > > erx_pois_
long double T

◆ HGCalECONDEmulatorInfo() [3/4]

HGCalECONDEmulatorInfo::HGCalECONDEmulatorInfo ( )
default

◆ HGCalECONDEmulatorInfo() [4/4]

HGCalECONDEmulatorInfo::HGCalECONDEmulatorInfo ( bool  obit,
bool  bbit,
bool  ebit,
bool  tbit,
bool  hbit,
bool  sbit,
std::vector< uint64_t >  enabled_channels = {} 
)
inlineexplicit

Definition at line 10 of file HGCalECONDEmulatorInfo.h.

11  {}) {
12  header_bits_[StatusBits::O] = obit;
14  header_bits_[StatusBits::E] = ebit;
17  header_bits_[StatusBits::S] = sbit;
18  for (const auto& ch_en : enabled_channels)
19  pois_.emplace_back(ch_en);
20  }
Definition: APVGainStruct.h:7
std::vector< std::bitset< 37 > > pois_
long double T

Member Function Documentation

◆ addChannelsEnable()

void HGCalECONDEmulatorInfo::addChannelsEnable ( uint64_t  poi)
inline

Definition at line 22 of file HGCalECONDEmulatorInfo.h.

References pois_.

22 { pois_.emplace_back(poi); }
std::vector< std::bitset< 37 > > pois_

◆ addERxChannelsEnable()

void HGCalECONDEmulatorInfo::addERxChannelsEnable ( const std::vector< bool > &  erx_channels_poi)

Definition at line 38 of file HGCalRawDataEmulatorInfo.cc.

References erx_pois_.

38  {
39  erx_pois_.emplace_back(erx_channels_poi);
40 }
std::vector< std::vector< bool > > erx_pois_

◆ bitB() [1/2]

bool HGCalECONDEmulatorInfo::bitB ( ) const
inline

Definition at line 34 of file HGCalRawDataEmulatorInfo.h.

References B, and header_bits_.

34 { return header_bits_.test(StatusBits::B); }
Definition: APVGainStruct.h:7

◆ bitB() [2/2]

bool HGCalECONDEmulatorInfo::bitB ( ) const
inline

Definition at line 34 of file HGCalECONDEmulatorInfo.h.

References B, and header_bits_.

34 { return header_bits_.test(StatusBits::B); }
Definition: APVGainStruct.h:7

◆ bitE() [1/2]

bool HGCalECONDEmulatorInfo::bitE ( ) const
inline

Definition at line 35 of file HGCalECONDEmulatorInfo.h.

References header_bits_.

35 { return header_bits_.test(StatusBits::E); }

◆ bitE() [2/2]

bool HGCalECONDEmulatorInfo::bitE ( ) const
inline

Definition at line 35 of file HGCalRawDataEmulatorInfo.h.

References header_bits_.

35 { return header_bits_.test(StatusBits::E); }

◆ bitH() [1/2]

bool HGCalECONDEmulatorInfo::bitH ( ) const
inline

Definition at line 37 of file HGCalECONDEmulatorInfo.h.

References data-class-funcs::H, and header_bits_.

◆ bitH() [2/2]

bool HGCalECONDEmulatorInfo::bitH ( ) const
inline

Definition at line 37 of file HGCalRawDataEmulatorInfo.h.

References data-class-funcs::H, and header_bits_.

Referenced by eventRecoStatus().

◆ bitO() [1/2]

bool HGCalECONDEmulatorInfo::bitO ( ) const
inline

Definition at line 33 of file HGCalRawDataEmulatorInfo.h.

References header_bits_.

33 { return header_bits_.test(StatusBits::O); }

◆ bitO() [2/2]

bool HGCalECONDEmulatorInfo::bitO ( ) const
inline

Definition at line 33 of file HGCalECONDEmulatorInfo.h.

References header_bits_.

33 { return header_bits_.test(StatusBits::O); }

◆ bitS() [1/2]

bool HGCalECONDEmulatorInfo::bitS ( ) const
inline

Definition at line 38 of file HGCalECONDEmulatorInfo.h.

References header_bits_.

38 { return header_bits_.test(StatusBits::S); }

◆ bitS() [2/2]

bool HGCalECONDEmulatorInfo::bitS ( ) const
inline

Definition at line 38 of file HGCalRawDataEmulatorInfo.h.

References header_bits_.

38 { return header_bits_.test(StatusBits::S); }

◆ bitT() [1/2]

bool HGCalECONDEmulatorInfo::bitT ( ) const
inline

Definition at line 36 of file HGCalECONDEmulatorInfo.h.

References header_bits_.

36 { return header_bits_.test(StatusBits::T); }
long double T

◆ bitT() [2/2]

bool HGCalECONDEmulatorInfo::bitT ( ) const
inline

Definition at line 36 of file HGCalRawDataEmulatorInfo.h.

References header_bits_.

Referenced by eventRecoStatus().

36 { return header_bits_.test(StatusBits::T); }
long double T

◆ channelsEnabled() [1/2]

std::vector<bool> HGCalECONDEmulatorInfo::channelsEnabled ( size_t  ch_id) const
inline

Definition at line 23 of file HGCalECONDEmulatorInfo.h.

References pois_.

23  {
24  std::vector<bool> ch_en;
25  for (const auto& poi : pois_)
26  ch_en.emplace_back(poi.test(ch_id));
27  return ch_en;
28  }
std::vector< std::bitset< 37 > > pois_

◆ channelsEnabled() [2/2]

std::vector< bool > HGCalECONDEmulatorInfo::channelsEnabled ( size_t  ch_id) const

Definition at line 42 of file HGCalRawDataEmulatorInfo.cc.

References erx_pois_.

42  {
43  std::vector<bool> ch_en;
44  ch_en.reserve(erx_pois_.size());
45  for (const auto& erx_channels_poi : erx_pois_)
46  ch_en.emplace_back(erx_channels_poi.at(ch_id));
47  return ch_en;
48 }
std::vector< std::vector< bool > > erx_pois_

◆ clear()

void HGCalECONDEmulatorInfo::clear ( void  )

Definition at line 33 of file HGCalRawDataEmulatorInfo.cc.

References erx_pois_, and header_bits_.

33  {
34  header_bits_.reset();
35  erx_pois_.clear();
36 }
std::vector< std::vector< bool > > erx_pois_

◆ eventRecoStatus() [1/2]

HGCalECONDEmulatorInfo::HGCROCEventRecoStatus HGCalECONDEmulatorInfo::eventRecoStatus ( ) const

Definition at line 50 of file HGCalRawDataEmulatorInfo.cc.

References bitH(), and bitT().

50  {
51  return static_cast<HGCROCEventRecoStatus>(bitH() << 1 | bitT());
52 }

◆ eventRecoStatus() [2/2]

HGCROCEventRecoStatus HGCalECONDEmulatorInfo::eventRecoStatus ( ) const
inline

Definition at line 31 of file HGCalECONDEmulatorInfo.h.

References bitH(), and bitT().

Member Data Documentation

◆ erx_pois_

std::vector<std::vector<bool> > HGCalECONDEmulatorInfo::erx_pois_
private

◆ header_bits_

std::bitset< 6 > HGCalECONDEmulatorInfo::header_bits_
private

Definition at line 42 of file HGCalRawDataEmulatorInfo.h.

Referenced by bitB(), bitE(), bitH(), bitO(), bitS(), bitT(), clear(), and HGCalECONDEmulatorInfo().

◆ pois_

std::vector<std::bitset<37> > HGCalECONDEmulatorInfo::pois_
private

Definition at line 43 of file HGCalECONDEmulatorInfo.h.

Referenced by addChannelsEnable(), and channelsEnabled().