QualityControl  1.5.1
O2 Data Quality Control Framework
DaqTask.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 
15 
16 #ifndef QC_MODULE_DAQ_DAQTASK_H
17 #define QC_MODULE_DAQ_DAQTASK_H
18 
20 #include <Headers/DAQID.h>
21 #include <map>
22 #include <set>
23 
24 class TH1F;
25 
26 using namespace o2::quality_control::core;
27 
29 {
36 {
37  public:
39  DaqTask();
41  ~DaqTask() override;
42 
43  // Definition of the methods for the template method pattern
44  void initialize(o2::framework::InitContext& ctx) override;
45  void startOfActivity(o2::quality_control::core::Activity& activity) override;
46  void startOfCycle() override;
47  void monitorData(o2::framework::ProcessingContext& ctx) override;
48  void endOfCycle() override;
49  void endOfActivity(o2::quality_control::core::Activity& activity) override;
50  void reset() override;
51 
52  private:
53  void printInputPayload(const header::DataHeader* header, const char* payload);
54  void monitorInputRecord(o2::framework::InputRecord& inputRecord);
55  void monitorRDHs(o2::framework::InputRecord& inputRecord);
56 
57  // ** general information
58 
59  std::map<o2::header::DAQID::ID, std::string> mSystems;
60  std::set<o2::header::DAQID::ID> mToBePublished; // keep the list of detectors we saw this cycle and whose plots should be published
61 
62  // ** objects we publish **
63 
64  // Message related
65  // Block = the whole InputRecord, i.e. the thing we receive and analyse in monitorData(...)
66  // SubBlock = a single input of the InputRecord
67  TH1F* mInputRecordPayloadSize = nullptr; // filled w/ the sum of the payload size of all the inputs of an inputrecord
68  TH1F* mNumberInputs = nullptr; // filled w/ the number of inputs in each InputRecord we encounter
69  TH1F* mInputSize = nullptr; // filled w/ the size of the inputs in each InputRecord we encounter
70  TH1F* mNumberRDHs = nullptr; // filled w/ the number of RDHs found in each InputRecord we encounter
71 
72  // Per link information
73 
74  // Per detector information
75  std::map<o2::header::DAQID::ID, TH1F*> mSubSystemsTotalSizes; // filled with the sum of RDH memory sizes per InputRecord
76  std::map<o2::header::DAQID::ID, TH1F*> mSubSystemsRdhSizes; // filled with the RDH memory sizes for each RDH
77  // todo : for the next one we need to know the number of links per detector.
78  // std::map<o2::header::DAQID::ID, TH1F*> mSubSystemsRdhHits; // hits per link split by detector
79  // todo we could add back the graph for the IDs using the TFID
80 };
81 
82 } // namespace o2::quality_control_modules::daq
83 
84 #endif // QC_MODULE_DAQ_DAQTASK_H
Dataflow task It does only look at the header and plots sizes (e.g. payload). It also can print the h...
Definition: DaqTask.h:35
Skeleton of a QC task.
Definition: TaskInterface.h:53
Definition: DaqTask.h:28
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