QualityControl  1.5.1
O2 Data Quality Control Framework
AggregatorInterface.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_CHECKER_AGGREGATORINTERFACE_H
17 #define QC_CHECKER_AGGREGATORINTERFACE_H
18 
19 #include <unordered_map>
20 #include <map>
21 
22 #include "QualityControl/QualityObject.h"
23 #include "QualityControl/Quality.h"
24 
26 {
27 
32 {
33  public:
35  AggregatorInterface() = default;
37  virtual ~AggregatorInterface() = default;
38 
47  virtual void configure(std::string name) = 0;
48 
53  virtual std::map<std::string, o2::quality_control::core::Quality> aggregate(std::map<std::string, std::shared_ptr<const o2::quality_control::core::QualityObject>>& qoMap) = 0;
54 
58  void setCustomParameters(const std::unordered_map<std::string, std::string>& parameters)
59  {
60  mCustomParameters = parameters;
61  }
62 
63  protected:
64  std::unordered_map<std::string, std::string> mCustomParameters;
65 
66  ClassDef(AggregatorInterface, 1)
67 };
68 
69 } // namespace o2::quality_control::checker
70 
71 #endif /* QC_CHECKER_AGGREGATORINTERFACE_H */
AggregatorInterface()=default
Default constructor.
Skeleton of a quality aggregator user algorithm.
Definition: AggregatorInterface.h:31
virtual ~AggregatorInterface()=default
Destructor.
Definition: Aggregator.h:32
void setCustomParameters(const std::unordered_map< std::string, std::string > &parameters)
Set the custom parameters for this aggregator. Set the custom parameters for this aggregator...
Definition: AggregatorInterface.h:58
virtual void configure(std::string name)=0
Configure the aggregator based on its name.
virtual std::map< std::string, o2::quality_control::core::Quality > aggregate(std::map< std::string, std::shared_ptr< const o2::quality_control::core::QualityObject >> &qoMap)=0
Returns new qualities (usually fewer) based on the input qualities.