 |
Belle II Software
release-05-02-19
|
13 #include <framework/datastore/StoreArray.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <framework/core/FrameworkExceptions.h>
17 #include <framework/core/Module.h>
18 #include <framework/datastore/RelationArray.h>
21 #include <ecl/utility/ECLChannelMapper.h>
22 #include <ecl/dataobjects/ECLTrig.h>
39 class ECLUnpackerModule :
public Module {
51 virtual void event()
override;
53 virtual void endRun()
override;
59 "Unexpected end of the FINESS buffer is reached while reading ShpaerDSP data");
117 void doTagsReport(
unsigned int iCrate,
int tag0,
int tag1);
199 bool isDSPValid(
int cellID,
int crate,
int shaper,
int channel,
int amp,
int time,
int quality);
Low-level class to create/modify relations between StoreArrays.
long m_badHeaderReportedMask
report only once per crate about problem with shaper header
ECLUnpack
ECL unpacker run-dependent parameters (per channel)
bool m_useUnpackingParameters
Use ECLUnpackingParameters payload for run-dependent unpacking.
int m_bufPos
position in the COPPER data array
int m_bitPos
bit position for bit-by-bit data read
bool tagsReported(unsigned int iCrate)
Check if the problem with different trigger tags was already reported for crate iCrate.
std::string m_eclDigitsName
name of output collection for ECLDigits
int m_debugLevel
Cached debug level from LogSystem.
@ ECL_OFFLINE_ADC_FIT
Get ECLDigits from offline waveform fit.
StoreArray< ECLDsp > m_eclDsps
store array for waveforms
RelationArray m_relDigitToTrig
ECLDigit->ECLTrig relation array.
long m_evtNumReportedMask
report only once per crate about inconsistency between trg tag and evt number
The Raw ECL class Class for RawCOPPER class data taken by ECL Currently, this class is almost same as...
@ ECL_KEEP_GOOD_DSP_DATA
Keep ECLDigits for quality flag 0 even if ECL_DISCARD_DSP_DATA is set.
virtual void terminate() override
terminate
unsigned int readNBits(int bitsToRead)
rean N bits from COPPER buffer (needed for reading the compressed ADC data)
virtual void endRun() override
endRun
StoreArray< ECLDigit > m_eclDigits
store array for digitized gits
Class for accessing objects in the database.
void doTagsReport(unsigned int iCrate, int tag0, int tag1)
Report the problem with trigger tags and exclude the crate from further reports of this type.
unsigned int * m_bufPtr
pointer to data from COPPER
bool evtNumReported(unsigned int iCrate)
Check if the problem with trg tag <-> evt number inconsistency was already reported for crate iCrate.
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
StoreArray< RawECL > m_rawEcl
store array for RawECL
unsigned int readNextCollectorWord()
read nex word from COPPER data, check if the end of data is reached
bool m_storeUnmapped
flag for whether or not to store ECLDsp data for unmapped channels
Abstract base class for different kinds of events.
StoreObjPtr< EventMetaData > m_eventMetaData
store objptr for EventMetaData
virtual void initialize() override
initialize
Type-safe access to single objects in the data store.
RelationArray m_relDigitToDsp
ECLDigit->ECLTrig relation array.
bool badHeaderReported(unsigned int iCrate)
Check if the problem with bad shaper header was already reported for crate iCrate.
DBObjPtr< ECLChannelMap > m_unpackingParams
Run-dependent unpacking parameters for each channel.
@ ECL_DISCARD_DSP_DATA
Skip ECLDigit unpacking.
int m_localEvtNum
Internally counted event number.
ECL::ECLChannelMapper m_eclMapper
ECL channel mapper.
void doPhasesReport(unsigned int iCrate, int phase0, int phase1)
Report the problem with trigger phases and exclude the crate from further reports of this type.
long m_phasesReportedMask
report only once per crate about problem with different trg phases
std::string m_eclMapperInitFileName
name of the file with correspondence between cellID and crate/shaper/channel numbers
int m_globalEvtNum
event number from EventMetaData
virtual void event() override
event
std::string m_eclDspsName
name of output collection for ECLDsp
void doBadHeaderReport(unsigned int iCrate)
Report the problem with bad shaper header and exclude the crate from further reports of this type.
virtual ~ECLUnpackerModule()
destructor
int m_bufLength
length of COPPER data
StoreArray< ECLTrig > m_eclTrigs
store array for eclTrigs data (trigger time and tag)
void readRawECLData(RawECL *rawCOPPERData, int n)
read raw data from COPPER and fill output m_eclDigits container
Accessor to arrays stored in the data store.
Class to store ECLTrig, still need to be study relation to ECLHit filled in ecl/modules/eclDigitizer/...
virtual void beginRun() override
beginRun
ECLUnpackerModule()
constructor
void doEvtNumReport(unsigned int iCrate, int tag, int evt_number)
Report the problem with inconsistency between trg tag and evt number.
bool m_storeTrigTime
flag for whether or not to store collection with trigger times
ECLTrig m_eclTrigsBuffer[ECL::ECL_CRATES]
ECLTrigs objects before they are added to m_eclTrigs array.
BELLE2_DEFINE_EXCEPTION(Unexpected_end_of_FINESSE_buffer, "Unexpected end of the FINESS buffer is reached while reading ShpaerDSP data")
exeption should be thrown when the unexpected
bool phasesReported(unsigned int iCrate)
Check if the problem with different trigger phases was already reported for crate iCrate.
long m_tagsReportedMask
report only once per crate about problem with different trg tags
bool isDSPValid(int cellID, int crate, int shaper, int channel, int amp, int time, int quality)
Check if DSP data should be saved to datastore.
std::string m_eclTrigsName
name of output collection for ECLTrig