Home | News | Documentation | Download

Joining TProfile end to end

I have some TProfile plots which I wish to join end to end in a single TProfile plot. Is there a way? Thanks ___
Please read tips for efficient and successful posting and posting code

_ROOT Version: 5.34
Platform: Not Provided
Compiler: Not Provided


May be this TProfile::Merge() can help you:

Thanks. I was trying to use this. Before using this we need the TCollection. So what I was doing is :

TCollection *col;
col->Add(pPlot)
Error "TCollection() no default constructor" was displayed.

So, After this I changed it to

TCollection *col = new TCollection();
col->Add(pPlot);

Now, “Error: abstract class object ‘TCollection’ is created” was displayed.
Please help me out with this. Thanks.

Try:

TList *list = new TList;
list->Add(pPlot);
some_profile->Merge(list);
1 Like

Thank you so much… Seems like the TList thing could have worked but it displayed an error saying that the end point do not match. So I had to read the X and Y axes of the three profiles and fill it in a new TProfile…Phew!
Thanks a lot.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.