I want to do a QC workflow that runs continuously and periodically takes data from the CCDB (via the CDBInterface) and publishes results.
Now I am wondering how one can set up a workflow with a task that does not have a data source from within the DPL.
Whenever I remove the data source from the config file (or leave the data source part empty) I get complaints that dataSource (or type) is missing when setting up the workflow with o2-qc --config json://path/to/config/file. Probably my config is very wrong for such a task and I assume the solution is trivial but I don’t know how it works.
I am using this config file.
The first idea that comes to my mind is that you should probably use a post-processing task for such a use case. It is asynchronous with regards to the data flow, it runs periodically.
sorry to reactivate this solved thread. I am now doing a post-processing task. In the update function of the PostProcessingInterface I see that there is a ServiceRegistry object that I can access. The comment of that function says
\param services Interface containing optional interfaces, for example DatabaseInterface
so I assume I can get data from the database. I simply do not know how. Is there a function from the ServiceRegistry object that does the trick? I could not find an obvious one.
What I would like to get is an object from the CCDB whenever the update function is called and then do operations on the data within the function. The object is not a TObject in case that matters (to be specific: it is o2::tpc::CalDet<float>). For testing purposes I got the data via the o2::tpc::CDBInterface which is missing a bit of functionality to meet the requirements here and we won’t need to implement that now if the ServiceRegistry object can do that anyway.
similarly to the TrendingTask. However, DatabaseInterface does not allow to retrieve objects which don’t inherit TObject. The changes you need should appear together with https://alice.its.cern.ch/jira/browse/QC-348 (@bvonhall), but for now, to be able to proceed, you could use the CcdbApi . You can just instantiate it on your own in your post-processing task, it allows to retrieve any object which has a dictionary as far as i remember.
I hope this helps, let me know if something is not clear.
Cheers!