hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Attributes | List of all members
EventFile Class Reference

#include <EventFile.h>

Inheritance diagram for EventFile:
IEventFile

Public Member Functions

 EventFile (const std::string ifilename, const std::string &ofilename)
 Constructor.
 
virtual ~EventFile ()
 
virtual bool nextEvent ()
 Load the next event in the file.
 
virtual void FillEvent ()
 Persists the event.
 
void setupEvent (IEvent *ievent)
 Setup the event object that will be used by this file.
 
void close ()
 
void resetOutputFileDir ()
 
- Public Member Functions inherited from IEventFile
virtual ~IEventFile ()
 

Private Attributes

TFile * ofile_ {nullptr}
 
Eventevent_ {nullptr}
 
EVENT::LCEvent * lc_event_ {nullptr}
 
IO::LCReader * lc_reader_ {IOIMPL::LCFactory::getInstance()->createLCReader()}
 
int entry_ {0}
 description
 
int objNumRoot_ {0}
 

Detailed Description

Definition at line 29 of file EventFile.h.

Constructor & Destructor Documentation

◆ EventFile()

EventFile ( const std::string  ifilename,
const std::string &  ofilename 
)

Constructor.

Parameters
ifilename
ofilename

Definition at line 11 of file EventFile.cxx.

◆ ~EventFile()

~EventFile ( )
virtual

Destructor

Todo:
CHECK THIS

Definition at line 21 of file EventFile.cxx.

Member Function Documentation

◆ close()

void close ( )
virtual

Close the file, writing the tree to disk if creating an output file.

Implements IEventFile.

Definition at line 54 of file EventFile.cxx.

◆ FillEvent()

void FillEvent ( )
virtual

Persists the event.

Definition at line 24 of file EventFile.cxx.

◆ nextEvent()

bool nextEvent ( )
virtual

Load the next event in the file.

Returns
true if an event was loaded successfully, false otherwise

Implements IEventFile.

Definition at line 31 of file EventFile.cxx.

◆ resetOutputFileDir()

void resetOutputFileDir ( )
virtual

Get output file directory

Implements IEventFile.

Definition at line 50 of file EventFile.cxx.

◆ setupEvent()

void setupEvent ( IEvent ievent)
virtual

Setup the event object that will be used by this file.

Parameters
eventThe Event container.

Implements IEventFile.

Definition at line 45 of file EventFile.cxx.

Member Data Documentation

◆ entry_

int entry_ {0}
private

description

Definition at line 93 of file EventFile.h.

◆ event_

Event* event_ {nullptr}
private

Additional output files, i.e. for histogramming Object used to build the HPS event model.

Definition at line 85 of file EventFile.h.

◆ lc_event_

EVENT::LCEvent* lc_event_ {nullptr}
private

Object used to load all of current LCIO event information.

Definition at line 88 of file EventFile.h.

◆ lc_reader_

IO::LCReader* lc_reader_ {IOIMPL::LCFactory::getInstance()->createLCReader()}
private

LCIO reader

Definition at line 91 of file EventFile.h.

◆ objNumRoot_

int objNumRoot_ {0}
private

Number used to reset object count in TProcessID

Definition at line 96 of file EventFile.h.

◆ ofile_

TFile* ofile_ {nullptr}
private

The ROOT file to which event data will be written to.

Definition at line 79 of file EventFile.h.


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