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"
|
2024-07-10 17:34:20 -04:00
|
|
|
#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
|
|
|
|
|
2024-07-10 17:34:20 -04:00
|
|
|
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.
|
|
|
|
|
2024-07-10 17:34:20 -04:00
|
|
|
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;
|
2024-07-10 17:34:20 -04:00
|
|
|
|
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);
|
2024-07-10 17:34:20 -04:00
|
|
|
gen_tree->Add(fileName);
|
2023-03-31 16:08:06 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-10 17:34:20 -04:00
|
|
|
//^============== should have other things, like calibrations.
|
|
|
|
Monitor(gen_tree);
|
2023-04-07 16:22:37 -04:00
|
|
|
|
|
|
|
}
|