#include <SelectUserObjects.hpp>
Inheritance diagram for cafe::SelectUserObjects< T >:

The cut is supplied by the user by overriding the virtual selectObject(const T& obj) method.
To use this class, inherit from it, passing the desired object type to the base class:
class MySelector : public SelectUserObjects<TMBJet> {
Then override the selectObject(const TMBJet& obj) method. The user can also override two more methods (which do nothing by default):
void before(Collection<T>& from); void after(Collection<T>& accepted, Collection<T>& rejected);
Configuration options:
Definition at line 55 of file SelectUserObjects.hpp.
Public Member Functions | |
| SelectUserObjects (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. | |
| const std::string & | treeName () const |
| ClassDef (SelectUserObjects, 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. | |
Protected Attributes | |
| std::string | _fromBranch |
| Event const * | _event |
| Variables | _vars |
Private Attributes | |
| std::string | _toBranch |
| std::string | _toRejectedBranch |
| std::string | _treeName |
| bool | _loadAll |
| TTree * | _tree |
| TClonesArray * | _result |
| TClonesArray * | _resultRejected |
| TBranch * | _branch |
| TBranch * | _branchRejected |
|
||||||||||
|
||||||||||
|
Add variables to branch for the partial read.
Definition at line 77 of file SelectUserObjects.hpp. References cafe::SelectUserObjects< T >::_vars, and cafe::Variables::add(). |
|
||||||||||||||||
|
Called after the selection is done.
Definition at line 208 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::processEvent(). |
|
||||||||||
|
Called before the actual selection starts. E.g. the input can be sorted here. Definition at line 203 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::processEvent(). |
|
||||||||||||||||
|
|
|
||||||||||
|
Called for every input file that is about to be closed.
Reimplemented from cafe::Processor. Definition at line 190 of file SelectUserObjects.hpp. References cafe::SelectUserObjects< T >::_branch, cafe::SelectUserObjects< T >::_branchRejected, cafe::SelectUserObjects< T >::_tree, and cafe::SelectUserObjects< T >::_treeName. |
|
||||||||||
|
Called for every new input file that was opened.
Reimplemented from cafe::Processor. Definition at line 154 of file SelectUserObjects.hpp. References cafe::SelectUserObjects< T >::_branch, cafe::SelectUserObjects< T >::_branchRejected, cafe::SelectUserObjects< T >::_fromBranch, cafe::SelectUserObjects< T >::_result, cafe::SelectUserObjects< T >::_resultRejected, cafe::SelectUserObjects< T >::_toBranch, cafe::SelectUserObjects< T >::_toRejectedBranch, cafe::SelectUserObjects< T >::_tree, cafe::SelectUserObjects< T >::_treeName, cafe::Processor::err(), cafe::Processor::fullName(), and cafe::Processor::name(). |
|
||||||||||
|
||||||||||
|
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::SelectUserObjects< T >::processEvent(). |
|
|||||||||
|
Definition at line 61 of file SelectUserObjects.hpp. References cafe::SelectUserObjects< T >::_treeName. |
|
|||||
|
Definition at line 91 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileClosing(), and cafe::SelectUserObjects< T >::inputFileOpened(). |
|
|||||
|
Definition at line 92 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileClosing(), and cafe::SelectUserObjects< T >::inputFileOpened(). |
|
|||||
|
Definition at line 80 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::processEvent(). |
|
|||||
|
Definition at line 79 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileOpened(), cafe::SelectUserObjects< T >::processEvent(), and cafe::SelectUserObjects< T >::SelectUserObjects(). |
|
|||||
|
Definition at line 87 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::processEvent(), and cafe::SelectUserObjects< T >::SelectUserObjects(). |
|
|||||
|
Definition at line 89 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileOpened(), and cafe::SelectUserObjects< T >::processEvent(). |
|
|||||
|
Definition at line 90 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileOpened(), and cafe::SelectUserObjects< T >::processEvent(). |
|
|||||
|
Definition at line 84 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileOpened(), and cafe::SelectUserObjects< T >::SelectUserObjects(). |
|
|||||
|
Definition at line 85 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileOpened(), and cafe::SelectUserObjects< T >::SelectUserObjects(). |
|
|||||
|
Definition at line 88 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileClosing(), and cafe::SelectUserObjects< T >::inputFileOpened(). |
|
|||||
|
Definition at line 86 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::inputFileClosing(), cafe::SelectUserObjects< T >::inputFileOpened(), cafe::SelectUserObjects< T >::SelectUserObjects(), and cafe::SelectUserObjects< T >::treeName(). |
|
|||||
|
Definition at line 81 of file SelectUserObjects.hpp. Referenced by cafe::SelectUserObjects< T >::addVariable(), cafe::SelectUserObjects< T >::processEvent(), and cafe::SelectUserObjects< T >::SelectUserObjects(). |
1.3.4