cafe::RandomSelectUserObjects< T > Class Template Reference

#include <RandomSelectUserObjects.hpp>

Inheritance diagram for cafe::RandomSelectUserObjects< T >:

cafe::RandomProcessor cafe::Processor List of all members.

template<class T>
class cafe::RandomSelectUserObjects< T >


Public Member Functions

 RandomSelectUserObjects (const char *name)
void inputFileOpened (TFile *file)
 Called for every new input file that was opened.

void inputFileClosing (TFile *file)
 Called for every input file that is about to be closed.

bool processEvent (cafe::Event &event)
 Called for every event.

 ClassDef (RandomSelectUserObjects, 0)

Protected Member Functions

virtual bool selectObject (const T &obj)=0
 Abstract select method to be overridden by user.

virtual void before (Collection< T > &from)
 Called before the actual selection starts.

virtual void after (Collection< T > &accepted, Collection< T > &rejected)
 Called after the selection is done.

void addVariable (const std::string &name)
 Add variables to branch for the partial read.


Private Attributes

std::string _fromBranch
std::string _toBranch
std::string _toRejectedBranch
std::string _treeName
TTree * _tree
TClonesArray * _result
TClonesArray * _resultRejected
TBranch * _branch
TBranch * _branchRejected
Variables _vars

Constructor & Destructor Documentation

template<class T>
cafe::RandomSelectUserObjects< T >::RandomSelectUserObjects const char *  name  ) 
 

Definition at line 130 of file RandomSelectUserObjects.hpp.

References cafe::RandomSelectUserObjects< T >::_fromBranch, cafe::RandomSelectUserObjects< T >::_toBranch, cafe::RandomSelectUserObjects< T >::_toRejectedBranch, cafe::RandomSelectUserObjects< T >::_treeName, cafe::RandomSelectUserObjects< T >::_vars, cafe::Config::get(), cafe::Config::getVString(), cafe::Processor::name(), and cafe::Processor::out().


Member Function Documentation

template<class T>
void cafe::RandomSelectUserObjects< T >::addVariable const std::string &  name  )  [inline, protected]
 

Add variables to branch for the partial read.

Definition at line 108 of file RandomSelectUserObjects.hpp.

References cafe::RandomSelectUserObjects< T >::_vars, and cafe::Variables::add().

template<class T>
void cafe::RandomSelectUserObjects< T >::after Collection< T > &  accepted,
Collection< T > &  rejected
[protected, virtual]
 

Called after the selection is done.

Definition at line 229 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::processEvent().

template<class T>
void cafe::RandomSelectUserObjects< T >::before Collection< T > &  from  )  [protected, virtual]
 

Called before the actual selection starts.

E.g. the input can be sorted here.

Definition at line 224 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::processEvent().

template<class T>
cafe::RandomSelectUserObjects< T >::ClassDef RandomSelectUserObjects< T >  ,
 

template<class T>
void cafe::RandomSelectUserObjects< T >::inputFileClosing TFile *  file  )  [virtual]
 

Called for every input file that is about to be closed.

Reimplemented from cafe::Processor.

Definition at line 211 of file RandomSelectUserObjects.hpp.

References cafe::RandomSelectUserObjects< T >::_branch, cafe::RandomSelectUserObjects< T >::_branchRejected, cafe::RandomSelectUserObjects< T >::_tree, and cafe::RandomSelectUserObjects< T >::_treeName.

template<class T>
void cafe::RandomSelectUserObjects< T >::inputFileOpened TFile *  file  )  [virtual]
 

Called for every new input file that was opened.

Reimplemented from cafe::RandomProcessor.

Definition at line 178 of file RandomSelectUserObjects.hpp.

References cafe::RandomSelectUserObjects< T >::_branch, cafe::RandomSelectUserObjects< T >::_branchRejected, cafe::RandomSelectUserObjects< T >::_fromBranch, cafe::RandomSelectUserObjects< T >::_result, cafe::RandomSelectUserObjects< T >::_resultRejected, cafe::RandomSelectUserObjects< T >::_toBranch, cafe::RandomSelectUserObjects< T >::_toRejectedBranch, cafe::RandomSelectUserObjects< T >::_tree, cafe::RandomSelectUserObjects< T >::_treeName, cafe::Processor::err(), cafe::Processor::fullName(), and cafe::Processor::name().

template<class T>
bool cafe::RandomSelectUserObjects< T >::processEvent cafe::Event event  )  [virtual]
 

Called for every event.

Reimplemented from cafe::RandomProcessor.

Definition at line 234 of file RandomSelectUserObjects.hpp.

References cafe::RandomSelectUserObjects< T >::_fromBranch, cafe::RandomSelectUserObjects< T >::_result, cafe::RandomSelectUserObjects< T >::_resultRejected, cafe::RandomSelectUserObjects< T >::_vars, cafe::RandomSelectUserObjects< T >::after(), cafe::RandomSelectUserObjects< T >::before(), cafe::Collection< T >::begin(), cafe::Collection< T >::end(), cafe::EventBase::getCollection(), cafe::EventBase::readBranch(), and cafe::RandomSelectUserObjects< T >::selectObject().

template<class T>
virtual bool cafe::RandomSelectUserObjects< T >::selectObject const T &  obj  )  [protected, pure virtual]
 

Abstract select method to be overridden by user.

Each object for which this method returns true will be put into the result branch, rejected objected will be put in the rejected object branch

Referenced by cafe::RandomSelectUserObjects< T >::processEvent().


Member Data Documentation

template<class T>
TBranch* cafe::RandomSelectUserObjects< T >::_branch [private]
 

Definition at line 118 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileClosing(), and cafe::RandomSelectUserObjects< T >::inputFileOpened().

template<class T>
TBranch* cafe::RandomSelectUserObjects< T >::_branchRejected [private]
 

Definition at line 119 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileClosing(), and cafe::RandomSelectUserObjects< T >::inputFileOpened().

template<class T>
std::string cafe::RandomSelectUserObjects< T >::_fromBranch [private]
 

Definition at line 111 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileOpened(), cafe::RandomSelectUserObjects< T >::processEvent(), and cafe::RandomSelectUserObjects< T >::RandomSelectUserObjects().

template<class T>
TClonesArray* cafe::RandomSelectUserObjects< T >::_result [private]
 

Definition at line 116 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileOpened(), and cafe::RandomSelectUserObjects< T >::processEvent().

template<class T>
TClonesArray* cafe::RandomSelectUserObjects< T >::_resultRejected [private]
 

Definition at line 117 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileOpened(), and cafe::RandomSelectUserObjects< T >::processEvent().

template<class T>
std::string cafe::RandomSelectUserObjects< T >::_toBranch [private]
 

Definition at line 112 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileOpened(), and cafe::RandomSelectUserObjects< T >::RandomSelectUserObjects().

template<class T>
std::string cafe::RandomSelectUserObjects< T >::_toRejectedBranch [private]
 

Definition at line 113 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileOpened(), and cafe::RandomSelectUserObjects< T >::RandomSelectUserObjects().

template<class T>
TTree* cafe::RandomSelectUserObjects< T >::_tree [private]
 

Definition at line 115 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileClosing(), and cafe::RandomSelectUserObjects< T >::inputFileOpened().

template<class T>
std::string cafe::RandomSelectUserObjects< T >::_treeName [private]
 

Definition at line 114 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::inputFileClosing(), cafe::RandomSelectUserObjects< T >::inputFileOpened(), and cafe::RandomSelectUserObjects< T >::RandomSelectUserObjects().

template<class T>
Variables cafe::RandomSelectUserObjects< T >::_vars [private]
 

Definition at line 120 of file RandomSelectUserObjects.hpp.

Referenced by cafe::RandomSelectUserObjects< T >::addVariable(), cafe::RandomSelectUserObjects< T >::processEvent(), and cafe::RandomSelectUserObjects< T >::RandomSelectUserObjects().


The documentation for this class was generated from the following file:
Generated on Thu Apr 3 04:14:27 2008 for CAF by doxygen 1.3.4