QualityControl  1.5.1
O2 Data Quality Control Framework
TrendingTask.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_TRENDINGTASK_H
17 #define QUALITYCONTROL_TRENDINGTASK_H
18 
22 
23 #include <memory>
24 #include <unordered_map>
25 #include <TTree.h>
26 
28 {
29 class DatabaseInterface;
30 }
31 
33 {
34 
44 {
45  public:
46  TrendingTask() = default;
47  ~TrendingTask() override = default;
48 
49  void configure(std::string name, const boost::property_tree::ptree& config) override;
50  void initialize(Trigger, framework::ServiceRegistry&) override;
51  void update(Trigger, framework::ServiceRegistry&) override;
52  void finalize(Trigger, framework::ServiceRegistry&) override;
53 
54  private:
55  struct MetaData {
56  Int_t runNumber = 0;
57  };
58 
59  void trendValues(uint64_t timestamp, repository::DatabaseInterface&);
60  void generatePlots();
61 
62  TrendingTaskConfig mConfig;
63  MetaData mMetaData;
64  UInt_t mTime;
65  std::unique_ptr<TTree> mTrend;
66  std::map<std::string, TObject*> mPlots;
67  std::unordered_map<std::string, std::unique_ptr<Reductor>> mReductors;
68 };
69 
70 } // namespace o2::quality_control::postprocessing
71 
72 #endif //QUALITYCONTROL_TRENDINGTASK_H
Definition: AggregatorRunner.h:59
TrendingTask configuration structure.
Definition: TrendingTaskConfig.h:28
Skeleton of a post-processing task.
Definition: PostProcessingInterface.h:35
A post-processing task which trends values, stores them in a TTree and produces plots.
Definition: TrendingTask.h:43
The interface to the MonitorObject&#39;s repository.
Definition: DatabaseInterface.h:35
Definition: PostProcessingConfig.h:23