|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +/// |
| 13 | +/// \file QualityAggregatorTask.h |
| 14 | +/// \author Andrea Ferrero andrea.ferrero@cern.ch |
| 15 | +/// \brief Post-processing of the MCH pre-clusters |
| 16 | +/// \since 21/06/2022 |
| 17 | +/// |
| 18 | + |
| 19 | +#ifndef QC_MODULE_MCH_PP_QUALITY_H |
| 20 | +#define QC_MODULE_MCH_PP_QUALITY_H |
| 21 | + |
| 22 | +#include "QualityControl/PostProcessingInterface.h" |
| 23 | +#include "CCDB/CcdbApi.h" |
| 24 | + |
| 25 | +#include <set> |
| 26 | + |
| 27 | +using namespace o2::framework; |
| 28 | + |
| 29 | +using namespace o2::quality_control; |
| 30 | +using namespace o2::quality_control::postprocessing; |
| 31 | + |
| 32 | +class TH2F; |
| 33 | + |
| 34 | +namespace o2::quality_control_modules::muonchambers |
| 35 | +{ |
| 36 | + |
| 37 | +/// \brief A post-processing task which processes and trends MCH pre-clusters and produces plots. |
| 38 | +class QualityAggregatorTask : public PostProcessingInterface |
| 39 | +{ |
| 40 | + public: |
| 41 | + using CcdbApi = o2::ccdb::CcdbApi; |
| 42 | + |
| 43 | + QualityAggregatorTask() = default; |
| 44 | + ~QualityAggregatorTask() override = default; |
| 45 | + |
| 46 | + void configure(const boost::property_tree::ptree& config) override; |
| 47 | + void initialize(Trigger, framework::ServiceRegistryRef) override; |
| 48 | + void update(Trigger, framework::ServiceRegistryRef) override; |
| 49 | + void finalize(Trigger, framework::ServiceRegistryRef) override; |
| 50 | + |
| 51 | + private: |
| 52 | + CcdbApi mAPI; |
| 53 | + std::string mCCDBpath{ "http://ccdb-test.cern.ch:8080" }; // CCDB path |
| 54 | + |
| 55 | + std::string mObjectPathBadDE{ "MCH/Calib/BadDE" }; |
| 56 | + std::string mObjectPathBadSOLAR{ "MCH/Calib/BadSOLAR" }; |
| 57 | + |
| 58 | + std::vector<std::string> mDEPlotPaths; |
| 59 | + std::optional<std::set<int>> mPreviousBadDEs; |
| 60 | + |
| 61 | + std::vector<std::string> mSOLARPlotPaths; |
| 62 | + std::optional<std::set<int>> mPreviousBadSolarBoards; |
| 63 | + |
| 64 | + std::unique_ptr<TH2F> mHistogramQualityPerDE; ///< quality flags for each DE, to be filled by checker task |
| 65 | + std::unique_ptr<TH2F> mHistogramQualityPerSolar; ///< quality flags for each SOLAR, to be filled by checker task |
| 66 | +}; |
| 67 | + |
| 68 | +} // namespace o2::quality_control_modules::muonchambers |
| 69 | + |
| 70 | +#endif // QC_MODULE_MCH_PP_QUALITY_H |
0 commit comments