HerdSoftware  0.1.1
Public Types | Public Member Functions | Private Attributes | List of all members
Herd::CaloPDEventChannelInfo Class Reference

Data structure for information regarding a channel connected to a Calo photodiode. More...

#include <dataobjects/CaloPDEventChannelInfo.h>

Public Types

enum  Flag : unsigned short { Flag::NONE = 0, Flag::HIGHGAIN = 1, Flag::SATURATED = 1 << 1, Flag::INFOVALID = 1 << 15 }
 Enum used as index for the bitset member LSB rappresents the Gain: 1 -> high gain; 0 -> low gain. bit 1: rappresents the saturation 0 -> low gain is not saturated; 1 -> low gain is saturated. bit 15: 1 -> this channel info is valid and can be written inside the output file; 0 -> this channel info is not valid, can not be written inside the output file. All common bitmask operations are defined for this type. See here (TODO: insert link) for info on how to use type-safe bitmasks. More...
 

Public Member Functions

 CaloPDEventChannelInfo ()
 Default constructor with the number of channels = 0. More...
 
 CaloPDEventChannelInfo (unsigned int nChannels)
 Constructor. More...
 
virtual ~CaloPDEventChannelInfo ()=default
 Virtual destructor. More...
 
void SetNChannels (size_t nChannels)
 Setup the total number of channels and initialize the values. More...
 
Flag StatusFlags (unsigned int volID) const
 Return the binary code which contains all the flags corresponding to the ID. More...
 
void SetStatusFlags (unsigned int volID, Flag channelInfoStatusFlags)
 Set the entire binary corresponding to this ID. More...
 

Private Attributes

std::vector< Flag_channelInfoStatusFlags
 binary code use to store some information More...
 

Detailed Description

Data structure for information regarding a channel connected to a Calo photodiode.

Member Enumeration Documentation

◆ Flag

enum Herd::CaloPDEventChannelInfo::Flag : unsigned short
strong

Enum used as index for the bitset member LSB rappresents the Gain: 1 -> high gain; 0 -> low gain. bit 1: rappresents the saturation 0 -> low gain is not saturated; 1 -> low gain is saturated. bit 15: 1 -> this channel info is valid and can be written inside the output file; 0 -> this channel info is not valid, can not be written inside the output file. All common bitmask operations are defined for this type. See here (TODO: insert link) for info on how to use type-safe bitmasks.

Enumerator
NONE 
HIGHGAIN 
SATURATED 
INFOVALID 

Constructor & Destructor Documentation

◆ CaloPDEventChannelInfo() [1/2]

Herd::CaloPDEventChannelInfo::CaloPDEventChannelInfo ( )
inline

Default constructor with the number of channels = 0.

◆ CaloPDEventChannelInfo() [2/2]

Herd::CaloPDEventChannelInfo::CaloPDEventChannelInfo ( unsigned int  nChannels)
inline

Constructor.

Parameters
nChannelsnumber of channels, i.e. number of PD.

◆ ~CaloPDEventChannelInfo()

virtual Herd::CaloPDEventChannelInfo::~CaloPDEventChannelInfo ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ SetNChannels()

void Herd::CaloPDEventChannelInfo::SetNChannels ( size_t  nChannels)
inline

Setup the total number of channels and initialize the values.

Parameters
nChannelsNumber of channels.

◆ SetStatusFlags()

void Herd::CaloPDEventChannelInfo::SetStatusFlags ( unsigned int  volID,
Flag  channelInfoStatusFlags 
)

Set the entire binary corresponding to this ID.

Parameters
volIDVolume identifier.
channelInfoStatusFlagsBinary code which contains all the flags.

◆ StatusFlags()

Flag Herd::CaloPDEventChannelInfo::StatusFlags ( unsigned int  volID) const
inline

Return the binary code which contains all the flags corresponding to the ID.

Parameters
volIDVolume identifier.
Returns
binary code.

Member Data Documentation

◆ _channelInfoStatusFlags

std::vector<Flag> Herd::CaloPDEventChannelInfo::_channelInfoStatusFlags
private

binary code use to store some information

Some channel information written in binary code


The documentation for this class was generated from the following files: