 |
Belle II Software
release-05-02-19
|
11 #ifndef SVDUnpackerModule_H
12 #define SVDUnpackerModule_H
14 #include <framework/core/Module.h>
16 #include <svd/geometry/SensorInfo.h>
18 #include <framework/datastore/StoreArray.h>
19 #include <framework/datastore/StoreObjPtr.h>
20 #include <vxd/dataobjects/VxdID.h>
21 #include <rawdata/dataobjects/RawSVD.h>
22 #include <svd/dataobjects/SVDShaperDigit.h>
23 #include <svd/dataobjects/SVDTransparentDigit.h>
24 #include <svd/dataobjects/SVDDAQDiagnostic.h>
25 #include <svd/dataobjects/SVDEventInfo.h>
26 #include <svd/dataobjects/SVDTriggerType.h>
28 #include <svd/online/SVDOnlineToOfflineMap.h>
29 #include <svd/online/SVDStripNoiseMap.h>
30 #include <framework/dataobjects/EventMetaData.h>
32 #include <framework/database/PayloadFile.h>
49 class SVDUnpackerModule :
public Module {
67 virtual void event()
override;
68 virtual void endRun()
override;
84 std::unordered_multimap<unsigned char, unsigned char>*
APVmap;
87 std::unique_ptr<SVDOnlineToOfflineMap>
m_map;
99 void printB2Debug(uint32_t* data32, uint32_t* data32_min, uint32_t* data32_max,
int nWords);
129 unsigned int check : 2;
138 unsigned int check : 1;
147 unsigned int check : 1;
156 unsigned int check : 4;
235 std::map<std::pair<unsigned short, unsigned short>, std::pair<std::size_t, std::size_t> >
m_missingAPVs;
238 std::map<std::pair<unsigned short, unsigned short>, std::pair<std::size_t, std::size_t> >
m_upsetAPVs;
249 #endif // SVDUnpackerModule_H
std::string m_svdShaperDigitListName
SVDShaperDigit StoreArray name.
FTBTrailer m_FTBTrailer
Implementation of FTB Trailer.
unsigned int check
MSB "110" - for FADC Header identification.
Specialization of DBObjPtr in case of PayloadFiles.
unsigned int sample2
2nd data sample
Class to store Trigger Type information.
std::string m_rawSVDListName
RawSVD StoreArray name.
int m_wrongFTBcrc
FTB CRC no-Match counter.
std::map< std::pair< unsigned short, unsigned short >, std::pair< std::size_t, std::size_t > > m_upsetAPVs
Map to store a list of upset APVs.
implementation of the first data word
int m_FADCTriggerNumberOffset
FADC Trigger Offset.
int nTriggerMatchErrors
counters for specific ERRORS produced by the Unpacker
implementation of FADC Header
unsigned int sample4
4th data sample
std::map< std::pair< unsigned short, unsigned short >, std::pair< std::size_t, std::size_t > > m_missingAPVs
Map to store a list of missing APVs.
unsigned short nFADCboards
how many FADCs we have
unsigned int sample3
3rd data sample
unsigned int sample5
5th data sample
unsigned int crc16
FTB CRC16 Checksum
APVHeader m_APVHeader
Implementation of APV Header.
int nErrorFieldErrors
counter of event mismatch errors in FTB's ErrorField
unsigned int apvErrOR
APV Errors Field OR.
unsigned int FTBFlags
FTB Flags Field.
std::unordered_multimap< unsigned char, unsigned char > * APVmap
pointer to APVforFADCmap filled by mapping procedure
unsigned int check
MSB "1" - for Data word identification.
unsigned int nullDigits
"0000000"
uint32_t m_data32
Input 32-bit data word.
virtual void beginRun() override
begin run
Class to store SVD mode information.
unsigned int trgType
Trigger Type.
std::string m_svdEventInfoName
SVDEventInfo name.
data_B m_data_B
Implementation of 2nd data word.
implementation of FADC Trailer
int nMissingAPVsErrors
counter of missing APVs errors
unsigned int stripNum
Strip number.
StoreArray< RawSVD > m_rawSVD
output for RawSVD
int m_shutUpFTBError
regulates the number of "Event number mismatch" errors reported
unsigned int FADCnum
FADC number.
StoreObjPtr< SVDEventInfo > m_svdEventInfoPtr
SVDEventInfo output per event.
unsigned short seenHeadersAndTrailers
this 4-bits value should be 1111 if no headers/trailers are missing
bool m_silentAppend
Silently append new SVDShaperDigits to a pre-existing non-empty SVDShaperDigits storeArray.
int nFTBFlagsErrors
counter of errors in FTBFlags variable
std::unique_ptr< SVDOnlineToOfflineMap > m_map
Pointer to online-to-offline map.
void printB2Debug(uint32_t *data32, uint32_t *data32_min, uint32_t *data32_max, int nWords)
additional function that prints raw data words
virtual void event() override
event
Abstract base class for different kinds of events.
MainHeader m_MainHeader
Implementation of FADC Header.
FTBHeader m_FTBHeader
Implementation of FTB Header.
Type-safe access to single objects in the data store.
SVDUnpackerModule()
Constructor of the module.
unsigned int sample1
1st data sample
SVDTriggerType m_SVDTriggerType
SVDTriggerType object.
data_A m_data_A
Implementation of 1st data word.
unsigned int runType
Run Type.
bool m_emulatePipelineAddress
Software emulation of pipeline address This is a replacement of hardware pipeline address emulation.
unsigned int trgNumber
Trigger Number.
unsigned int check
MSB "1" - for Data word identification.
int nEventMatchErrors
counter of Event match errors
virtual void initialize() override
Initializes the Module.
unsigned int sample6
6th data sample
int nFADCMatchErrors
counter of FADC boards =/= n of RawData objects errors
unsigned int DAQMode
Event type(2:1): "00"…1-sample, "01"…3-sample, "10"…6-sample.
unsigned int trgTiming
Trigger Timing.
int nEventInfoMatchErrors
counter of inconsistencies in SVDEventInfo within an event
unsigned int stripNum
Strip number.
SVDModeByte m_SVDModeByte
instance of SVDModeByte for the event
virtual ~SVDUnpackerModule()
Destructor of the module.
unsigned int xTalk
cross talk tag
implementation of FTB Trailer
bool m_badMappingFatal
Optionally we can stop the unpacking if there is a missing APV/FADC combination in the mapping -> wro...
virtual void endRun() override
end run
std::string m_svdDAQDiagnosticsListName
SVDDAQDiagnostic StoreArray name.
Accessor to arrays stored in the data store.
unsigned int check
MSB "1110" - for FADC Trailer identification.
implementation of the second data word
DBObjPtr< PayloadFile > m_mapping
pointer to the payload with the mapping
int m_relativeTimeShift
latency difference between the 3- and 6-sample acquired events in usint of APV clock / 4,...
unsigned int dataSizeCut
APV data-size cut flag
unsigned int controlWord
MSB "ff55" - FADC Trailer ID.
FADCTrailer m_FADCTrailer
Implementation of FADC Trailer.
int nAPVErrors
counter of APV errors
static std::string m_xmlFileName
XML filename.
int nUpsetAPVsErrors
counter of upset APV errors
bool m_killUpsetDigits
Optionally, we can kill digits coming from upset APVs right in the unpacker.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Required input for EventMetaData.
bool m_printRaw
Optionally we can get printout of Raw Data words.
unsigned int DAQType
(from 2020c) Event type(0): "0"…3 or …6 acquisition mode, "1"…3-mixed-6 acquisition mode
int m_errorRate
The parameter that indicates what fraction of B2ERRORs messages should be suppressed to not overload ...