75 lines
2.0 KiB
C
75 lines
2.0 KiB
C
///#include "armory/evtReader.h"
|
|
|
|
///evtReader * evt = new evtReader("run-0238-00.evt", true);
|
|
|
|
#include "peachCake.C+"
|
|
|
|
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-0246-*.root");
|
|
//chain->Add("root_data/run-0247-*.root");
|
|
//chain->Add("root_data/run-0248-*.root");
|
|
//chain->Add("root_data/run-0249-*.root");
|
|
//chain->Add("root_data/run-0250-*.root");
|
|
//chain->Add("root_data/run-0251-*.root");
|
|
//chain->Add("root_data/run-0252-*.root");
|
|
//chain->Add("root_data/run-0253-*.root");
|
|
//chain->Add("root_data/run-0254-*.root");
|
|
//chain->Add("root_data/run-0257-*.root");
|
|
//chain->Add("root_data/run-0258-*.root");
|
|
//chain->Add("root_data/run-0259-*.root");
|
|
//chain->Add("root_data/run-0261-*.root");
|
|
//chain->Add("root_data/run-0262-*.root");
|
|
//chain->Add("root_data/run-0263-*.root");
|
|
//chain->Add("root_data/run-0264-*.root");
|
|
//chain->Add("root_data/run-0269-*.root");
|
|
//chain->Add("root_data/run-0270-*.root");
|
|
chain->Add("root_data/run-0271-*.root");
|
|
|
|
int nFile = chain->GetListOfFiles()->GetEntries();
|
|
|
|
printf("================================ num of Files : %d \n", nFile);
|
|
|
|
if( nFile == 0 ) return;
|
|
|
|
bool isSaveNewTree = false;
|
|
|
|
TString histRootFileName = "";// Form("PID_%03d.root", runNum);
|
|
|
|
TString pidCorrFileName = "correction_PID.dat";
|
|
|
|
chain->GetListOfFiles()->Print();
|
|
|
|
printf("================================\n");
|
|
|
|
peachCake * selector = new peachCake();
|
|
selector->SaveNewTree(isSaveNewTree);
|
|
selector->SetPIDCorrectionFile(pidCorrFileName);
|
|
selector->SetHistRootFileName(histRootFileName);
|
|
|
|
chain->Process(selector, "");
|
|
|
|
|
|
|
|
|
|
///gROOT->ProcessLine("armory/nsclEvtReader.h");
|
|
///evt->ReadBlock(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|