17 #ifndef QC_CORE_TASKINTERFACE_H 18 #define QC_CORE_TASKINTERFACE_H 23 #include <unordered_map> 25 #include <Framework/InitContext.h> 26 #include <Framework/ProcessingContext.h> 27 #include <CCDB/CcdbApi.h> 75 virtual void loadCcdb(std::string url)
final;
78 virtual void initialize(o2::framework::InitContext& ctx) = 0;
79 virtual void startOfActivity(
Activity& activity) = 0;
80 virtual void startOfCycle() = 0;
81 virtual void monitorData(o2::framework::ProcessingContext& ctx) = 0;
82 virtual void endOfCycle() = 0;
83 virtual void endOfActivity(
Activity& activity) = 0;
84 virtual void reset() = 0;
87 void setObjectsManager(std::shared_ptr<ObjectsManager> objectsManager);
88 void setName(
const std::string& name);
89 void setCustomParameters(
const std::unordered_map<std::string, std::string>& parameters);
90 const std::string& getName()
const;
93 std::shared_ptr<ObjectsManager> getObjectsManager();
94 TObject* retrieveCondition(std::string path, std::map<std::string, std::string> metadata = {},
long timestamp = -1);
96 T* retrieveConditionAny(std::string
const& path, std::map<std::string, std::string>
const& metadata = {},
97 long timestamp = -1)
const;
99 std::unordered_map<std::string, std::string> mCustomParameters;
103 std::shared_ptr<ObjectsManager> mObjectsManager;
105 std::shared_ptr<o2::ccdb::CcdbApi> mCcdbApi;
108 template <
typename T>
109 T* TaskInterface::retrieveConditionAny(std::string
const& path, std::map<std::string, std::string>
const& metadata,
110 long timestamp)
const 113 return mCcdbApi->retrieveFromTFileAny<T>(path, metadata, timestamp);
115 ILOG(Error, Support) <<
"Trying to retrieve a condition, but CCDB API is not constructed." << ENDM;
122 #endif // QC_CORE_TASKINTERFACE_H
Keeps the list of encapsulated objects to publish and does the actual publication.
Definition: ObjectsManager.h:41
Skeleton of a QC task.
Definition: TaskInterface.h:53
Definition: TaskInterface.h:33
Dummy class that should be removed when there is the official one. This corresponds to a Run1/2 "run"...
Definition: Activity.h:25
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19