How to use the TTreePerfStats class in PROOF


I would like to use the new class TTreePerfStats available in root 5.26 ( … -disk-spin) also in a PROOF framework.

I added

TTreePerfStats *ps= new TTreePerfStats(“ioperf”,T);

in the Init() function, but I have problems adding the “ioperf” to the Output and getting the histo.

Has anyone tried to use this class?

Ana Rodríguez.


You probably should initialize it in SlaveBegin instead.


I tried it:

ps = new TTreePerfStats(“ioperf”,tree);

but it did not work.


[quote]but it did not work.[/quote]How so? I.e. what is it that you were expecting but did not happen?


In the examples I saw the TTreePerfStats class is called before any for on the events. That means at the beginning of the code.

I was able to run this sequentially, getting at the end the histogram showing the statistics. However, I am having troubles to do the same with PROOF.

If I call it in the SlaveBegin() I get directly a segmentation fault.

At the end I would like to have access to an histogram like I did sequentially. … -disk-spin



Humm … yes because tree must be non zero you indeed need to put the creation of the TTreePerfStats in Init.

[quote]At the end I would like to have access to an histogram like I did sequentially. [/quote]Do you want one histogram per node or one global histogram? How did it fail with you create it in Init?


I would like to have a global histogram, but maybe one per node will be also useful.

When I add it to the Init(), the query ends successfully, but just after I get a *** Break *** segmentation violation.
I was adding these lines in the Init()

ps = new TTreePerfStats(“ioperf”,tree);

and at Terminate() I tried to recover it with:

ps = ((TTreePerfStats*) fOutput->FindObject(“ioperf”));

It seems that both, the Add and the FindObjetct cause the problems.


Maybe it is not possible to do an Add in the Init().
Details about the error:

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#10 0x00b0eef7 in TClass::GetDirectoryAutoAdd() const () from /home/arodrig/src/root5.26/root/lib/
#11 0x00b01c72 in TList::Clear(char const*) () from /home/arodrig/src/root5.26/root/lib/
#12 0x00b02aea in TList::~TList() () from /home/arodrig/src/root5.26/root/lib/
#13 0x0115834d in TSelectorList::~TSelectorList() () from /home/arodrig/src/root5.26/root/lib/
#14 0x011576e7 in TSelector::~TSelector() () from /home/arodrig/src/root5.26/root/lib/
#15 0x061dd797 in MyAnalysis::~MyAnalysis() () from /home/arodrig/.proof/ProofAnalysisFramework/session-achinet-1271426074-4104/worker-0.1/./
#16 0x086243e4 in TProofPlayer::~TProofPlayer() () from /home/arodrig/src/root5.26/root/lib/
#17 0x08630725 in TProofPlayerSlave::~TProofPlayerSlave() () from /home/arodrig/src/root5.26/root/lib/
#18 0x0813ba5a in TProofServ::DeletePlayer() () from /home/arodrig/src/root5.26/root/lib/
#19 0x081570f0 in TProofServ::HandleProcess(TMessage*) () from /home/arodrig/src/root5.26/root/lib/
#20 0x0815125a in TProofServ::HandleSocketInput(TMessage*, bool) () from /home/arodrig/src/root5.26/root/lib/
#21 0x0813d341 in TProofServ::HandleSocketInput() () from /home/arodrig/src/root5.26/root/lib/
#22 0x08159207 in TProofServLiteInputHandler::Notify() () from /home/arodrig/src/root5.26/root/lib/
#23 0x0815b5a4 in TProofServLiteInputHandler::ReadNotify() () from /home/arodrig/src/root5.26/root/lib/
#24 0x00b575a7 in TUnixSystem::CheckDescriptors() () from /home/arodrig/src/root5.26/root/lib/
#25 0x00b57bb5 in TUnixSystem::DispatchOneEvent(bool) () from /home/arodrig/src/root5.26/root/lib/
#26 0x00ac7091 in TSystem::InnerLoop() () from /home/arodrig/src/root5.26/root/lib/
#27 0x00ac9e89 in TSystem::Run() () from /home/arodrig/src/root5.26/root/lib/
#28 0x00a619b7 in TApplication::Run(bool) () from /home/arodrig/src/root5.26/root/lib/
#29 0x0813d6d2 in TProofServ::Run(bool) () from /home/arodrig/src/root5.26/root/lib/
#30 0x08049966 in main ()


It looks like something is being delete twice … (you may want to use valgrind to pinpoint this)