Weird behaviour of TPaveText on QCG

Dear experts,

I found an interesting behavior of TPaveText when used for QCG. Consider the following toy example of filling a TPaveText:

    TPaveText *pt = new TPaveText(0.05,0.05,.95,.95);
 
    for(int i=0; i<3; i++){
         pt->AddText(Form("Group %d", i));
        ((TText*)pt->GetListOfLines()->Last())->SetTextAlign(22);

        for(int j = 0; j<2; j++){
          pt->AddText(Form("Member %d", j));
          ((TText*)pt->GetListOfLines()->Last())->SetTextAlign(12);       
        }
        pt->AddText(""); 
        pt->AddLine();
        ((TLine*)pt->GetListOfLines()->Last())->SetLineWidth(3);
        ((TLine*)pt->GetListOfLines()->Last())->SetLineStyle(9);  
     }

The expected output of this code is the following:

However, when using the same code in a quality-control post-processing task, the output on QCG looks like this:

As it can be seen, there are two issues:

  1. The placement of the TLine does not follow the expected behavior of the AddLine() function
  2. The SetTextAlign() function does not work

I would appreciate any help for this problem.

Best,
Marcel

Hi @mlesch ,

Thank you for raising the issue. In order to be able to investigate from QCG side, I would need you to provide the ROOT object file or a link to the ROOT object in CCDB (if you are using it).

I am looking forward to your reply!

Thank you,
George

Hi @graduta ,

Thanks a lot for your reply!
For this kind of example, there is no specific underlying ROOT object in CCDB.
I just used the toy code shown above in a post-processing task to generate the TPaveText. This TPaveText is then drawn on a canvas “c” which in return is published via getObjectsManager()->startPublishing(c);.

Is there anything specific that I can provide you with for investigating this issue further?

Best,
Marcel

Hello,
I think that @graduta is asking for a pointer to the object in the ccdb-test. This way we can download the ROOT file and give it to the SJROOT team.
Thank you
Barth

Hi @bvonhall ,

Thanks for clearing up my confusion!
The link to the file on the ccdb-test can be found here. The object has the ID 75a4a8b5-dc27-11ec-9d51-c0a80209250c

In case there are any issues, I also downloaded the file and attached it here
TObject_1653482257683.root (5 KB)

Best,
Marcel

Hi @mlesch ,

Thank you for providing the ROOT object!

QCG uses JSROOT behind to show the plot of the object, hence sometimes the issues are actually part of JSROOT.
In your case, I loaded the ROOT file on their official website ( Read a ROOT file ) and I can see this issue happening there as well which means you will need to contact them to ask for a bug fix.

They are a great and very responsive community and you can inform them about the bug on their forum. Example of someone else encountering an issue and raising a bug: Bug in x-axis labels displaying of TH1 using JSROOT - ROOT - ROOT Forum

Once they have a fix, we will look at importing it in QCG.

Thank you for your report,
George

Hi @graduta ,

Thanks a lot for your help in this!
I reported the bug in the root forum. In case you also want to follow up on this, here is the corresponding ticket.

Best,
Marcel

Hi @mlesch ,
You should also attach to the forum the ROOT file you attached to this post. It will make it easier for them to debug

Hi @graduta,

Unfortunately, I am a new user in the root forum and due to this it currently does not allow me to upload a file. I will check later if this changes.

Best,
Marcel

Hi @mlesch,

I had the same issue. To reach the next level of user you have to open certain amount of topics and spend something like 15 minutes on the site. I simply opened few tens of topics and left them open. Then I got the next level and could upload a file.

I must say it is quite unfortunate policy though. This problem will repeat for people I suppose.

Cheers,
Tomas

Hi @therman,

Indeed, viewing a few topics in the root-forum solved the issue and I could upload the TObject.
Thanks a lot for the hint!

Best,
Marcel

Hi @graduta,

I just got notified on the root forum ticket, that JSROOT 7.1.0 has been released which contains the fix in respect to the TPaveText bug. I checked the JSROOT website, and now the TPaveText is shown as expected.

Best,
Marcel

Hi @mlesch ,

Yes, I have been following the forum as well and I’ve seen the issue was fixed for 7.1.0
Currently on FLP suite we are still using 6.3.4 and we are not able to migrate to v7 due to breaking changes which would need to be adapted to all of the FLP user interfaces.

We are in the process of setting up the priority action list for the next few months and I will come back once there is a timeline for the migration.
I added a note on the ticket to increase the priority as you are not the only one in need of the new JSROOT fixes.

Thank you,
George

1 Like

Adding reference to the ticket: Cern Authentication

Hi,

Both QCG at P2 and qcg-test are now using the new version of JSROOT 7.X so issues should be gone.

Thank you,
George