Belle II Software  release-08-01-10
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 
27 namespace Belle2 {
38 
39  public:
40 
43 
44  /* Destructor */
45  virtual ~SVDUnpackerDQMModule();
46 
48  void initialize() override final;
50  void beginRun() override final;
52  void event() override final;
54  void endRun() override final;
55 
60  void defineHisto() override final;
61 
64 
65  private:
68 
71 
74 
77 
79  std::string m_SVDEventInfoName;
80 
82  std::unique_ptr<SVDOnlineToOfflineMap> m_map;
83  static std::string m_xmlFileName;
89  bool m_changeFADCaxis = false;
90  bool m_shutUpNoData = true;
92  int m_expNumber = 0;
93  int m_runNumber = 0;
95  bool m_badEvent = false;
96  unsigned int m_nEvents = 0;
97  unsigned int m_nBadEvents = 0;
98  float m_errorFraction = 0;
100  uint16_t m_ftbError = 0;
101  uint16_t m_ftbFlags = 0;
102  uint16_t m_apvError = 0;
103  bool m_apvMatch = true;
104  bool m_fadcMatch = true;
105  bool m_upsetAPV = false;
106  bool m_badMapping = false;
107  bool m_badHeader = false;
108  bool m_badTrailer = false;
109  bool m_missedHeader = false;
110  bool m_missedTrailer = false;
112  unsigned short m_fadcNo = 0;
113  //unsigned short apvNo;
114 
115  std::unordered_set<unsigned char>* m_FADCs;
116  std::unordered_map<unsigned short, unsigned short> m_fadc_map;
117  std::vector<unsigned short> m_vec_fadc;
119  //histogram
120  TH2F* m_DQMUnpackerHisto = nullptr;
121  TH1F* m_DQMEventFractionHisto = nullptr;
122  TH2F* m_DQMnSamplesHisto = nullptr;
123  TH2F* m_DQMnSamplesHisto2 = nullptr;
124  TH2F* m_DQMtrgQuality = nullptr;
126  };
127 
129 }
130 
131 #endif // SVDUnpackerDQMModule_H
132 
Specialization of DBObjPtr in case of PayloadFiles.
Definition: PayloadFile.h:54
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.