 |
Belle II Software
release-05-02-19
|
14 #include <klm/dataobjects/eklm/EKLMElementNumbers.h>
15 #include <klm/dataobjects/KLMDigit.h>
16 #include <klm/dataobjects/KLMDigitEventInfo.h>
17 #include <klm/dataobjects/KLMDigitRaw.h>
18 #include <klm/dataobjects/KLMElementNumbers.h>
19 #include <klm/dbobjects/bklm/BKLMADCThreshold.h>
20 #include <klm/dbobjects/eklm/EKLMChannels.h>
21 #include <klm/dbobjects/KLMElectronicsMap.h>
22 #include <klm/dbobjects/KLMTimeConversion.h>
25 #include <framework/core/Module.h>
26 #include <framework/database/DBObjPtr.h>
27 #include <framework/datastore/StoreArray.h>
28 #include <rawdata/dataobjects/RawKLM.h>
45 class KLMUnpackerModule :
public Module {
72 virtual void event()
override;
77 virtual void endRun()
override;
102 int sector,
int layer,
int plane,
int strip,
int lastStrip);
void unpackKLMDigit(const int *rawData, int copper, int hslb, int daqSubdetector, KLMDigitEventInfo *klmDigitEventInfo)
Unpack KLM digit.
virtual void beginRun() override
Called when entering a new run.
bool m_IgnoreWrongHits
Do not issue B2ERROR on wrong hits, with certain firmware versions wrong strip numbers are expected.
StoreArray< RawKLM > m_RawKLMs
Raw data.
bool m_DebugElectronicsMap
Debug electronics map (record DAQ channel instead of strip).
DBObjPtr< BKLMADCThreshold > m_bklmADCParams
ADC offset and threshold read from database.
virtual void endRun() override
This method is called if the current run ends.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
Class for accessing objects in the database.
Class to store debugging informations from the unpacker (event based).
unsigned int m_triggerCTimeOfPreviousEvent
Trigger ctime of the previous event.
StoreArray< KLMDigitRaw > m_klmDigitRaws
Raw digits.
KLMUnpackerModule()
Constructor.
bool m_IgnoreStrip0
Ignore hits with strip = 0.
virtual void initialize() override
Initializer.
DBObjPtr< EKLMChannels > m_eklmChannels
Channels.
virtual void terminate() override
This method is called at the end of the event processing.
Abstract base class for different kinds of events.
DBObjPtr< KLMTimeConversion > m_TimeConversion
Time conversion.
bool m_WriteDigitRaws
Record raw data in dataobject format (for debugging).
StoreArray< KLMDigitEventInfo > m_DigitEventInfos
Event information.
bool m_keepEvenPackages
The flag to keep the even packages.
Class to store the raw words from the unpacker, digit-by-digit.
virtual void event() override
This method is called for each event.
void convertPCIe40ToCOPPER(int channel, unsigned int *copper, int *hslb) const
Map a PCIe40 channel to the old and corresponding (COPPER, HSLB) address.
StoreArray< KLMDigit > m_Digits
Digits.
virtual ~KLMUnpackerModule()
Destructor.
bool m_WriteWrongHits
Record wrong hits (for debugging).
void createDigit(const KLM::RawData *raw, const KLMDigitRaw *klmDigitRaw, KLMDigitEventInfo *klmDigitEventInfo, int Subdetector, int section, int sector, int layer, int plane, int strip, int lastStrip)
Create KLM digit.
bool m_DAQChannelBKLMScintillators
Record DAQ channel for BKLM scintillators.
double m_scintThreshold
Threshold for the scintillator NPhotoelectrons .
Accessor to arrays stored in the data store.
DBObjPtr< KLMElectronicsMap > m_ElectronicsMap
Electronics map.
bool m_loadThresholdFromDB
Load threshold from DataBase (true) or not (false).
const EKLMElementNumbers * m_eklmElementNumbers
Element numbers.
int m_DAQChannelModule
Record DAQ channel for specific module.
std::string m_outputKLMDigitsName
Name of KLMDigit store array.
StoreArray< KLMDigit > m_klmDigitsOutOfRange
Out-of-range digits.