SOLARIS_Analysis/working/ChainMonitors.C

38 lines
934 B
C++
Raw Normal View History

2023-04-07 00:48:05 -04:00
#include "Monitor.C+" // the plus sign mean compilation
#include "TObjArray.h"
#include "TFile.h"
#include "TMacro.h"
#include "TChain.h"
TChain *gen_tree = nullptr;
2023-04-07 00:48:05 -04:00
void ChainMonitors(int RUNNUM = -1, int RUNNUM2 = -1) {
2023-03-31 16:08:06 -04:00
///default saveCanvas = false, no save Cavas
/// = true, save Canvas
gen_tree = new TChain("gen_tree");
2023-03-31 16:08:06 -04:00
if( RUNNUM == -1){
/// this list only for manual Chain sort
///********** start Marker for AutoCalibration.
gen_tree->Add("../root_data/trace_run033.root");
2023-03-31 16:08:06 -04:00
///********** end Marker for AutoCalibration.
}else{
TString fileName;
int endRUNNUM = RUNNUM2;
if( RUNNUM2 == -1) endRUNNUM = RUNNUM;
2023-03-31 16:08:06 -04:00
for( int i = RUNNUM ; i <= endRUNNUM ; i++){
2023-04-07 00:48:05 -04:00
fileName.Form("../root_data/gen_run%03d.root", i);
gen_tree->Add(fileName);
2023-03-31 16:08:06 -04:00
}
}
//^============== should have other things, like calibrations.
Monitor(gen_tree);
}