#include "peachCake.C+" void plotPID() { vector skipRun = {0};//{239, 240, 242, 243, 244, 245, 255}; peachCake * selector = new peachCake(); selector->SaveNewTree(false); selector->SetPIDCorrectionFile(""); selector->SetPlotHist(false); for( int run = 272 ; run < 330 ; run ++){ printf("\033[31m######################################### run : %d \033[0m\n", run); bool contFlag = false; for( int k = 0; k < (int) skipRun.size(); k ++){ if( run == skipRun[k] ) contFlag = true; } if( contFlag ) continue; TChain * chain = new TChain("tree"); chain->Add(Form("root_data/run-%04d-*.root", run)); chain->GetListOfFiles()->Print(); int nFile = chain->GetListOfFiles()->GetEntries(); printf("================================ num of Files : %d \n", nFile); if( nFile == 0 ) continue; selector->SetHistRootFileName(Form("PID_runID/PID_%03d.root", run)); chain->Process(selector, ""); delete chain; } }