Hello Proofers,
I’m trying to do something I was able to do easily with the regular MakeClass environment but I’m a bit in the dark…
I have a class code generated with MakeSelector, let’s call it “physics” (.h/.C).
I now want to run on a large amount of data that can be described by the variables in this class.
However, I have 3 basic and fair constraints:
- I do not want to write my analysis code inside the “Process()” method of physics.C.
- I want to instantiate the physics class in another class that will contain all the analysis operations, let’s call it the “controller” class (.h/.C).
- I want to do all this within ROOT while compiling and linking against few external libs.
In a regular ROOT session I was able to do all this easily in my “controller” class that had a “loop()” method calling the instantiated “physics” class GetEntry() method etc.
//the controller constructor:
controller::controller()
{
TChain* chain = new TChain("chain");
chain->Add("file1");
chain->Add("file2");
// etc.
phys = new physics(chain); // physics* phys; is defined in the header
}
//... do some stuff ...
//in the loop() method:
controller::loop()
{
phys->GetEntry(i);
// do some stuff
}
and the compilation was preformed by another simple root macro like this:
void compile()
{
gROOT->Reset();
gROOT->ProcessLine(".include ../include/");
gROOT->ProcessLine(".include ../src/");
gROOT->ProcessLine(".include ./");
gSystem->Load( "libCintex.so" );
Cintex::Cintex::Enable();
gROOT->ProcessLine(".L Loader.C+");
gROOT->ProcessLine(".include ../GoodRunsLists-00-00-91/");
gROOT->ProcessLine(".include ../GoodRunsLists-00-00-91/GoodRunsLists/");
gROOT->ProcessLine(".L ../GoodRunsLists-00-00-91/StandAlone/libGoodRunsLists.so");
gROOT->ProcessLine(".L controller.C++");
gROOT->ProcessLine("controller ctrl");
gROOT->ProcessLine("ctrl.loop()");
}
Now I want it to run under PROOF but I cannot figure out how to do that.
I’ve digged in the tutorials but found nothing similar.
My question is if, for compiling my code and running it under PROOF, should my “controller” class look like a class that has been generated using “MakeSelector” ?
If so, how should I call it’s “Process()” method ?
Can my input chain be forwarded to “physics” by it’s “Init()” method ?
I have a lot of other questions but this is a very loaded post anyway…
A reference to a code that does similar task would be great !
Cheers,
Noam