Skip to content
Snippets Groups Projects
Commit 98e5d8de authored by matta's avatar matta
Browse files

* Add a convenient function to make friend tree in CINT

 - MakeFriendTrees("RunToRead1","RunToRead2")
 - can be called within CINT
parent be64fa28
No related branches found
No related tags found
No related merge requests found
TTreeName TTreeName
SimulatedTree t1
RootFileName RootFileName
../../Outputs/Simulation/myResult.root /media/rc66_1/data/runROOT/20umTest/si20um_test0089.root
...@@ -270,3 +270,11 @@ RootInput::~RootInput() ...@@ -270,3 +270,11 @@ RootInput::~RootInput()
delete pRootFile; delete pRootFile;
delete pRootChain; delete pRootChain;
} }
/////////////////////////////////////////////////////////////////////
TChain* MakeFriendTrees(string RunToRead1,string RunToRead2)
{
RootInput:: getInstance(RunToRead1) ;
RootInput:: getInstance()->AddFriendChain(RunToRead2);
return RootInput:: getInstance()->GetChain();
}
...@@ -79,4 +79,7 @@ private: ...@@ -79,4 +79,7 @@ private:
int NumberOfFriend; 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 #endif // ROOTINPUT_HH
...@@ -69,6 +69,8 @@ void NPToolLogon(bool verbosemode = false) ...@@ -69,6 +69,8 @@ void NPToolLogon(bool verbosemode = false)
} }
} }
gROOT->ProcessLine(".L $NPLIB/include/RootInput.h+");
// Since the libdir.GetListOfFiles() commands cds to the // Since the libdir.GetListOfFiles() commands cds to the
// libidr directory, one has to return to the initial // libidr directory, one has to return to the initial
// directory // directory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment