List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
io::EventFile Class Reference

Interface to file I/O objects. More...

#include "io/EventFile.h"

Public Member Functions

void Close ()
 
 EventFile (const Type type=eOffline, utl::Branch *const b=nullptr)
 
 EventFile (const std::string &filename, const Mode mode=eRead, const Type type=eOffline, utl::Branch *const b=nullptr, const io::StreamerSwitch &streamerSwitch=EventFile::kDefaultSwitch)
 
Status FindEvent (const unsigned int eventId)
 seek Event id set cursor there More...
 
const std::string & GetFilename () const
 
int GetNEvents ()
 
Status GotoPosition (const unsigned int position)
 goto by position in the file More...
 
void Open (const std::string &filename, const Mode mode=eRead, utl::Branch *const b=nullptr)
 
Status Read (evt::Event &event)
 read current event, advance cursor by 1 More...
 
void Write (const evt::Event &event)
 
 ~EventFile ()
 

Private Member Functions

 EventFile (const EventFile &eventFile)
 copy disallowed More...
 
EventFileoperator= (const EventFile &eventFile)
 copy disallowed More...
 

Static Private Member Functions

static io::VEventFileFactory (const std::string &filename, const Mode mode, const Type type, utl::Branch *const branch, const io::StreamerSwitch &streamerSwitch)
 

Private Attributes

io::StreamerSwitch fStreamerSwitch
 
io::Type fType = eOffline
 
io::VEventFilefVEventFile = nullptr
 

Static Private Attributes

static const io::StreamerSwitch kDefaultSwitch
 

Detailed Description

Interface to file I/O objects.

Author
Stefano Argiro`
Date
03 Feb 2004

Definition at line 34 of file EventFile.h.

Constructor & Destructor Documentation

EventFile::EventFile ( const Type  type = eOffline,
utl::Branch *const  b = nullptr 
)

Definition at line 41 of file EventFile.cc.

EventFile::EventFile ( const std::string &  filename,
const Mode  mode = eRead,
const Type  type = eOffline,
utl::Branch *const  b = nullptr,
const io::StreamerSwitch streamerSwitch = EventFile::kDefaultSwitch 
)

Definition at line 47 of file EventFile.cc.

EventFile::~EventFile ( )

Definition at line 58 of file EventFile.cc.

References Close(), and fVEventFile.

io::EventFile::EventFile ( const EventFile eventFile)
private

copy disallowed

Member Function Documentation

void EventFile::Close ( )

Definition at line 129 of file EventFile.cc.

References io::VEventFile::Close(), and fVEventFile.

Referenced by RdEventMerger::RdEventMerger::Finish(), main(), and ~EventFile().

VEventFile * EventFile::Factory ( const std::string &  filename,
const Mode  mode,
const Type  type,
utl::Branch *const  branch,
const io::StreamerSwitch streamerSwitch 
)
staticprivate
Status EventFile::FindEvent ( const unsigned int  eventId)

seek Event id set cursor there

Definition at line 162 of file EventFile.cc.

References io::VEventFile::FindEvent(), and fVEventFile.

const std::string & EventFile::GetFilename ( ) const

Definition at line 190 of file EventFile.cc.

References fVEventFile, and io::VEventFile::GetFilename().

int EventFile::GetNEvents ( )

Definition at line 183 of file EventFile.cc.

References fVEventFile, and io::VEventFile::GetNEvents().

Status EventFile::GotoPosition ( const unsigned int  position)

goto by position in the file

Definition at line 173 of file EventFile.cc.

References fVEventFile, and io::VEventFile::GotoPosition().

void EventFile::Open ( const std::string &  filename,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)

Definition at line 119 of file EventFile.cc.

References Factory(), fStreamerSwitch, fType, fVEventFile, and io::VEventFile::Open().

Referenced by main().

EventFile& io::EventFile::operator= ( const EventFile eventFile)
private

copy disallowed

Status EventFile::Read ( evt::Event event)

read current event, advance cursor by 1

Definition at line 148 of file EventFile.cc.

References fVEventFile, and io::VEventFile::Read().

Referenced by main(), and io::EventFileChain::Read().

void EventFile::Write ( const evt::Event event)

Definition at line 137 of file EventFile.cc.

References fVEventFile, and io::VEventFile::Write().

Referenced by RdEventMerger::RdEventMerger::Run().

Member Data Documentation

io::StreamerSwitch io::EventFile::fStreamerSwitch
private

Definition at line 86 of file EventFile.h.

Referenced by Open().

io::Type io::EventFile::fType = eOffline
private

Definition at line 85 of file EventFile.h.

Referenced by Open().

io::VEventFile* io::EventFile::fVEventFile = nullptr
private
const StreamerSwitch EventFile::kDefaultSwitch
staticprivate

Definition at line 38 of file EventFile.h.


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

, generated on Tue Sep 26 2023.