Skip to content
Snippets Groups Projects
Commit 3de15cb3 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

*Adding option to set the tree circular

parent 7f9a421c
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,7 @@ void NPOptionManager::ReadTheInputArgument(int argc, char** argv){ ...@@ -76,6 +76,7 @@ void NPOptionManager::ReadTheInputArgument(int argc, char** argv){
fInputPhysicalTreeOption = false; fInputPhysicalTreeOption = false;
fGenerateHistoOption = false ; fGenerateHistoOption = false ;
fPROOFMode = false; fPROOFMode = false;
fCircularTree = false;
fOnline = false; fOnline = false;
fG4BatchMode = false; fG4BatchMode = false;
#ifdef __linux__ #ifdef __linux__
...@@ -159,6 +160,8 @@ void NPOptionManager::ReadTheInputArgument(int argc, char** argv){ ...@@ -159,6 +160,8 @@ void NPOptionManager::ReadTheInputArgument(int argc, char** argv){
else if (argument == "--online") {fOnline = true ;fGenerateHistoOption=true;} else if (argument == "--online") {fOnline = true ;fGenerateHistoOption=true;}
else if (argument == "--circular") {fCircularTree = true;}
//else ; //else ;
} }
...@@ -408,6 +411,7 @@ void NPOptionManager::DisplayHelp(){ ...@@ -408,6 +411,7 @@ void NPOptionManager::DisplayHelp(){
std::cout << "\t--last-res\t\t\tIgnore the list of Run to treat if any and analysed the last Result file" << std::endl ; std::cout << "\t--last-res\t\t\tIgnore the list of Run to treat if any and analysed the last Result file" << std::endl ;
std::cout << "\t--last-any\t\t\tIgnore the list of Run to treat if any and analysed the last generated root file" << std::endl ; std::cout << "\t--last-any\t\t\tIgnore the list of Run to treat if any and analysed the last generated root file" << std::endl ;
std::cout << "\t--online \t\t\tStart the spectra server" << std::endl ; std::cout << "\t--online \t\t\tStart the spectra server" << std::endl ;
std::cout << "\t--circular \t\t\tSet the output tree a circular one" << std::endl ;
std::cout << std::endl << "NPSimulation only:"<<std::endl; std::cout << std::endl << "NPSimulation only:"<<std::endl;
std::cout << "\t-M <arg>\t\t\tExecute Geant4 macro <arg> at startup" << std::endl ; std::cout << "\t-M <arg>\t\t\tExecute Geant4 macro <arg> at startup" << std::endl ;
std::cout << "\t-B <arg>\t\t\tExecute in batch mode (no ui) with Geant4 macro <arg> at startup" << std::endl ; std::cout << "\t-B <arg>\t\t\tExecute in batch mode (no ui) with Geant4 macro <arg> at startup" << std::endl ;
......
...@@ -102,6 +102,7 @@ class NPOptionManager{ ...@@ -102,6 +102,7 @@ class NPOptionManager{
bool GetOnline() {return fOnline;} bool GetOnline() {return fOnline;}
bool GetPROOF() {return fPROOFMode;} bool GetPROOF() {return fPROOFMode;}
bool GetG4BatchMode() {return fG4BatchMode;} bool GetG4BatchMode() {return fG4BatchMode;}
bool GetCircularTree() {return fCircularTree;}
int GetVerboseLevel() {return fVerboseLevel;} int GetVerboseLevel() {return fVerboseLevel;}
int GetNumberOfEntryToAnalyse() {return fNumberOfEntryToAnalyse;} int GetNumberOfEntryToAnalyse() {return fNumberOfEntryToAnalyse;}
int GetFirstEntryToAnalyse() {return fFirstEntryToAnalyse;} int GetFirstEntryToAnalyse() {return fFirstEntryToAnalyse;}
...@@ -141,6 +142,7 @@ class NPOptionManager{ ...@@ -141,6 +142,7 @@ class NPOptionManager{
bool fLastPhyFile; bool fLastPhyFile;
bool fLastResFile; bool fLastResFile;
bool fLastAnyFile; bool fLastAnyFile;
bool fCircularTree;
int fVerboseLevel; // 0 for not talk, 1 for talking int fVerboseLevel; // 0 for not talk, 1 for talking
int fNumberOfEntryToAnalyse; // use to limit the number of analysed in NPA int fNumberOfEntryToAnalyse; // use to limit the number of analysed in NPA
int fFirstEntryToAnalyse; // use to set the first event analysed in NPA (total: fFirstEntryToAnalyse -> fFirstEntryToAnalyse + fNumberOfEntryToAnalyse) int fFirstEntryToAnalyse; // use to set the first event analysed in NPA (total: fFirstEntryToAnalyse -> fFirstEntryToAnalyse + fNumberOfEntryToAnalyse)
......
...@@ -125,6 +125,10 @@ RootOutput::RootOutput(std::string fileNameBase, std::string treeNameBase){ ...@@ -125,6 +125,10 @@ RootOutput::RootOutput(std::string fileNameBase, std::string treeNameBase){
// Init TAsciiFile objects // Init TAsciiFile objects
InitAsciiFiles(); InitAsciiFiles();
gDirectory->cd(currentPath->GetPath()); gDirectory->cd(currentPath->GetPath());
if(!NPOptionManager::getInstance()->GetCircularTree()){
pRootTree->SetCircular(10000);
}
} }
......
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