CMS 3D CMS Logo

MyPFRootEventManager.cc

Go to the documentation of this file.
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   // access island clusters, which are read from the input tree
00054   for(unsigned i=0; i<clustersIslandBarrel_.size(); i++) {
00055     ;
00056   }
00057 
00058   return false;
00059 }
00060 
00061 
00062 
00063 
00064 void MyPFRootEventManager::write() {
00065   // write histos here
00066   outFile_->cd();
00067 }
00068 

Generated on Tue Jun 9 17:44:46 2009 for CMSSW by  doxygen 1.5.4