LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ldmx::EcalDigiCollection Class Reference

Represents a collection of the ECal digi hits. More...

#include <EcalDigiCollection.h>

Public Member Functions

 EcalDigiCollection ()
 Class constructor.
 
virtual ~EcalDigiCollection ()
 Class destructor.
 
void Clear ()
 Clear the data in the object.
 
void Print () const
 Print out the object.
 
unsigned int getNumSamplesPerDigi () const
 Get number of samples per digi.
 
void setNumSamplesPerDigi (unsigned int n)
 Set number of samples for each digi.
 
unsigned int getSampleOfInterestIndex () const
 Get index of sample of interest.
 
void setSampleOfInterestIndex (unsigned int n)
 Set index of sample of interest.
 
std::vector< EcalDigiSamplegetDigi (unsigned int digiIndex) const
 Get samples for the input digi index.
 
unsigned int getNumDigis () const
 Get total number of digis.
 
void addDigi (std::vector< EcalDigiSample > newSamples)
 Translate and add samples to collection.
 

Private Member Functions

 ClassDef (EcalDigiCollection, 1)
 The ROOT class definition.
 

Private Attributes

std::vector< int > channelIDs_
 list of channel IDs that we have digis for
 
std::vector< int32_t > samples_
 list of samples that we have been given
 
unsigned int numSamplesPerDigi_ {1}
 number of samples for each digi
 
unsigned int sampleOfInterest_ {0}
 index for the sample of interest in the samples list
 

Static Private Attributes

static const int ONE_BIT_MASK = 1
 Mask for lowest order bit in an int.
 
static const int TEN_BIT_MASK = (1 << 10) - 1
 Mask for lowest order ten bits in an int.
 
static const int FIRSTFLAG_POS = 31
 Bit position of first flag.
 
static const int SECONFLAG_POS = 30
 Bit position of second flag.
 
static const int FIRSTMEAS_POS = 20
 Bit position of first measurement.
 
static const int SECONMEAS_POS = 10
 Bit position of second measurement.
 

Detailed Description

Represents a collection of the ECal digi hits.

Note
This class represents the digitized signal information in the form of a series of samples for each channel of readout. Each channel is represented by an ID integer and each sample is a 32-bit word. The number of samples for each digi is configurable, but is required to be the same for all channels.

Each digi corresponds to a one channel ID and numSamplesPerDigi_ samples.

Definition at line 58 of file EcalDigiCollection.h.

Constructor & Destructor Documentation

◆ EcalDigiCollection()

ldmx::EcalDigiCollection::EcalDigiCollection ( )
inline

Class constructor.

Definition at line 63 of file EcalDigiCollection.h.

63{}

◆ ~EcalDigiCollection()

virtual ldmx::EcalDigiCollection::~EcalDigiCollection ( )
inlinevirtual

Class destructor.

Definition at line 68 of file EcalDigiCollection.h.

68{}

Member Function Documentation

◆ Clear()

void ldmx::EcalDigiCollection::Clear ( )

Clear the data in the object.

Clears the vectors of channel IDs and samples, but does not change the number of samples per digi setting.

◆ getNumDigis()

unsigned int ldmx::EcalDigiCollection::getNumDigis ( ) const
inline

Get total number of digis.

Definition at line 120 of file EcalDigiCollection.h.

120{ return channelIDs_.size(); }
std::vector< int > channelIDs_
list of channel IDs that we have digis for

References channelIDs_.

◆ getNumSamplesPerDigi()

unsigned int ldmx::EcalDigiCollection::getNumSamplesPerDigi ( ) const
inline

Get number of samples per digi.

Definition at line 89 of file EcalDigiCollection.h.

89{ return numSamplesPerDigi_; }
unsigned int numSamplesPerDigi_
number of samples for each digi

References numSamplesPerDigi_.

◆ getSampleOfInterestIndex()

unsigned int ldmx::EcalDigiCollection::getSampleOfInterestIndex ( ) const
inline

Get index of sample of interest.

Definition at line 102 of file EcalDigiCollection.h.

102{ return sampleOfInterest_; }
unsigned int sampleOfInterest_
index for the sample of interest in the samples list

References sampleOfInterest_.

◆ Print()

void ldmx::EcalDigiCollection::Print ( ) const

Print out the object.

Prints out the lengths of the stored vectors and the number of samples per digi setting.

◆ setNumSamplesPerDigi()

void ldmx::EcalDigiCollection::setNumSamplesPerDigi ( unsigned int  n)
inline

Set number of samples for each digi.

Definition at line 94 of file EcalDigiCollection.h.

94 {
96 return;
97 }

References numSamplesPerDigi_.

◆ setSampleOfInterestIndex()

void ldmx::EcalDigiCollection::setSampleOfInterestIndex ( unsigned int  n)
inline

Set index of sample of interest.

Definition at line 107 of file EcalDigiCollection.h.

107 {
109 return;
110 }

References sampleOfInterest_.

Member Data Documentation

◆ channelIDs_

std::vector<int> ldmx::EcalDigiCollection::channelIDs_
private

list of channel IDs that we have digis for

Definition at line 148 of file EcalDigiCollection.h.

Referenced by getNumDigis().

◆ FIRSTFLAG_POS

const int ldmx::EcalDigiCollection::FIRSTFLAG_POS = 31
staticprivate

Bit position of first flag.

Definition at line 135 of file EcalDigiCollection.h.

◆ FIRSTMEAS_POS

const int ldmx::EcalDigiCollection::FIRSTMEAS_POS = 20
staticprivate

Bit position of first measurement.

Definition at line 141 of file EcalDigiCollection.h.

◆ numSamplesPerDigi_

unsigned int ldmx::EcalDigiCollection::numSamplesPerDigi_ {1}
private

number of samples for each digi

Definition at line 154 of file EcalDigiCollection.h.

154{1};

Referenced by getNumSamplesPerDigi(), and setNumSamplesPerDigi().

◆ ONE_BIT_MASK

const int ldmx::EcalDigiCollection::ONE_BIT_MASK = 1
staticprivate

Mask for lowest order bit in an int.

Definition at line 129 of file EcalDigiCollection.h.

◆ sampleOfInterest_

unsigned int ldmx::EcalDigiCollection::sampleOfInterest_ {0}
private

index for the sample of interest in the samples list

Definition at line 157 of file EcalDigiCollection.h.

157{0};

Referenced by getSampleOfInterestIndex(), and setSampleOfInterestIndex().

◆ samples_

std::vector<int32_t> ldmx::EcalDigiCollection::samples_
private

list of samples that we have been given

Definition at line 151 of file EcalDigiCollection.h.

◆ SECONFLAG_POS

const int ldmx::EcalDigiCollection::SECONFLAG_POS = 30
staticprivate

Bit position of second flag.

Definition at line 138 of file EcalDigiCollection.h.

◆ SECONMEAS_POS

const int ldmx::EcalDigiCollection::SECONMEAS_POS = 10
staticprivate

Bit position of second measurement.

Definition at line 144 of file EcalDigiCollection.h.

◆ TEN_BIT_MASK

const int ldmx::EcalDigiCollection::TEN_BIT_MASK = (1 << 10) - 1
staticprivate

Mask for lowest order ten bits in an int.

Definition at line 132 of file EcalDigiCollection.h.


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