Check.cxx and CheckRunner.cxx

Dear all,

I am currently investigating checkers. My beautify() function is not triggered even though I pass only one monitoring object. I participated in today’s QA tools and WP7 : TOF and MFT discussion and I understand now, that at least TOF has similar issue.

I tried to look, what is actually happening in the framework. My beautify() function is not triggered, because even though in my .json file I send only one histogram to the checker, the checker sees more. This is related to my other ticket Implementig checkers.

In json file :
“dataSource”: [{
“type”: “Task”,
“name”: “PID”,
"MOs": [“hNClusters”]

With such json file:

  1. In Check.cxx, the function void Check::beautify() the statement
    if (!(moMap.size() == 1 && mMonitorObjectNames.size() == 1)) {...}
    is satisfied --> sees more than one monitoring object.
  2. In the same Check.cxx, the function void Check::initConfig() in the
    for (const auto& moName : dataSource.get_child("MOs"))
    sees only one monitoring object, as this is looping over the json file “MOs” field.
  3. In CheckRunner.cxx, the function std::vector CheckRunner::check() sees the number of monitor objects in moMap again not one (it is 10, which is the number of all published histograms in the task).

I wanted to ask, what is happening behind the scene with the Check.cxx and CheckRunner.cxx and the published histograms. From the 2. point in the list, I can see that the for loop is used only to create mMonitorObjectNames list, and not the map of histograms. And then to the actual checker function in the Modules, only the histograms from this list is passed (and in the TaskChecker.cxx I can only access the one histogram I passed). But all the moMap objects, used in both Check.cxx and CheckRunner.cxx, sees all published histograms. And then as the decision to call or not the beautify() function is in the 1. point in the list and uses the moMap objects, it always sees more than one object, no matter that in json file one checker is specified.

Do I understand it right, that the json file checker datasources configuration decides not the moMap objects which are passed by framework to Check.cxx and CheckRunner.cxx but only the names of histograms that will be passed to specific TaskChecker? If yes, shouldn’t the decision to call beautify() function depend on the length of mMonitorObjectNames list and not on the moMap?

I am not sure if you will be able to follow me on this one, because I don’t completely understand the flow of the data and framework itself, but please, ask me anything you need to know more than I wrote here.

And huge thank you for any help you can provide


Dear Laura,
Thank you for taking the time to look into it.
I have to dig into it myself as I did not write this part of the code. I feel that there is some clarification / improvement to be made with this piece of the code (in addition to fixing the actual bug).
I’ll let you know.

Here is the fresh JIRA ticket :

One question on the updated checkers, @bvonhall.

The Quality result object doesn’t know for which histogram it was applied. So if I do "MOs": "all" in my json file and do a check on a specific histogram, the framework applies the resulting quality to all histograms passed. Is it intended this way?
With the same thing - if I want to check two histograms in one checker, the Quality result is global for both histograms instead of applying the Quality result on a specific histogram.

I am asking this, because originally, we wanted to do checks for all histograms from one task in one checker, but it seems now that it is not really possible, as there is only one Quality result instead of some map between passed histograms and their resulting Quality result's .