#include <Processor.hpp>
Inheritance diagram for cafe::Processor:

Public Member Functions | |
| Processor (const char *name) | |
| virtual | ~Processor () |
| ClassDef (Processor, 0) | |
| virtual void | begin () |
| Called at beginning of processing. | |
| virtual void | finish () |
| Called at end of processing. | |
| virtual void | inputFileOpened (TFile *file) |
| Called for every new input file that was opened. | |
| virtual void | inputFileClosing (TFile *file) |
| Called for every input file that is about to be closed. | |
| virtual bool | processEvent (cafe::Event &event) |
| Called for every event. | |
| void | incEventCount () |
| Increment the internal event counter (used by Controller only). | |
| int | eventCount () const |
| Number of events this Processor has seen. | |
| std::string | name () const |
| The name of the Processor as passed to the constructor. | |
| std::string | fullName () const |
| The full name with all parents included. | |
| std::ostream & | out () |
| Return a stream to print normal output messages to (cout by default). | |
| std::ostream & | info () |
| Return a stream to print informational messages to (cout by default). | |
| std::ostream & | warn () |
| Return a stream to print warning messages to (cout by default). | |
| std::ostream & | err () |
| Return a stream to print error messages (cerr by default). | |
| unsigned int | debug () const |
| Return debug level, 0 = no debug output, the higher the more verbose... | |
| virtual void | setDebug (unsigned int level) |
| Set the debug level. Usually done by controller. | |
| TDirectory * | getDirectory () const |
| Get the current directory. | |
| Processor * | getParent () const |
| Get the parent processor or NULL if top level Processor. | |
| std::string | resolve (const std::string &name, bool recurse=true) const |
| Try to Resolve 'name' in all configurations starting from this Processor. | |
| std::string | replace (const std::string &input, bool recurse=true) const |
| Replace every occurence in 'input' of the form {name} by the result of calling resolve(name). | |
Static Public Member Functions | |
| Processor * | Create (const std::string &className, const std::string &instance="") |
| Create a new Processor from the class name. | |
Protected Member Functions | |
| Processor () | |
| void | setDirectory (TDirectory *dir) |
| void | setParent (Processor *parent) |
Private Attributes | |
| unsigned int | _eventCount |
| unsigned int | _debug |
| std::string | _name |
| TDirectory * | _directory |
| Processor * | _parent |
Friends | |
| class | Controller |
Defines the interface and provides default implementations for all of them.
A user should derive from this class and override the methods she is interested in. Typically this is at least processEvent().
The derived class _must_ have a constructor that takes a 'const char *' as an argument.
Definition at line 32 of file Processor.hpp.
|
|
Definition at line 23 of file Processor.cpp. |
|
|
Definition at line 39 of file Processor.cpp. |
|
|
Definition at line 31 of file Processor.cpp. |
|
|
Called at beginning of processing.
Reimplemented in cafe::ConfigDumper, cafe::Controller, cafe::Hist1D, cafe::Hist2D, cafe::Hist3D, cafe::Stat, caf_util::ResSelector, and caf_util::VertexSelector. Definition at line 43 of file Processor.cpp. |
|
||||||||||||
|
|
|
||||||||||||
|
Create a new Processor from the class name. Pass 'instance' as the new name of the object. Definition at line 187 of file Processor.cpp. References cafe::Plugins::load(). |
|
|
Return debug level, 0 = no debug output, the higher the more verbose...
Definition at line 64 of file Processor.cpp. References _debug. Referenced by cafe::Controller::add(), caf_util::VertexSelector::begin(), caf_util::ElectronSelector::finish(), caf_util::ResSelector::processEvent(), caf_util::METSelector::processEvent(), caf_util::JetSelector::processEvent(), caf_util::FindDuplicateEvents::processEvent(), caf_util::ElectronSelector::processEvent(), caf_util::VertexSelector::selectObject(), caf_util::JetSelector::selectObject(), and caf_util::ElectronSelector::selectObject(). |
|
|
|
Number of events this Processor has seen.
Definition at line 80 of file Processor.cpp. References _eventCount. Referenced by cafe::Write::processEvent(), cafe::RunController::Run(), and cafe::Timer::~Timer(). |
|
|
Called at end of processing.
Reimplemented in cafe::ConfigDumper, cafe::Controller, cafe::EventList, cafe::EventMultiSplitter, cafe::Stat, cafe::Write, caf_util::ElectronSelector, and caf_util::FindDuplicateEvents. Definition at line 47 of file Processor.cpp. |
|
|
The full name with all parents included. This is only valid once the whole Processor chain has been constructed. Definition at line 148 of file Processor.cpp. References _name, and _parent. Referenced by cafe::Controller::add(), cafe::Hist3D::begin(), cafe::Hist2D::begin(), cafe::Hist1D::begin(), cafe::ConfigDumper::finish(), cafe::SelectUserObjects< T >::inputFileOpened(), cafe::SelectObjects::inputFileOpened(), caf_util::ReComputeMET::inputFileOpened(), and cafe::RunController::Run(). |
|
|
Get the current directory.
Definition at line 95 of file Processor.cpp. References _directory, and _parent. Referenced by caf_util::ResSelector::begin(), cafe::Hist3D::begin(), cafe::Hist2D::begin(), cafe::Hist1D::begin(), cafe::Controller::begin(), cafe::ConfigDumper::finish(), and cafe::Write::inputFileOpened(). |
|
|
Get the parent processor or NULL if top level Processor.
Definition at line 107 of file Processor.cpp. References _parent. Referenced by resolve(). |
|
|
Increment the internal event counter (used by Controller only).
Definition at line 74 of file Processor.cpp. References _eventCount, cafe::Stat::EventSelected(), name(), and STAT. Referenced by cafe::RunController::processTree(). |
|
|
Return a stream to print informational messages to (cout by default).
Definition at line 169 of file Processor.cpp. |
|
|
Called for every input file that is about to be closed.
Reimplemented in cafe::Controller, cafe::EventList, cafe::SelectObjects, cafe::SelectUserObjects< T >, caf_util::ReComputeMET, cafe::SelectUserObjects< TMBJet >, cafe::SelectUserObjects< TMBTau >, cafe::SelectUserObjects< TMBMuon >, cafe::SelectUserObjects< TMBPrimaryVertex >, and cafe::SelectUserObjects< TMBEMCluster >. Definition at line 55 of file Processor.cpp. |
|
|
Called for every new input file that was opened.
Reimplemented in cafe::Controller, cafe::EventList, cafe::Friend, cafe::Hist1D, cafe::Hist2D, cafe::Hist3D, cafe::If, cafe::Select, cafe::SelectObjects, cafe::SelectUserObjects< T >, cafe::Write, caf_util::ReComputeMET, cafe::SelectUserObjects< TMBJet >, cafe::SelectUserObjects< TMBTau >, cafe::SelectUserObjects< TMBMuon >, cafe::SelectUserObjects< TMBPrimaryVertex >, and cafe::SelectUserObjects< TMBEMCluster >. Definition at line 51 of file Processor.cpp. |
|
|
|
|
||||||||||||
|
Replace every occurence in 'input' of the form {name} by the result of calling resolve(name).
Definition at line 128 of file Processor.cpp. References resolve(). Referenced by cafe::Hist1D::begin(), cafe::Hist2D::Hist2D(), and cafe::Hist3D::Hist3D(). |
|
||||||||||||
|
Try to Resolve 'name' in all configurations starting from this Processor. Try parent if 'recurse' is true. Definition at line 112 of file Processor.cpp. References cafe::Config::get(), getParent(), and name(). Referenced by replace(). |
|
|
Set the debug level. Usually done by controller.
Reimplemented in cafe::Controller. Definition at line 69 of file Processor.cpp. References _debug. Referenced by cafe::Controller::add(). |
|
|
Definition at line 90 of file Processor.cpp. References _directory. Referenced by cafe::Controller::begin(). |
|
|
Definition at line 101 of file Processor.cpp. References _parent. Referenced by cafe::Controller::add(). |
|
|
Return a stream to print warning messages to (cout by default).
Definition at line 174 of file Processor.cpp. Referenced by caf_util::ResSelector::GetElectron(), caf_util::ResSelector::GetMuon(), caf_util::ResSelector::mass(), and cafe::Trigger::Trigger(). |
|
|
Definition at line 125 of file Processor.hpp. |
|
|
Reimplemented in caf_util::ApplyJES, caf_util::EMJetMatching, and caf_util::ReComputeMET. Definition at line 132 of file Processor.hpp. Referenced by debug(), and setDebug(). |
|
|
Definition at line 134 of file Processor.hpp. Referenced by getDirectory(), and setDirectory(). |
|
|
Definition at line 131 of file Processor.hpp. Referenced by eventCount(), and incEventCount(). |
|
|
Definition at line 133 of file Processor.hpp. Referenced by fullName(), and name(). |
|
|
Definition at line 135 of file Processor.hpp. Referenced by fullName(), getDirectory(), getParent(), and setParent(). |
1.3.4