9#ifndef SVDPackerModule_H
10#define SVDPackerModule_H
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/dataobjects/EventMetaData.h>
16#include <svd/dataobjects/SVDEventInfo.h>
18#include <rawdata/dataobjects/RawSVD.h>
19#include <svd/dataobjects/SVDShaperDigit.h>
21#include <svd/online/SVDOnlineToOfflineMap.h>
23#include <framework/database/PayloadFile.h>
51 virtual void event()
override;
52 virtual void endRun()
override;
65 typedef std::unordered_map<unsigned short, unsigned short>
FADCmap;
71 std::unordered_multimap<unsigned char, unsigned char>*
APVmap;
79 std::unique_ptr<SVDOnlineToOfflineMap>
m_map;
Class for accessing objects in the database.
SVDPackerModule: The SVD Raw Hits Creator.
MainHeader m_MainHeader
Implementation of FADC Header.
bool m_simulate3sampleData
if true, simulate 3-sample data taking
StoreArray< RawSVD > m_rawSVD
output for RawSVD
FADCTrailer m_FADCTrailer
Implementation of FADC Trailer.
StoreObjPtr< SVDEventInfo > m_svdEventInfoPtr
SVDEventInfo from simulation.
virtual void initialize() override
initialize
std::unordered_map< unsigned short, unsigned short > FADCmap
type def for the FADC map
virtual void event() override
event
struct Belle2::SVD::SVDPackerModule::DataInfo dataInfo
data info
FTBHeader m_FTBHeader
Implementation of FTB Header.
virtual void endRun() override
end run
std::string m_rawSVDListName
RawSVD StoreArray name.
StoreArray< SVDShaperDigit > m_svdShaperDigit
Required input for SVDShaperDigit.
DBObjPtr< PayloadFile > m_mapping
channel map payload
virtual void terminate() override
terminate
data_B m_data_B
Implementation of 2nd data word.
int n_basf2evt
event number
int m_FADCTriggerNumberOffset
FADC trigger numnber offset.
static std::string m_xmlFileName
< xml filename
SVDPackerModule()
default constructor
void addData32(uint32_t adata32)
adds packed 32-bit data word to the raw data vector
FTBTrailer m_FTBTrailer
Implementation of FTB Trailer.
APVHeader m_APVHeader
Implementation of APV Header.
virtual void beginRun() override
begin run
std::string m_svdShaperDigitListName
SVDShaperDigit StoreArray name.
std::string m_svdEventInfoName
SVDEventInfo name.
virtual ~SVDPackerModule()
default destructor
data_A m_data_A
Implementation of 1st data word.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Required input for EventMetaData.
std::unordered_multimap< unsigned char, unsigned char > * APVmap
pointer to APVforFADCmap filled by mapping procedure
std::unique_ptr< SVDOnlineToOfflineMap > m_map
Pointer to online-to-offline map.
uint32_t data32
Output 32-bit data word.
std::vector< uint32_t > data_words
vector of raw data words
void binPrintout(unsigned int nwords)
tool: print out N words
bool m_binPrintout
if true, print data created by the Packer
FADCmap FADCnumberMapRev
maps containing assignment (0,1,2,3,4,..,nFADCboards-1) <-> FADC numbers
FADCmap FADCnumberMap
maps containing assignment (0,1,2,3,4,..,nFADCboards-1) <-> FADC numbers
unsigned short nFADCboards
how many FADCs we have
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.
6 samples and APV channel struct
unsigned short channel
APV channel number.
implementation of FADC Trailer
unsigned int frameErrOR
Frame Error OR.
unsigned int apvErrOR
APV chip number OR.
unsigned int fifoErrOR
FIFO full Error OR.
unsigned int check
MSB "1110" - for FADC Trailer identification.
unsigned int nullDigits
"0000000"
unsigned int FTBFlags
FTB Flags Field.
unsigned int dataSizeCut
APV data-size cut flag
unsigned int detectErrOR
Detection Error OR.
implementation of FTB Trailer
unsigned int controlWord
MSB "ff55" - FADC Trailer ID.
unsigned int crc16
FTB CRC16 Checksum
implementation of FADC Header
unsigned int DAQType
(from 2020c) Event type(0): "0"…3 or …6 acquisition mode, "1"…3-mixed-6 acquisition mode
unsigned int runType
Run Type.
unsigned int FADCnum
FADC number.
unsigned int xTalk
cross talk tag
unsigned int check
MSB "110" - for FADC Header identification.
unsigned int trgNumber
Trigger Number.
unsigned int trgTiming
Trigger Timing.
unsigned int DAQMode
Event type(2:1): "00"…1-sample, "01"…3-sample, "10"…6-sample.
unsigned int trgType
Trigger Type.
implementation of the first data word
unsigned int sample3
3rd data sample
unsigned int stripNum
Strip number.
unsigned int sample2
2nd data sample
unsigned int check
MSB "1" - for Data word identification.
unsigned int sample1
1st data sample
implementation of the second data word
unsigned int sample6
6th data sample
unsigned int stripNum
Strip number.
unsigned int check
MSB "1" - for Data word identification.
unsigned int sample4
4th data sample
unsigned int sample5
5th data sample