CMS 3D CMS Logo

Public Member Functions

MyPFRootEventManager Class Reference

#include <MyPFRootEventManager.h>

Inheritance diagram for MyPFRootEventManager:
PFRootEventManager

List of all members.

Public Member Functions

 MyPFRootEventManager (const char *file)
bool processEntry (int entry)
 process one entry (pass the TTree entry)
void write ()
 ~MyPFRootEventManager ()

Detailed Description

Definition at line 17 of file MyPFRootEventManager.h.


Constructor & Destructor Documentation

MyPFRootEventManager::MyPFRootEventManager ( const char *  file)

Definition at line 10 of file MyPFRootEventManager.cc.

  : PFRootEventManager(file) {
  
  // book histos here

  // you can add your own options to the option file,
  // following the model of PFRootEventManager::readOptions
}
MyPFRootEventManager::~MyPFRootEventManager ( )

Definition at line 20 of file MyPFRootEventManager.cc.

                                            {
  // delete histos here
}

Member Function Documentation

bool MyPFRootEventManager::processEntry ( int  entry) [virtual]

process one entry (pass the TTree entry)

Reimplemented from PFRootEventManager.

Definition at line 25 of file MyPFRootEventManager.cc.

References PFRootEventManager::clustersECAL_, gather_cfg::cout, i, PFRootEventManager::processEntry(), and PFRootEventManager::trueParticles_.

                                                 {
  if( ! PFRootEventManager::processEntry(entry) )
    return false; // event not accepted

  // fill histos here

  cout<<"true particles: "<<endl;

  for(unsigned i=0; i<trueParticles_.size(); i++) {
    const reco::PFSimParticle& ptc = trueParticles_[i];
      
    cout<<ptc<<endl;
  }

  
  //   cout<<"particle flow blocks : "<<endl;

  //   for(unsigned i=0; i<allPFBs_.size(); i++) {
  //     const PFBlock& block = allPFBs_[i];
      
  //     cout<<block<<endl;
  //   }

  // clusters can be accessed here, or through the pflow blocks
  for(unsigned i=0; i<clustersECAL_->size(); i++) {
    ;
  }   



  return false;
}
void MyPFRootEventManager::write ( void  ) [virtual]

Reimplemented from PFRootEventManager.

Definition at line 61 of file MyPFRootEventManager.cc.

References PFRootEventManager::outFile_.

                                 {
  // write histos here
  outFile_->cd();
}