eic-smear  1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
erhic::Reader Class Reference

Wrapper for getting tree from file and event from tree. More...

#include <EventMC.h>

Public Member Functions

 Reader (const std::string &treeName="EICTree")
 Construct a Reader for the named TTree. More...
 
virtual ~Reader ()
 Destructor. More...
 
EventMCRead (Long64_t number)
 Read and return the numbered event from the tree. More...
 
EventMCoperator() (Long64_t number)
 Read and return the numbered event from the tree. More...
 
TTree * GetTree ()
 Return the tree read by this reader. More...
 

Public Attributes

EventMCmEvent
 The last event read. More...
 
TTree * mTree
 The tree being read. More...
 

Detailed Description

Wrapper for getting tree from file and event from tree.

Definition at line 266 of file erhic/EventMC.h.

Constructor & Destructor Documentation

◆ Reader()

erhic::Reader::Reader ( const std::string &  treeName = "EICTree")
explicit

Construct a Reader for the named TTree.

Definition at line 159 of file erhic/EventMC.cxx.

◆ ~Reader()

virtual erhic::Reader::~Reader ( )
inlinevirtual

Destructor.

Definition at line 276 of file erhic/EventMC.h.

Member Function Documentation

◆ GetTree()

TTree * erhic::Reader::GetTree ( )
inline

Return the tree read by this reader.

Definition at line 307 of file erhic/EventMC.h.

◆ operator()()

EventMC * erhic::Reader::operator() ( Long64_t  number)
inline

Read and return the numbered event from the tree.

The event number should lie in the range [0, numEvents).

Definition at line 303 of file erhic/EventMC.h.

◆ Read()

EventMC * erhic::Reader::Read ( Long64_t  number)

Read and return the numbered event from the tree.

The event number should lie in the range [0, numEvents).

Definition at line 166 of file erhic/EventMC.cxx.

Member Data Documentation

◆ mEvent

EventMC* erhic::Reader::mEvent

The last event read.

Definition at line 297 of file erhic/EventMC.h.

◆ mTree

TTree* erhic::Reader::mTree

The tree being read.

Definition at line 298 of file erhic/EventMC.h.


The documentation for this class was generated from the following files: