Commit f74511b8 authored by Olivier Stezowski's avatar Olivier Stezowski
Browse files

modification of main has not been pushed in the previous commit

parent 84631b1f
......@@ -77,6 +77,18 @@ TChain *GetChain()
printf("\n\n\033[1;31m\t>>> TTChain has no entries !!! Maybe the input files could not be found. <<<\033[0m\n");
}
if ( fUsePSAFriend )
{
TFile *f = TFile::Open(fNedaFriend);
if (f){
TTree *tfriend = (TTree *)f->Get("PSATreeFriend");
if (tfriend) {
MyChain->AddFriend(tfriend);
std::cout << "\033[1;36m\t>>> A Friend " << fNedaFriend << " has been added to the chain ! <<<\033[0m " << std::endl;
}
}
}
if(fUseProof)
MyChain->SetProof(kTRUE);
else
......@@ -171,6 +183,13 @@ void SetStandardGlobalValues()
void ReadChain()
{
TString selector_name = "PlotResultsSelector";
if (gSystem->Getenv("PRS")) {
selector_name = gSystem->Getenv("PRS");
}
std::cout << "Analysis to be run : " << selector_name << std::endl;
gROOT->SetBatch(kTRUE);
if(fUseProof)
......@@ -192,13 +211,14 @@ void ReadChain()
gErrorIgnoreLevel = kFatal;
if(fNEntries==0)
MyChain->Process(Form("src/PlotResultsSelector.C+%s",comp_opt));
MyChain->Process(Form("src/%s.C+%s",selector_name.Data(),comp_opt));
else
{
fNEntries = min((ULong64_t)fNEntries, (ULong64_t)MyChain->GetEntries());
MyChain->Process(Form("src/PlotResultsSelector.C+%s",comp_opt),"",fNEntries);
MyChain->Process(Form("src/%s.C+%s",selector_name.Data(),comp_opt),"",fNEntries);
}
if(fUseProof)
{
fListOfHists = new TList();
......@@ -470,7 +490,7 @@ void ReadConfFile()
}
if(Buffer.BeginsWith("PSAFriendToProcess"))
{
fUsePSAFriend = true;
fUsePSAFriend = true;
TObjArray *loa=Buffer.Tokenize(" ");
fNedaFriend = ((TString)loa->At(1)->GetName());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment