QualityControl  1.5.1
O2 Data Quality Control Framework
PostProcessingDevice.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 QUALITYCONTROL_POSTPROCESSINGDEVICE_H
17 #define QUALITYCONTROL_POSTPROCESSINGDEVICE_H
18 
19 #include <Framework/Task.h>
20 #include <Framework/DataProcessorSpec.h>
21 #include <Headers/DataHeader.h>
22 
23 #include <string>
24 #include <memory>
25 
27 {
28 
29 class PostProcessingRunner;
30 
34 class PostProcessingDevice : public framework::Task
35 {
36  public:
41  PostProcessingDevice(const std::string& taskName, const std::string& configurationSource);
42  ~PostProcessingDevice() override = default;
43 
45  void init(framework::InitContext&) override;
47  void run(framework::ProcessingContext&) override;
48 
49  const std::string& getDeviceName();
50  framework::Inputs getInputsSpecs();
51  framework::Outputs getOutputSpecs();
52  framework::Options getOptions();
53 
55  static std::string createPostProcessingIdString();
57  static header::DataOrigin createPostProcessingDataOrigin();
59  static header::DataDescription createPostProcessingDataDescription(const std::string& taskName);
60 
61  private:
63  void start();
65  void stop();
67  void reset();
68 
69  private:
70  std::shared_ptr<PostProcessingRunner> mRunner;
71  std::string mDeviceName;
72  std::string mConfigSource;
73 };
74 
75 } // namespace o2::quality_control::postprocessing
76 
77 #endif //QUALITYCONTROL_POSTPROCESSINGDEVICE_H
void run(framework::ProcessingContext &) override
PostProcessingDevice&#39;s process callback.
Definition: PostProcessingDevice.cxx:53
A class driving the execution of a QC PostProcessing task inside DPL.
Definition: PostProcessingDevice.h:34
PostProcessingDevice(const std::string &taskName, const std::string &configurationSource)
Constructor.
Definition: PostProcessingDevice.cxx:35
static header::DataDescription createPostProcessingDataDescription(const std::string &taskName)
Unified DataDescription naming scheme for all Post-processing tasks.
Definition: PostProcessingDevice.cxx:74
static header::DataOrigin createPostProcessingDataOrigin()
Unified DataOrigin for Post-processing tasks.
Definition: PostProcessingDevice.cxx:70
static std::string createPostProcessingIdString()
ID string for all PostProcessingDevices.
Definition: PostProcessingDevice.cxx:66
Definition: PostProcessingConfig.h:23
void init(framework::InitContext &) override
PostProcessingDevice&#39;s init callback.
Definition: PostProcessingDevice.cxx:41