QualityControl  1.5.1
O2 Data Quality Control Framework
PedestalsTask.h
Go to the documentation of this file.
1 
6 #ifndef QC_MODULE_MUONCHAMBERS_PEDESTALSTASK_H
7 #define QC_MODULE_MUONCHAMBERS_PEDESTALSTASK_H
8 
10 #include "MCH/Mapping.h"
11 #include "MCH/Decoding.h"
12 #include "MCHBase/Digit.h"
13 #include "MCH/GlobalHistogram.h"
14 #include "Framework/DataRef.h"
15 
16 class TH1F;
17 class TH2F;
18 
19 using namespace o2::quality_control::core;
20 
22 {
23 
27 class PedestalsTask final : public TaskInterface
28 {
29  public:
31  PedestalsTask();
33  ~PedestalsTask() override;
34 
35  // Definition of the methods for the template method pattern
36  void initialize(o2::framework::InitContext& ctx) override;
37  void startOfActivity(Activity& activity) override;
38  void startOfCycle() override;
39  void monitorDataReadout(o2::framework::ProcessingContext& ctx);
40  void monitorDataDigits(const o2::framework::DataRef& input);
41  void monitorData(o2::framework::ProcessingContext& ctx) override;
42  void endOfCycle() override;
43  void endOfActivity(Activity& activity) override;
44  void reset() override;
45 
46  private:
47  Decoder mDecoder;
48  uint64_t nhits[MCH_MAX_CRU_IN_FLP][24][40][64];
49  double pedestal[MCH_MAX_CRU_IN_FLP][24][40][64];
50  double noise[MCH_MAX_CRU_IN_FLP][24][40][64];
51 
52  //Matrices [de][padid], stated an upper value for de# and padid#
53 
54  uint64_t nhitsDigits[1100][1500];
55  double pedestalDigits[1100][1500];
56  double noiseDigits[1100][1500];
57 
58  MapCRU mMapCRU[MCH_MAX_CRU_IN_FLP];
59  TH2F* mHistogramPedestals;
60  TH2F* mHistogramNoise;
61 
62  std::vector<int> DEs;
63  //MapFEC mMapFEC;
64  std::map<int, TH2F*> mHistogramPedestalsDE;
65  std::map<int, TH2F*> mHistogramNoiseDE;
66  std::map<int, TH2F*> mHistogramPedestalsXY[2];
67  std::map<int, TH2F*> mHistogramNoiseXY[2];
68 
69  std::map<int, TH1F*> mHistogramNoiseDistributionDE[5][2];
70 
71  GlobalHistogram* mHistogramPedestalsMCH;
72  GlobalHistogram* mHistogramNoiseMCH;
73 
74  int mPrintLevel;
75 
76  void fill_noise_distributions();
77  void save_histograms();
78 };
79 
80 } // namespace o2::quality_control_modules::muonchambers
81 
82 #endif // QC_MODULE_MUONCHAMBERS_PEDESTALSTASK_H
Quality Control Task for the analysis of MCH pedestal data.
Definition: PedestalsTask.h:27
Skeleton of a QC task.
Definition: TaskInterface.h:53
Dummy class that should be removed when there is the official one. This corresponds to a Run1/2 "run"...
Definition: Activity.h:25
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19
decoding of MCH data
Definition: Decoding.h:71