DPL device without data source within DPL

Hi,

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.

Thanks for any help!

Cheers,
Thomas

Hi Thomas,

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.

@pkonopka what do you think ?
Cheers,
Barth

Hi Barth,

this sounds reasonable. I will give it a try.

Cheers,
Thomas

Yes, at least the Post-processing in QC was designed to do exactly that.

I need to figure out some settings but in principle this solves the described issue.

Thanks a lot!
Cheers,
Thomas

Hi,

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.

Just to make clear: This is no TrendingTask.

Any help is very much appreciated.
Cheers,
Thomas

You can retrieve the DatabaseInterface with:

  auto& qcdb = services.get<repository::DatabaseInterface>();

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!

Thanks a lot, I will have a look!

Cheers,
Thomas