{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Tue Jul 14 10:50:34 2009 by ROOT version5.18/00d) // from TChain TrigResultTree/ ////////////////////////////////////////////////////////// //Reset ROOT and connect tree file gROOT->Reset(); #ifdef SINGLE_TREE // The following code should be used if you want this code to access // a single tree instead of a chain TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/scratch/dervan/H130GeV_Output.root"); if (!f) { f = new TFile("/scratch/dervan/H130GeV_Output.root"); } TTree *TrigResultTree = (TTree*)gDirectory->Get("TrigResultTree"); #else // SINGLE_TREE // The following code should be used if you want this code to access a chain // of trees. TChain *TrigResultTree = new TChain("TrigResultTree",""); TrigResultTree->Add("/scratch/dervan/H130GeV_Output.root/TrigResultTree"); #endif // SINGLE_TREE //Declaration of leaves types Int_t RunNumber; Int_t EventNumber; Char_t Token[153]; vector > Passed_mu20; vector > Passed_e22i_L33; vector > Passed_2e15i; vector > Passed_2mu10; vector > Passed_mu10; vector > Passed_e15i; // Set branch addresses. TrigResultTree->SetBranchAddress("RunNumber",&RunNumber); TrigResultTree->SetBranchAddress("EventNumber",&EventNumber); TrigResultTree->SetBranchAddress("Token",Token); TrigResultTree->SetBranchAddress("Passed_mu20",&Passed_mu20); TrigResultTree->SetBranchAddress("Passed_e22i_L33",&Passed_e22i_L33); TrigResultTree->SetBranchAddress("Passed_2e15i",&Passed_2e15i); TrigResultTree->SetBranchAddress("Passed_2mu10",&Passed_2mu10); TrigResultTree->SetBranchAddress("Passed_mu10",&Passed_mu10); TrigResultTree->SetBranchAddress("Passed_e15i",&Passed_e15i); // This is the loop skeleton // To read only selected branches, Insert statements like: // TrigResultTree->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Long64_t nentries = TrigResultTree->GetEntries(); Long64_t nbytes = 0; // for (Long64_t i=0; iGetEntry(i); // } }