17 #ifndef QC_CHECKER_CHECKRUNNER_H 18 #define QC_CHECKER_CHECKRUNNER_H 26 #include <unordered_set> 28 #include <Common/Timer.h> 29 #include <Framework/Task.h> 30 #include <Headers/DataHeader.h> 31 #include <Monitoring/MonitoringFactory.h> 32 #include <Configuration/ConfigurationInterface.h> 33 #include <Framework/DataProcessorSpec.h> 39 #include "QualityControl/Check.h" 88 CheckRunner(std::vector<Check> checks, std::string configurationSource);
99 CheckRunner(o2::framework::InputSpec input, std::string configurationSource);
105 void init(framework::InitContext& ctx)
override;
108 void run(framework::ProcessingContext& ctx)
override;
110 framework::Inputs getInputs() {
return mInputs; };
111 framework::Outputs getOutputs() {
return mOutputs; };
113 void setTaskStoreSet(std::unordered_set<std::string> storeSet) { mInputStoreSet = storeSet; }
114 std::string getDeviceName() {
return mDeviceName; };
117 static o2::header::DataDescription createCheckRunnerDataDescription(
const std::string taskName);
118 static o2::framework::Inputs createInputSpec(
const std::string checkName,
const std::string configSource);
120 static std::string createCheckRunnerIdString() {
return "QC-CHECK-RUNNER"; };
121 static std::string createCheckRunnerName(std::vector<Check> checks);
122 static std::string createSinkCheckRunnerName(o2::framework::InputSpec input);
135 QualityObjectsType check();
142 void store(QualityObjectsType& qualityObjects);
149 void store(std::vector<std::shared_ptr<MonitorObject>>& monitorObjects);
154 void send(QualityObjectsType& qualityObjects, framework::DataAllocator& allocator);
161 static o2::framework::Outputs collectOutputs(
const std::vector<Check>& checks);
163 inline void initDatabase();
164 inline void initMonitoring();
165 inline void initServiceDiscovery();
171 void updateServiceDiscovery(
const QualityObjectsType& qualityObjects);
178 static std::size_t hash(std::string input_string);
189 void prepareCacheData(framework::InputRecord& inputRecord);
193 void sendPeriodicMonitoring();
196 std::string mDeviceName;
197 std::vector<Check> mChecks;
199 std::shared_ptr<o2::quality_control::repository::DatabaseInterface> mDatabase;
200 std::unordered_set<std::string> mInputStoreSet;
201 std::vector<std::shared_ptr<MonitorObject>> mMonitorObjectStoreVector;
202 std::shared_ptr<o2::configuration::ConfigurationInterface> mConfigFile;
206 o2::framework::Inputs mInputs;
207 o2::framework::Outputs mOutputs;
210 std::map<std::string, std::shared_ptr<MonitorObject>> mMonitorObjects;
213 std::shared_ptr<ServiceDiscovery> mServiceDiscovery;
214 std::unordered_set<std::string> mListAllQOPaths;
217 std::shared_ptr<o2::monitoring::Monitoring> mCollector;
218 int mTotalNumberObjectsReceived;
219 int mTotalNumberCheckExecuted;
220 int mTotalNumberQOStored;
221 int mTotalNumberMOStored;
222 AliceO2::Common::Timer mTimer;
227 #endif // QC_CHECKER_CHECKRUNNER_H Information service for QC.
Definition: ServiceDiscovery.h:32
Definition: Aggregator.h:32
Definition: AggregatorRunner.h:34
Definition: AggregatorRunner.h:27
Definition: UpdatePolicyManager.h:86
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19
The class in charge of running the checks on a MonitorObject.
Definition: CheckRunner.h:73
Singleton class that any class in the QC can use to log.
Definition: QcInfoLogger.h:41