A processor class that implements periodic event reading from a TTree. More...
#include <TTreePeriodicEventStore.h>
Public Member Functions | |
| TTreePeriodicEventStore () | |
| Constructor. | |
| ~TTreePeriodicEventStore () override | |
| Destructor. | |
| const char * | GetRunName () const override |
| Returns the run name as a C-style string. | |
| Int_t | GetRunNumber () const override |
| Returns the run number of the current event. | |
| std::string | GetStrRunName () const |
| Returns the run name as a std::string. | |
| void | Init (TEventCollection *col) override |
| Initializes the TTreePeriodicEventStore with the given event collection. | |
| void | Process () override |
| Processes one event from the TTree. | |
Private Member Functions | |
| ClassDefOverride (TTreePeriodicEventStore, 3) | |
| ROOT class definition macro. | |
Private Attributes | |
| Long_t | fCurrentNum {0} |
| The current entry index in the TTree. | |
| TEventHeader * | fEventHeader {nullptr} |
| ! Pointer to the TEventHeader object read from the TTree. | |
| Long_t | fEventNum {0} |
| The current event number within the run. | |
| TString | fFileName {"temp.root"} |
| The name (or pattern) of the input file(s). Default is "temp.root". | |
| Long_t | fMaxEventNum {0} |
| The maximum number of events to process. | |
| TTree * | fTree {nullptr} |
| ! Pointer to the TTree object that holds event data. | |
| Long_t | fTreeEventNum {0} |
| The total number of events in the TTree. | |
| TString | fTreeName {"tree"} |
| The name of the TTree to be processed. Default is "tree". | |
A processor class that implements periodic event reading from a TTree.
This class inherits from TProcessor and IEventStore to provide a mechanism for initializing, reading, and processing events periodically from a ROOT TTree. The user can configure the input file name, tree name, and number of events to process through various parameters.
Definition at line 46 of file TTreePeriodicEventStore.h.
| art::crib::TTreePeriodicEventStore::TTreePeriodicEventStore | ( | ) |
Constructor.
Definition at line 23 of file TTreePeriodicEventStore.cc.
|
override |
Destructor.
Definition at line 28 of file TTreePeriodicEventStore.cc.
|
private |
ROOT class definition macro.
|
override |
Returns the run name as a C-style string.
Definition at line 268 of file TTreePeriodicEventStore.cc.
|
override |
Returns the run number of the current event.
Definition at line 264 of file TTreePeriodicEventStore.cc.
| std::string art::crib::TTreePeriodicEventStore::GetStrRunName | ( | ) | const |
Returns the run name as a std::string.
Definition at line 272 of file TTreePeriodicEventStore.cc.
|
override |
Initializes the TTreePeriodicEventStore with the given event collection.
| col | Pointer to a TEventCollection that holds shared objects and conditions among processors. |
Init method: 1) Retrieve fCondition from TEventCollection 2) Get file list from shell command 3) Build TChain if necessary 4) Set branch addresses (primitive or class objects) 5) Load the first entry and get total entry counts
Definition at line 41 of file TTreePeriodicEventStore.cc.
|
override |
Processes one event from the TTree.
Process method: called for each event
Definition at line 248 of file TTreePeriodicEventStore.cc.
|
private |
The current entry index in the TTree.
Definition at line 97 of file TTreePeriodicEventStore.h.
|
private |
! Pointer to the TEventHeader object read from the TTree.
Definition at line 99 of file TTreePeriodicEventStore.h.
|
private |
The current event number within the run.
Definition at line 94 of file TTreePeriodicEventStore.h.
|
private |
The name (or pattern) of the input file(s). Default is "temp.root".
Definition at line 91 of file TTreePeriodicEventStore.h.
|
private |
The maximum number of events to process.
Definition at line 95 of file TTreePeriodicEventStore.h.
|
private |
! Pointer to the TTree object that holds event data.
Definition at line 93 of file TTreePeriodicEventStore.h.
|
private |
The total number of events in the TTree.
Definition at line 96 of file TTreePeriodicEventStore.h.
|
private |
The name of the TTree to be processed. Default is "tree".
Definition at line 92 of file TTreePeriodicEventStore.h.