 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/FrameworkExceptions.h>
14 #include <framework/core/Module.h>
15 #include <framework/datastore/StoreArray.h>
18 #include <ecl/utility/ECLChannelMapper.h>
27 ECL_ADC_SAMPLES_PER_CHANNEL = 31
38 class ECLPackerModule :
public Module {
41 virtual ~ECLPackerModule();
48 virtual void event()
override;
50 virtual void endRun()
override;
56 "Error packing adc samples to buffer");
59 "Something wrong with ECL Packer");
99 unsigned int adcBuffer_temp[ECL::ECL_CHANNELS_IN_SHAPER * ECL_ADC_SAMPLES_PER_CHANNEL];
105 int shaperMaskArray[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE];
109 int shaperNWaveform[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE];
111 int shaperNHits[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE];
124 void writeNBits(
unsigned int* buff,
unsigned int value,
unsigned int bitsToWrite);
StoreArray< RawECL > m_eclRawCOPPERs
Output data
int m_bufPos
position in the data array
virtual void event() override
event
bool m_compressMode
eneble/disable compression of waveform data
int shaperNWaveform[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE]
Number of waveforms per shaper.
int shaperNHits[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE]
Number of hits per shaper.
int iEclWfIndices[ECL::ECL_TOTAL_CHANNELS]
indexes of related waveforms
unsigned int adcBuffer_temp[ECL::ECL_CHANNELS_IN_SHAPER *ECL_ADC_SAMPLES_PER_CHANNEL]
temporary buffer to store ADC data
void setBuffLength(int bufLength)
set buffer length
BELLE2_DEFINE_EXCEPTION(Write_adc_samples_error, "Error packing adc samples to buffer")
exception for errors during packing ADC data buffer
void writeNBits(unsigned int *buff, unsigned int value, unsigned int bitsToWrite)
write N bits to the collector buffer
int m_EvtNum
Event number.
int m_EclWaveformSamples[ECL_ADC_SAMPLES_PER_CHANNEL]
array of ADC samples
virtual void endRun() override
endRun
int m_bitPos
bit position for bit-by-bit data read
int iEclDigIndices[ECL::ECL_TOTAL_CHANNELS]
indexes of related eclDigits
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
int shaperMaskArray[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE]
triggered shapers
Abstract base class for different kinds of events.
virtual void beginRun() override
beginRun
ECL::ECLChannelMapper m_eclMapper
channel mapper
std::string m_eclRawCOPPERsName
name of output collection for RawCOPPER
void resetBuffPosition()
reset current position in the buffer
StoreArray< ECLDsp > m_eclDsps
ECLDSP dataStore object.
int shaperADCMaskArray[ECL::ECL_CRATES][ECL::ECL_BARREL_SHAPERS_IN_CRATE]
shapers with ADC data
std::string m_eclMapperInitFileName
name of the file with correspondence between cellID and crate/shaper/channel numbers
Accessor to arrays stored in the data store.
int m_WaveformRareFactor
the rate of writing of the ADC samples
int m_ampThreshold
DSP amplitude threshold.
virtual void initialize() override
initialize
int m_bufLength
length data
virtual void terminate() override
terminate
int collectorMaskArray[ECL::ECL_CRATES]
array of triggered collectors
StoreArray< ECLDigit > m_eclDigits
ECLDigit dataStore object.