#define basic_try_cxx #include "basic_try.h" #include #include #include float fpot(float l,float b,float pot); float fpot(float l,float b,float pot) { float final; final=pot*l/b; return final; } void basic_try::Loop() { c1 = new TCanvas("c1","Canvas",0,0,1200,840); c1->Divide(1,1); c1->SetFillColor(10); TH1F *h0 = new TH1F("fpot","",15,0.,10.); TH1F *h1 = new TH1F("","",150.,0.,300.); TH1F *h2 = new TH1F("","",6,0.,6.); TH1F *h3 = new TH1F("","",60,-6.,6.); TH1F *h4 = new TH1F("","",100,0.,3000.); if (fChain == 0) return; Int_t nentries = fChain->GetEntriesFast(); //skeleton Int_t nbytes = 0, nb = 0; Int_t print=0;//skeleton // //define variables and cuts int cut1 = 0; int cut2 = 0; int cut3 = 0; int cut4 = 0; int cut5 = 0; // for (Int_t jentry=0; jentryGetEntry(jentry); nbytes += nb; print=jentry+1; if ((print%100)==0) printf("Reading Event: %d\n", jentry+1); totnumevents++; //Loops, algos etc. for (Int_t i=0; i<1000;i++){ fpot(l,b,pot); } h0->Fill(fpot); } c1->cd(1); h0->Draw(); c1->Modified(); c1->Update(); cout<<"Total number of events="<<"\t"<