19 std::cout <<
"EcalDigiCollection { Num Channel IDs: " <<
channelIDs_.size()
20 <<
", Num Samples: " <<
samples_.size()
28 unsigned int digiIndex)
const {
29 std::vector<EcalDigiSample> digi;
30 for (
unsigned int sampleIndex = 0;
32 EcalDigiSample sample;
47 sample.adc_t_ = firstMeas;
48 sample.tot_ = seconMeas;
49 sample.toa_ = lastMeas;
50 sample.adc_tm1_ = -99;
52 digi.push_back(sample);
59 if (newSamples.size() != this->getNumSamplesPerDigi()) {
61 <<
"[ WARN ] [ EcalDigiCollection ] Input list of samples has size '"
63 <<
"' that does not match the number of samples per digi '"
68 int channelID = newSamples.at(0).rawID_;
71 for (
auto const &sample : newSamples) {
Class that represents a digitized hit in a calorimeter cell within the ECal.
Represents a collection of the ECal digi hits.
std::vector< EcalDigiSample > getDigi(unsigned int digiIndex) const
Get samples for the input digi index.
void addDigi(std::vector< EcalDigiSample > newSamples)
Translate and add samples to collection.
unsigned int sampleOfInterest_
index for the sample of interest in the samples list
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
static const int SECONFLAG_POS
Bit position of second flag.
static const int TEN_BIT_MASK
Mask for lowest order ten bits in an int.
static const int FIRSTFLAG_POS
Bit position of first flag.
unsigned int numSamplesPerDigi_
number of samples for each digi
static const int SECONMEAS_POS
Bit position of second measurement.
static const int FIRSTMEAS_POS
Bit position of first measurement.
void Print() const
Print out the object.
void Clear()
Clear the data in the object.
unsigned int getNumSamplesPerDigi() const
Get number of samples per digi.