 |
Belle II Software
release-05-02-19
|
11 #ifndef CDCUnpackerModule_H
12 #define CDCUnpackerModule_H
14 #include <framework/core/Module.h>
15 #include <framework/datastore/StoreArray.h>
16 #include <framework/database/DBArray.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <cdc/dataobjects/CDCHit.h>
19 #include <cdc/dataobjects/CDCRawHit.h>
20 #include <cdc/dataobjects/CDCRawHitWaveForm.h>
21 #include <cdc/dataobjects/WireID.h>
22 #include <cdc/dbobjects/CDCChannelMap.h>
23 #include <cdc/dbobjects/CDCADCDeltaPedestals.h>
24 #include <rawdata/dataobjects/RawCDC.h>
38 class CDCUnpackerModule :
public Module {
67 void event()
override;
85 if ((buf[0] & 0xff000000) == 0x22000000) {
87 }
else if ((buf[0] & 0xff000000) == 0x20000000) {
90 B2ERROR(
"Undefined data type");
254 std::vector<unsigned short>
m_buffer;
358 #endif // CDCUnpackerModule_H
DBObjPtr< CDCADCDeltaPedestals > * m_adcPedestalFromDB
ADC delta pedestal.
void event() override
Event action (main routine).
Class to identify a wire inside the CDC.
StoreArray< CDCRawHitWaveForm > m_CDCRawHitWaveForms
Raw hit waveforms.
DBArray< CDCChannelMap > * m_channelMapFromDB
Channel map retrieved from DB.
bool m_pedestalSubtraction
Whether pedestal is subtracted (true) or not (false).
int m_channelTrig
Channel for the trigger.
WireID getWireID(int iBoard, int iCh) const
Getter of Wire ID.
int m_boardIDTrig
Board ID for the trigger.
int m_version
Format version.
int getDataType()
Getter for CDC data mode.
void endRun() override
End run action.
unsigned short getEWire() const
Getter for encoded wire number.
std::vector< unsigned short > m_buffer
Short ward buffer of CDC event block.
Class for accessing arrays of objects in the database.
void setADCPedestal()
Set DBobject of ADC delta pedestal.
int m_tdcOffset
TDC offset (nsec).
void printBuffer(int *buf, int nwords)
Print out the CDC data block in hex.
std::string m_rawCDCName
Name of the RawCDC dataobject (suppressed mode).
Class for accessing objects in the database.
bool m_dataLengthError
True if data length error has been already reported.
void terminate() override
Termination action.
bool m_enableDatabase
Enable/Disable to read the channel map from the database.
bool m_enableStoreCDCRawHit
Enable/Disable to store CDCRawHit.
virtual ~CDCUnpackerModule()
Destructor of the module.
bool m_enable2ndHit
Enable/Disable to 2nd hit output.
WireID m_map[300][48]
Assignment map of FE board channel to the cell.
bool m_enablePrintOut
Enable/Disable to print out the data to the terminal.
int getTriggerNumber()
Getter for trigger number.
Abstract base class for different kinds of events.
CDCUnpackerModule()
Constructor of the module.
int m_tdcAuxOffset
TDC auxiliary offset (nsec).
StoreArray< CDCRawHit > m_CDCRawHits
Raw hits.
int m_fadcThreshold
FADC threshold.
int getTriggerTime()
Getter for trigger time in nsec.
bool m_subtractTrigTiming
Enable/Disable to subtract the trigger timing from TDCs.
void loadMap()
Load FE channel to cell ID map.
std::string m_cdcRawHitName
Name of the CDCRawHit dataobject (suppressed mode).
void beginRun() override
Begin run action.
bool isValidBoardChannel(WireID wireId)
Check if the hit wire is valid or not.
std::string m_cdcRawHitWaveFormName
Name of the CDCRawHit dataobject (raw data mode).
bool m_dataSizeError
True if data size error between CDCFE and COPPER has been already reported.
int m_dataType
Data type of CDC data block.
int m_boardId
Front end board ID.
Accessor to arrays stored in the data store.
int m_triggerNumber
Trigger number.
void initialize() override
Initializes the Module.
std::string m_xmlMapFileName
Name of the assignment map of FE board channel to the cell.
int m_dataLength
Data length of the CDC data block (in bytes).
std::string m_cdcHitName
Tree name of the CDCHit object.
int getDataLength()
Getter for data length in byte.
StoreArray< CDCHit > m_CDCHits
CDC hits.
int getBoardId()
Getter for FE board ID.
StoreArray< RawCDC > m_rawCDCs
Input array for CDC Raw.
void setCDCPacketHeader(int *buf)
Set CDC Packet header.
int m_triggerTime
Trigger time.