12#include <klm/dataobjects/KLMDigit.h>
13#include <klm/dataobjects/KLMDigitEventInfo.h>
14#include <klm/dataobjects/KLMDigitRaw.h>
15#include <klm/dataobjects/KLMElementNumbers.h>
16#include <klm/dbobjects/KLMElectronicsMap.h>
17#include <klm/dbobjects/KLMScintillatorFEEParameters.h>
18#include <klm/time/KLMTime.h>
21#include <framework/core/Module.h>
22#include <framework/database/DBObjPtr.h>
23#include <framework/datastore/StoreArray.h>
24#include <rawdata/dataobjects/RawKLM.h>
65 void event()
override;
95 int sector,
int layer,
int plane,
int strip,
int lastStrip);
Class for accessing objects in the database.
Class to store debugging information from the unpacker (event based).
Class to store the raw words from the unpacker, digit-by-digit.
DBObjPtr< KLMScintillatorFEEParameters > m_FEEParameters
Scintillator FEE parameters.
unsigned int m_triggerCTimeOfPreviousEvent
Trigger ctime of the previous event.
StoreArray< KLMDigit > m_Digits
Digits.
void initialize() override
Initializer.
void unpackKLMDigit(const int *rawData, int copper, int hslb, int daqSubdetector, KLMDigitEventInfo *klmDigitEventInfo)
Unpack KLM digit.
void event() override
This method is called for each event.
int m_DAQChannelModule
Record DAQ channel for specific module.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
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.
KLMUnpackerModule()
Constructor.
void endRun() override
This method is called if the current run ends.
bool m_WriteWrongHits
Record wrong hits (for debugging).
bool m_IgnoreWrongHits
Do not issue B2ERROR on wrong hits, with certain firmware versions wrong strip numbers are expected.
void terminate() override
This method is called at the end of the event processing.
StoreArray< KLMDigitEventInfo > m_DigitEventInfos
Event information.
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_klmDigitsOutOfRange
Out-of-range digits.
bool m_IgnoreStrip0
Ignore hits with strip = 0.
void beginRun() override
Called when entering a new run.
DBObjPtr< KLMElectronicsMap > m_ElectronicsMap
Electronics map.
StoreArray< RawKLM > m_RawKLMs
Raw data.
bool m_DAQChannelBKLMScintillators
Record DAQ channel for BKLM scintillators.
std::string m_outputKLMDigitsName
Name of KLMDigit store array.
bool m_keepEvenPackages
Flag to keep the even packages.
bool m_WriteDigitRaws
Record raw data in dataobject format (for debugging).
bool m_DebugElectronicsMap
Debug electronics map (record DAQ channel instead of strip).
KLMTime * m_Time
Time conversion.
StoreArray< KLMDigitRaw > m_klmDigitRaws
Raw digits.
~KLMUnpackerModule()
Destructor.
Accessor to arrays stored in the data store.
Abstract base class for different kinds of events.