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... | |
EventFile & | operator= (const EventFile &eventFile) |
copy disallowed More... | |
Static Private Member Functions | |
static io::VEventFile * | Factory (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::VEventFile * | fVEventFile = nullptr |
Static Private Attributes | |
static const io::StreamerSwitch | kDefaultSwitch |
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.
|
private |
copy disallowed
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().
|
staticprivate |
Definition at line 66 of file EventFile.cc.
References io::eAires, io::eArtificial, io::eCDas, io::eCONEX, io::eCONEXRandom, io::eCorsika, io::eEVA, io::eFDas, io::eIoAuger, io::eOffline, io::eRadioAERA, io::eRadioAERAroot, io::eREAS, io::eREASH5, io::eSELFAS, io::eSeneca, and io::eZHAireS.
Referenced by Open().
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().
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().
|
private |
Definition at line 86 of file EventFile.h.
Referenced by Open().
Definition at line 85 of file EventFile.h.
Referenced by Open().
|
private |
Definition at line 84 of file EventFile.h.
Referenced by Close(), FindEvent(), GetFilename(), GetNEvents(), GotoPosition(), Open(), Read(), Write(), and ~EventFile().
|
staticprivate |
Definition at line 38 of file EventFile.h.