#include <SaveEventsAction.h>
Public Member Functions | |
SaveEventsAction (const char *actionName, TString outFileName, TString outOptions=TString("")) | |
Constructor. | |
~SaveEventsAction () | |
Destructor. | |
void | Setup (PamLevel2 *events) |
The setup procedure. | |
void | OnGood (PamLevel2 *event) |
Fills the tree with the selected event. | |
void | Finalize () |
Writes the tree of saved events to the output file. | |
Private Attributes | |
TFile * | _outTreeFile |
PamLevel2 * | _events |
TString | _outOptions |
This action saves the selected events into a ROOT file.
Definition at line 19 of file SaveEventsAction.h.
SaveEventsAction::SaveEventsAction | ( | const char * | actionName, | |
TString | outFileName, | |||
TString | outOptions = TString("") | |||
) |
Constructor.
outOptions is to be passed as the argument of a PamLevel2::SetWhichTrees() call, so it must be encoded in a compatible format. See the PamLevel2 documentation.
actionName | The action's name. | |
outFileName | The output file name, with path (absolute or relative). | |
outOptions | The output options. |
Definition at line 12 of file SaveEventsAction.cpp.
References _outTreeFile.
SaveEventsAction::~SaveEventsAction | ( | ) | [inline] |
void SaveEventsAction::Finalize | ( | ) | [virtual] |
Writes the tree of saved events to the output file.
Implements CollectionAction.
Definition at line 43 of file SaveEventsAction.cpp.
References _events, and _outTreeFile.
void SaveEventsAction::OnGood | ( | PamLevel2 * | event | ) | [virtual] |
Fills the tree with the selected event.
event | The selected event. |
Implements CollectionAction.
Definition at line 38 of file SaveEventsAction.cpp.
void SaveEventsAction::Setup | ( | PamLevel2 * | events | ) | [virtual] |
The setup procedure.
This routine will set the trees to be saved, by calling PamLevel2::SetWhichTrees().
events | The events pointer. |
Reimplemented from CollectionAction.
Definition at line 31 of file SaveEventsAction.cpp.
References _events, _outOptions, and _outTreeFile.
PamLevel2* SaveEventsAction::_events [private] |
TString SaveEventsAction::_outOptions [private] |
TFile* SaveEventsAction::_outTreeFile [private] |
Definition at line 56 of file SaveEventsAction.h.
Referenced by Finalize(), SaveEventsAction(), and Setup().