00001 #include "RecoParticleFlow/PFRootEvent/interface/MyPFRootEventManager.h" 00002 00003 #include <TFile.h> 00004 00005 #include <iostream> 00006 00007 using namespace std; 00008 00009 00010 MyPFRootEventManager::MyPFRootEventManager(const char* file) 00011 : PFRootEventManager(file) { 00012 00013 // book histos here 00014 00015 // you can add your own options to the option file, 00016 // following the model of PFRootEventManager::readOptions 00017 } 00018 00019 00020 MyPFRootEventManager::~MyPFRootEventManager() { 00021 // delete histos here 00022 } 00023 00024 00025 bool MyPFRootEventManager::processEntry(int entry) { 00026 if( ! PFRootEventManager::processEntry(entry) ) 00027 return false; // event not accepted 00028 00029 // fill histos here 00030 00031 cout<<"true particles: "<<endl; 00032 00033 for(unsigned i=0; i<trueParticles_.size(); i++) { 00034 const reco::PFSimParticle& ptc = trueParticles_[i]; 00035 00036 cout<<ptc<<endl; 00037 } 00038 00039 00040 // cout<<"particle flow blocks : "<<endl; 00041 00042 // for(unsigned i=0; i<allPFBs_.size(); i++) { 00043 // const PFBlock& block = allPFBs_[i]; 00044 00045 // cout<<block<<endl; 00046 // } 00047 00048 // clusters can be accessed here, or through the pflow blocks 00049 for(unsigned i=0; i<clustersECAL_->size(); i++) { 00050 ; 00051 } 00052 00053 00054 00055 return false; 00056 } 00057 00058 00059 00060 00061 void MyPFRootEventManager::write() { 00062 // write histos here 00063 outFile_->cd(); 00064 } 00065