//================================================================== // // top_find.C // // Version 0.0: P. Koehn 5/5/01 // //================================================================== { //timer start gROOT->Time(); // Instantiate a StnAna object //---------------------------- // TStnAna x("/nosu1a/thomsone/stnmaker_3725_ele_1000.root"); // data // // Make a chain of files TStnAna x("/datalx0a/run2/stntuple/loose_electrons"); // data // Compile required code //----------------------- gSystem->CompileMacro("TConvEleCand.cc","k"); // // Make the output histogram file TFile* HistFile = new TFile("convele_cand.hbk","RECREATE","test file"); // Create pointer to a TopCand object //---------------------------------------- cout << ">>> TopCand object <<<" << endl; TConvEleCand* ec = new TConvEleCand(HistFile,"EleConv","EleConv"); // // Turn the histograms on ec->enableEleHist(true); // The module must be added to TStnAna object the for // events to be processed by the TopCand module properly. x.AddModule(ec); // Run the StnAna object over the root file specified at instantiation //-------------------------------------------------------------------- x.Run(1000); // Or just grab the histos directly from TTopFindModule.cc //======================================================== //TCanvas* can = (TCanvas*) gROOT->FindObject("top find"); //can = new TCanvas("top find", "good jets",40,40,600,600); //can->Divide(2,2); //TTopFindModule::Hist_t* hstr = tf->GetHist(); //can->cd(1); //hstr.fJet->fgnj->Draw(); //can->cd(2); //hstr.fJet->fget->Draw(); //can->cd(3); //hstr.fJet->fgeta->Draw(); // Save a predefined set o' histos to file //tf->SaveHistograms("MyFavouriteHistos.root"); printf("Job Finished.\n"); printf("Output histograms are stored in: %s\n",gFile->GetName()); // // Now close the histogram file HistFile->Write(); HistFile->Close(); //timer start gROOT->Time(); }