78 lines
2.1 KiB
C
78 lines
2.1 KiB
C
///#include "armory/evtReader.h"
|
|
|
|
///evtReader * evt = new evtReader("run-0238-00.evt", true);
|
|
|
|
#include "TString.h"
|
|
|
|
#include "peachCake.C+" // the + sign is make sure the peachCake is compiled.
|
|
|
|
void script() {
|
|
|
|
|
|
int runNum = 250;
|
|
|
|
TChain * chain = new TChain("tree");
|
|
//chain->Add(Form("root_data/run-%04d-*.root", runNum));
|
|
|
|
//chain->Add("root_data/run-0237-*.root");
|
|
//chain->Add("root_data/run-0238-*.root");
|
|
//chain->Add("root_data/run-0241-*.root");
|
|
|
|
// new beam
|
|
chain->Add("root_data/run-024[6-8]*.root");
|
|
chain->Add("root_data/run-0250*.root");
|
|
chain->Add("root_data/run-025[1-4].root");
|
|
chain->Add("root_data/run-025[6-9].root");
|
|
chain->Add("root_data/run-026[1-4]*.root");
|
|
chain->Add("root_data/run-0269*.root");
|
|
chain->Add("root_data/run-027[0-1]*.root");
|
|
chain->Add("root_data/run-028[3-4]*.root");
|
|
chain->Add("root_data/run-028[6-8]*.root");
|
|
chain->Add("root_data/run-0292*.root");
|
|
chain->Add("root_data/run-029[4-6]*.root");
|
|
chain->Add("root_data/run-029[8-9]*.root");
|
|
chain->Add("root_data/run-031*.root");
|
|
chain->Add("root_data/run-032*.root");
|
|
|
|
|
|
//chain->Add("root_data/run-0246-00.root");
|
|
//chain->Add("root_data/run-0246-01.root");
|
|
//chain->Add("root_data/run-0247-00.root");
|
|
//chain->Add("root_data/run-0247-01.root");
|
|
//chain->Add("root_data/run-0248-00.root");
|
|
//chain->Add("root_data/run-0250-00.root");
|
|
//chain->Add("root_data/run-0250-01.root");
|
|
|
|
bool isSaveNewTree = true;
|
|
|
|
TString histRootFileName = "";// Form("PID_%03d.root", runNum);
|
|
|
|
TString pidCorrFileName = "correction_PID.dat";
|
|
|
|
chain->GetListOfFiles()->Print();
|
|
int nFile = chain->GetListOfFiles()->GetEntries();
|
|
if( nFile == 0 ) return;
|
|
printf("================================ num of Files : %d \n", nFile);
|
|
|
|
printf("================================\n");
|
|
|
|
peachCake * selector = new peachCake();
|
|
selector->SaveNewTree(isSaveNewTree);
|
|
selector->SetPIDCorrectionFile(pidCorrFileName); //
|
|
selector->SetHistRootFileName(histRootFileName); //save histogram to root file.
|
|
|
|
chain->Process(selector, "");
|
|
|
|
|
|
|
|
|
|
///gROOT->ProcessLine("armory/nsclEvtReader.h");
|
|
///evt->ReadBlock(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|