Hi,
I’m working on a dedicate file (MyEvent) adapted from Event classes example but I have trouble reading objects from the TTree.
The output return strange numbers:
11:52:04 25985 Wrk-0.0 | Info in <TProofServLite::Setup>: fWorkDir: /home/user/.proof
11:52:04 25985 Wrk-0.0 | Info in <TProofServLite::SetupCommon>: 0 global package directories registered
11:52:11 25985 Wrk-0.0 | Info in <TProofServLite::HandleProcess>: calling fPlayer->Process() with selector name: Analysis.C+
11:52:11 25985 Wrk-0.0 | Info in <TProofPlayerSlave::AssertSelector>: Processing via filename (Analysis.C+)
11:52:11 25985 Wrk-0.0 | Info in <TEventIter::TEventIter>: fPackets list 'ProcessedPackets_0.0' created
11:52:11 25985 Wrk-0.0 | Info in <TProofPlayerSlave::Process>: save partial results? 0 per-packet? 0
11:52:11 25985 Wrk-0.0 | Info in <Analysis::Slave Begin>: Starting core analysis with process option:
11:52:11 25985 Wrk-0.0 | SvcMsg in <TProofPlayerSlave::CheckMemUsage>: Memory 465956 virtual 157764 resident event 0
11:52:11 25985 Wrk-0.0 | Info in <TEventIterTree::GetTrees>: the tree cache is in learning phase
11:52:11 25985 Wrk-0.0 | Info in <Analysis::Notify>: processing file: /home/user/Workdir/Fluka/Analiza/Proof_lite/with_par/output.root
++++++++++ Event tracks = -1717986919 ++++++++++
++++++++++ Event tracks = -1717986919 ++++++++++
++++++++++ Event tracks = -1717986919 ++++++++++
++++++++++ Event tracks = -1717986919 ++++++++++
++++++++++ Event tracks = -1717986919 ++++++++++
................same results for each entry in the root file .....
11:52:11 25985 Wrk-0.0 | SvcMsg in <TProofPlayerSlave::CheckMemUsage>: Memory 496744 virtual 158264 resident event 43
the Proof notifications seems to be ok :
root [0] .x RunAnalysis.C
+++ Starting PROOF-Lite with 2 workers +++
Opening connections to workers: OK (2 workers)
Setting up worker servers: OK (2 workers)
PROOF set to parallel mode (2 workers)
Info in <TPackMgr::Install>: installing myevent.par ...
[TFile::Cp] Total 0.01 MB |====================| 100.00 % [51.8 MB/s]
building myevent ...
myevent: version change (current: 6.08/02, build: ): cleaning ...
g++ -O -Wall -fPIC -pthread -std=c++11 -m64 -I/home/user/Root/build-64//include/root -L//home/user/Cernlib/lib -c -fPIC MyEvent.cpp
Generating dictionary MyEventDict.cpp ...
g++ -O -Wall -fPIC -pthread -std=c++11 -m64 -I/home/user/Root/build-64//include/root -I/home/user/Root/build-64/include/root/ -c -fPIC MyEventDict.cpp
--------------------------------------------- MyEventDict.cpp ... ok -----------------------------------------
g++ -O -Wall -fPIC -pthread -std=c++11 -m64 -I/home/user/Root/build-64//include/root -c MyEventDict.cpp
g++ -shared -m64 -fPIC -O -fPIC -I/home/user/Root/build-64/include/root/ MyEvent.o MyEventDict.o -o libTest.so -L/home/user/Root/build-64//lib/root -lCore -lRIO -lNet -l$
--------------------------------------------- libTest.so ... ok ---------------------------------------------
------------------------------------------------- DONE ---------------------------------------------------
building myevent ...
Wrk-0.1: building myevent ...
Wrk-0.0: building myevent ...
Enabled packages ...
*** Enabled packages on client on localhost.localdomain
myevent
Start analyzing the chain ...
Info in <TProofLite::SetQueryRunning>: starting query: 1
Info in <TProofQueryResult::SetRunning>: nwrks: 2
Info in <Analysis::Begin >: Starting analysis with process option:
Looking up for exact location of files: OK (1 files)
Looking up for exact location of files: OK (1 files)
Info in <TPacketizer::TPacketizer>: Initial number of workers: 2
Validating files: OK (1 files)
Lite-0: all output objects have been merged
Real time 0:00:08.129114, CP time 0.750
root [1] .q
How to correctly access objects variables for TTree, using pointers of objects?
Please find attached the reading class (Analysis),Proof macro (RunAnalysis.C) and the root file (output.root).
output.root (19 KB)
Analysis.C (5.02 KB)
Analysis.h (2.83 KB)
RunAnalysis.C (422 Bytes)