How to use the TTreePerfStats class in PROOF

Hello,

I would like to use the new class TTreePerfStats available in root 5.26 (root.cern.ch/drupal/content/spin … -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?

Best,
Ana Rodríguez.

Hi,

You probably should initialize it in SlaveBegin instead.

Cheers,
Philippe.

I tried it:

ps = new TTreePerfStats(“ioperf”,tree);
fOutput->Add(ps);

but it did not work.

Hi,

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

Philippe.

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.

root.cern.ch/drupal/content/spin … -disk-spin

Thanks,
Ana.

Hi,

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?

Cheers,
Philippe.

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);
fOutput->Add(ps);

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.

Ana.

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

HI,

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

Philippe