QualityControl  1.5.1
O2 Data Quality Control Framework
ITSFeeTask.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_ITS_ITSFEETASK_H
18 #define QC_MODULE_ITS_ITSFEETASK_H
19 
21 
22 #include <TH1.h>
23 #include <TH2.h>
24 
25 class TH2I;
26 class TH1I;
27 
28 using namespace o2::quality_control::core;
29 
31 {
32 
34 class ITSFeeTask final : public TaskInterface
35 {
36 
37  struct GBTDdw { //GBT diagnostic word
38 
39  union GBTBits {
40  struct payloadBits {
41  uint64_t flags2 : 36;
42  uint64_t flags1 : 36;
43  uint64_t id : 8;
44  } payload;
45 
46  uint8_t data8[16]; // 80 bits GBT word + padding to 128 bits
47  } ddwBits;
48  };
49 
50  public:
52  ITSFeeTask();
54  ~ITSFeeTask() override;
55 
56  void initialize(o2::framework::InitContext& ctx) override;
57  void startOfActivity(Activity& activity) override;
58  void startOfCycle() override;
59  void monitorData(o2::framework::ProcessingContext& ctx) override;
60  void endOfCycle() override;
61  void endOfActivity(Activity& activity) override;
62  void reset() override;
63 
64  private:
65  void setAxisTitle(TH1* object, const char* xTitle, const char* yTitle);
66  void createErrorTFPlots(int barrel);
67  void setPlotsFormat();
68  void getEnableLayers();
69  void getRunNumber(); //for ITS commissioning only
70  void resetGeneralPlots();
71  static constexpr int NLayer = 7;
72  static constexpr int NLayerIB = 3;
73  const int StaveBoundary[NLayer + 1] = { 0, 12, 28, 48, 72, 102, 144, 192 };
74  std::array<bool, NLayer> mEnableLayers = { false };
75  int mTimeFrameId = 0;
76  int mNTrigger = 13;
77  static constexpr int NError = 13;
78  TString mErrorType[NError] = { "ORBIT", "HB", "HBr", "HC", "PHYSICS", "PP", "CAL", "SOT", "EOT", "SOC", "EOC", "TF", "INT" }; //TODO: replace by defined error flags
79 
80  TH1I* mTFInfo; //count vs TF ID
81  TH2I* mErrorFlagVsFeeId;
82  TH1I* mErrorFlag;
83  //TH1D* mInfoCanvas;//TODO: default, not implemented yet
84  std::string mRunNumberPath;
85  std::string mRunNumber = "000000";
86 };
87 
88 } // namespace o2::quality_control_modules::its
89 
90 #endif // QC_MODULE_ITS_ITSFEETASK_H
ITS FEE task aiming at 100% online data integrity checking.
Definition: ITSFeeTask.h:34
Definition: ITSClusterTask.h:31
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