diff --git a/NPAnalysis/RRC66/RunToTreat.txt b/NPAnalysis/RRC66/RunToTreat.txt index 698f27aa2f5d83de671b3370b1ef6ccf2a561d21..5650110f7979ede683b7b3ee345ba778e66f7dd2 100644 --- a/NPAnalysis/RRC66/RunToTreat.txt +++ b/NPAnalysis/RRC66/RunToTreat.txt @@ -1,4 +1,4 @@ TTreeName - SimulatedTree + t1 RootFileName - ../../Outputs/Simulation/myResult.root + /media/rc66_1/data/runROOT/20umTest/si20um_test0089.root diff --git a/NPLib/IORoot/RootInput.cxx b/NPLib/IORoot/RootInput.cxx index 7838d255f1aa3388f624e2b79f75becb0a3025cc..f3814c1417de1a191491794805ef38de63ed0bab 100644 --- a/NPLib/IORoot/RootInput.cxx +++ b/NPLib/IORoot/RootInput.cxx @@ -270,3 +270,11 @@ RootInput::~RootInput() delete pRootFile; delete pRootChain; } + +///////////////////////////////////////////////////////////////////// +TChain* MakeFriendTrees(string RunToRead1,string RunToRead2) + { + RootInput:: getInstance(RunToRead1) ; + RootInput:: getInstance()->AddFriendChain(RunToRead2); + return RootInput:: getInstance()->GetChain(); + } diff --git a/NPLib/IORoot/RootInput.h b/NPLib/IORoot/RootInput.h index 463411bb02d74350c7d76de11c7b0822d170c690..5cee92ce0079e7a59b2aff64bfd9d1f0ea72adfc 100644 --- a/NPLib/IORoot/RootInput.h +++ b/NPLib/IORoot/RootInput.h @@ -79,4 +79,7 @@ private: int NumberOfFriend; }; +// A convenient function related to Root Input, coded Here so it can be called within ROOT CINT +TChain* MakeFriendTrees(string,string); + #endif // ROOTINPUT_HH diff --git a/NPLib/scripts/NPToolLogon.C b/NPLib/scripts/NPToolLogon.C index 12379ba71e2abe4c5182f052c1d5779f19696be8..c01c049016731e76b5796b57575df2137130d6e3 100644 --- a/NPLib/scripts/NPToolLogon.C +++ b/NPLib/scripts/NPToolLogon.C @@ -69,6 +69,8 @@ void NPToolLogon(bool verbosemode = false) } } + gROOT->ProcessLine(".L $NPLIB/include/RootInput.h+"); + // Since the libdir.GetListOfFiles() commands cds to the // libidr directory, one has to return to the initial // directory