QualityControl  1.5.1
O2 Data Quality Control Framework
TaskCompressedData.h
Go to the documentation of this file.
1 // Copyright CERN and copyright holders of ALICE O2. This software is
2 // distributed under the terms of the GNU General Public License v3 (GPL
3 // Version 3), copied verbatim in the file "COPYING".
4 //
5 // See http://alice-o2.web.cern.ch/license for full licensing information.
6 //
7 // In applying this license CERN does not waive the privileges and immunities
8 // granted to it by virtue of its status as an Intergovernmental Organization
9 // or submit itself to any jurisdiction.
10 
16 
17 #ifndef QC_MODULE_TOF_TASKCOMPRESSEDDATA_H
18 #define QC_MODULE_TOF_TASKCOMPRESSEDDATA_H
19 
20 // O2 includes
21 #include "TOFReconstruction/DecoderBase.h"
22 #include "DataFormatsTOF/CompressedDataFormat.h"
23 using namespace o2::tof::compressed;
24 
25 // QC includes
27 
28 class TH1;
29 class TH1F;
30 class TH2F;
31 
32 using namespace o2::quality_control::core;
33 
35 {
36 
39 class CompressedDataDecoder final : public DecoderBase
40 {
41  public:
43  CompressedDataDecoder() = default;
45  ~CompressedDataDecoder() = default;
46 
48  void decode();
49 
51  std::map<std::string, std::shared_ptr<TH1>> mHistos;
52 
53  Int_t rdhread = 0;
54 
56  void initHistograms();
57 
59  void resetHistograms();
60 
61  // Histograms filled in the decoder
62  std::shared_ptr<TH1F> mHits;
63  std::shared_ptr<TH1F> mTime;
64  std::shared_ptr<TH1F> mTimeBC;
65  std::shared_ptr<TH1F> mTOT;
66  std::shared_ptr<TH1F> mIndexE;
67  std::shared_ptr<TH2F> mSlotPartMask;
68  std::shared_ptr<TH2F> mDiagnostic;
69  std::shared_ptr<TH1F> mNErrors;
70  std::shared_ptr<TH1F> mErrorBits;
71  std::shared_ptr<TH2F> mError;
72  std::shared_ptr<TH1F> mNTests;
73  std::shared_ptr<TH2F> mTest;
74  std::shared_ptr<TH2F> mOrbitID;
75 
76  private:
78  void rdhHandler(const o2::header::RAWDataHeader* rdh) override;
79  void headerHandler(const CrateHeader_t* crateHeader, const CrateOrbit_t* crateOrbit) override;
80  void frameHandler(const CrateHeader_t* crateHeader, const CrateOrbit_t* crateOrbit,
81  const FrameHeader_t* frameHeader, const PackedHit_t* packedHits) override;
82  void trailerHandler(const CrateHeader_t* crateHeader, const CrateOrbit_t* crateOrbit,
83  const CrateTrailer_t* crateTrailer, const Diagnostic_t* diagnostics,
84  const Error_t* errors) override;
85 };
86 
89 class TaskCompressedData final : public TaskInterface
90 {
91  public:
93  TaskCompressedData() = default;
95  ~TaskCompressedData() override = default;
96 
97  // Definition of the methods for the template method pattern
98  void initialize(o2::framework::InitContext& ctx) override;
99  void startOfActivity(Activity& activity) override;
100  void startOfCycle() override;
101  void monitorData(o2::framework::ProcessingContext& ctx) override;
102  void endOfCycle() override;
103  void endOfActivity(Activity& activity) override;
104  void reset() override;
105 
106  private:
107  CompressedDataDecoder mDecoder;
108 };
109 
110 } // namespace o2::quality_control_modules::tof
111 
112 #endif // QC_MODULE_TOF_TASKCOMPRESSEDDATA_H
TOF Quality Control DPL Task for TOF Compressed data.
Definition: TaskCompressedData.h:89
std::map< std::string, std::shared_ptr< TH1 > > mHistos
Histograms to fill.
Definition: TaskCompressedData.h:51
std::shared_ptr< TH2F > mSlotPartMask
Index in electronic.
Definition: TaskCompressedData.h:67
std::shared_ptr< TH1F > mNErrors
Diagnostic words.
Definition: TaskCompressedData.h:69
std::shared_ptr< TH1F > mTOT
Time in Bunch Crossing.
Definition: TaskCompressedData.h:65
std::shared_ptr< TH1F > mIndexE
Time-Over-Threshold.
Definition: TaskCompressedData.h:66
Definition: Counter.h:33
std::shared_ptr< TH2F > mOrbitID
Tests in slot and TDC.
Definition: TaskCompressedData.h:74
std::shared_ptr< TH2F > mDiagnostic
Participating slot.
Definition: TaskCompressedData.h:68
TOF Quality Control class for Decoding Compressed data for TOF Compressed data QC Task...
Definition: TaskCompressedData.h:39
Skeleton of a QC task.
Definition: TaskInterface.h:53
std::shared_ptr< TH2F > mTest
Number of tests.
Definition: TaskCompressedData.h:73
std::shared_ptr< TH1F > mErrorBits
Number of errors.
Definition: TaskCompressedData.h:70
std::shared_ptr< TH1F > mNTests
Errors in slot and TDC.
Definition: TaskCompressedData.h:72
std::shared_ptr< TH1F > mTime
Number of TOF hits.
Definition: TaskCompressedData.h:63
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
std::shared_ptr< TH2F > mError
Bits of errors.
Definition: TaskCompressedData.h:71
std::shared_ptr< TH1F > mTimeBC
Time.
Definition: TaskCompressedData.h:64