#include "TCanvas.h" #include "TF1.h" #include "TFile.h" #include "TH1.h" #include "TStopwatch.h" #include "TString.h" #include #include #include // using namespace std; // Int_t i; Int_t j; Int_t k; // void TestScript() { // TStopwatch stopwatch; // //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%% Original data file from the experiment %%%%%%%%%%%%%%%%%// //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // string datafile = "se77tf1209_r04_439keV"; // //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // TString Pf[5][4]; TString Ph[5][4]; // TCanvas *PC[5]; TFile *f[5][4]; TH1 *h[5][4]; // // //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%% Sorted Data Files to be evaluated%%%%%%%%%%%%%%%%%%%%%%%%%%// //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Int_t PE_tally=5; Int_t GE_tally=4; for (i=0;iDivide(1,4); //This divide is not happening for (j=0;jcd(j); f[i][j] = TFile::Open( Pf[i][j].Data(), "READ" ); h[i][j]= (TH1*)f[i][j]->FindObjectAny(Ph[i][j].Data()); h[i][j]->Draw(); } } // stopwatch.Stop(); // cout << "\nProgram run-time details \nRealtime = " << stopwatch.RealTime() << "\tCputime = " << stopwatch.CpuTime() << "\tLivetime = " << 100*stopwatch.CpuTime()/stopwatch.RealTime() <<"%\n"<< endl; // }