Belle II Software development
SVDUnpackerDQMModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#ifndef SVDUnpackerDQMModule_H
10#define SVDUnpackerDQMModule_H
11
12#include <framework/datastore/StoreArray.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <svd/dataobjects/SVDDAQDiagnostic.h>
15#include <svd/dataobjects/SVDEventInfo.h>
16#include <mdst/dataobjects/TRGSummary.h>
17
18#include <framework/dataobjects/EventMetaData.h>
19#include <svd/online/SVDOnlineToOfflineMap.h>
20#include <framework/database/PayloadFile.h>
21#include <memory>
22
23#include <framework/core/HistoModule.h>
24#include <string>
25#include <TH2S.h>
26
27namespace Belle2 {
35
36 public:
37
40
41 /* Destructor */
42 virtual ~SVDUnpackerDQMModule();
43
45 void initialize() override final;
47 void beginRun() override final;
49 void event() override final;
51 void endRun() override final;
52
57 void defineHisto() override final;
58
61
62 private:
65
68
71
74
76 std::string m_SVDEventInfoName;
77
79 std::unique_ptr<SVDOnlineToOfflineMap> m_map;
80 static std::string m_xmlFileName;
86 bool m_changeFADCaxis = false;
87 bool m_shutUpNoData = true;
89 int m_expNumber = 0;
90 int m_runNumber = 0;
92 bool m_badEvent = false;
93 unsigned int m_nEvents = 0;
94 unsigned int m_nBadEvents = 0;
95 float m_errorFraction = 0;
97 uint16_t m_ftbError = 0;
98 uint16_t m_ftbFlags = 0;
99 uint16_t m_apvError = 0;
100 bool m_apvMatch = true;
101 bool m_fadcMatch = true;
102 bool m_upsetAPV = false;
103 bool m_badMapping = false;
104 bool m_badHeader = false;
105 bool m_badTrailer = false;
106 bool m_missedHeader = false;
107 bool m_missedTrailer = false;
109 unsigned short m_fadcNo = 0;
110 //unsigned short apvNo;
111
112 std::unordered_set<unsigned char>* m_FADCs;
113 std::unordered_map<unsigned short, unsigned short> m_fadc_map;
114 std::vector<unsigned short> m_vec_fadc;
116 //histogram
117 TH2F* m_DQMUnpackerHisto = nullptr;
118 TH1F* m_DQMEventFractionHisto = nullptr;
119 TH2F* m_DQMnSamplesHisto = nullptr;
120 TH2F* m_DQMnSamplesHisto2 = nullptr;
121 TH2F* m_DQMtrgQuality = nullptr;
123 };
124
126}
127
128#endif // SVDUnpackerDQMModule_H
129
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
SVD DQM Module for the Unpacker.
unsigned int m_nBadEvents
counter of events with any kind of error
void initialize() override final
Module function initialize.
TH2F * m_DQMnSamplesHisto2
TH2F histogram showing number of samples in data VS daqMode (2bins only)
bool m_badTrailer
bad trailer error
unsigned int m_nEvents
event counter
StoreObjPtr< SVDEventInfo > m_svdEventInfo
SVDEventInfo StoreObjectPointer.
bool m_missedHeader
missed Header error
bool m_shutUpNoData
shut up if no data comes
TH2F * m_DQMUnpackerHisto
TH2F histogram with Unpacking errors.
std::string m_SVDDAQDiagnosticsName
SVD diagnostics module name.
int m_expNumber
experiment number
StoreArray< SVDDAQDiagnostic > m_svdDAQDiagnostics
SVDDAQDiagnostic StoreArray.
std::vector< unsigned short > m_vec_fadc
vector of FADC boards
std::unordered_map< unsigned short, unsigned short > m_fadc_map
FADC board number map.
void defineHisto() override final
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
DBObjPtr< PayloadFile > m_mapping
channel map payload
float m_errorFraction
fraction of events with any kind of error
TH2F * m_DQMnSamplesHisto
TH2F histogram showing number of samples in data VS daqMode.
TH1F * m_DQMEventFractionHisto
TH1F histogram showing the fraction of events affected by errors.
StoreObjPtr< EventMetaData > m_eventMetaData
EvtMetaData StoreObjectPointer.
static std::string m_xmlFileName
xml filename
void event() override final
Module function event.
StoreObjPtr< TRGSummary > m_objTrgSummary
Trigger Summary data object.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
bool m_missedTrailer
missed Trailer error
std::unordered_set< unsigned char > * m_FADCs
FADC boards number.
TH2F * m_DQMtrgQuality
TH2F histogram showing number of samples in data VS Trigger Quality.
void endRun() override final
Module function endRun.
bool m_badMapping
bad mapping error
uint16_t m_apvError
APV error container.
std::string m_SVDEventInfoName
SVDEventInfo name.
unsigned short m_fadcNo
fadc number
bool m_fadcMatch
fadcc match error
void beginRun() override final
Module function beginRun.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Required input for EventMetaData.
bool m_badEvent
indicates if the particular event has any SVD error
std::unique_ptr< SVDOnlineToOfflineMap > m_map
mapping implementation
uint16_t m_ftbError
FTB error container.
uint16_t m_ftbFlags
FTB flags container.
bool m_changeFADCaxis
change FADC (y) axis
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.