Interface for CDAS file reading. More...
#include <CDASEventFile.h>
Public Member Functions | |
CDASEventFile ()=default | |
CDASEventFile (const std::string &filename, const Mode mode=eRead, utl::Branch *const b=nullptr) | |
void | Close () override |
Status | FindEvent (const unsigned int eventId) override |
seek Event id set cursor there More... | |
const std::string & | GetFilename () const |
int | GetNEvents () override |
Status | GotoPosition (const unsigned int position) override |
goto by position in the file More... | |
void | Open (const std::string &filename, const Mode mode=eRead, utl::Branch *const b=nullptr) override |
Status | Read (evt::Event &event) override |
read current event advance cursor by 1 More... | |
void | Write (const evt::Event &event) override |
virtual | ~CDASEventFile ()=default |
Static Public Member Functions | |
static std::string | GetRootMode (const Mode mode) |
Protected Member Functions | |
int | DefaultOpen (const std::string &filename, const Mode mode=eRead) |
int | DefaultWrite (evt::Event &event) |
int | GetTree (const std::string &name) |
int | OpenROOTFile () |
Protected Attributes | |
utl::Branch * | fBranch = nullptr |
TFile * | fFile = nullptr |
std::string | fFilename |
Mode | fMode = eRead |
TTree * | fTree = nullptr |
Private Attributes | |
int | fCurrentEvent = -1 |
|
default |
|
inline |
Definition at line 24 of file CDASEventFile.h.
References RdGeoCeLDFFitter::b, and Open().
|
virtualdefault |
|
overridevirtual |
Reimplemented from io::VROOTFile.
Definition at line 55 of file CDASEventFile.cc.
|
protectedinherited |
Checks that file exists Intended to be called in the Write method of derived classes
Definition at line 31 of file VEventFile.cc.
Referenced by io::VROOTFile::Open(), io::AiresShowerFile::Open(), io::VEventFile::VEventFile(), and io::VROOTFile::VROOTFile().
|
protectedinherited |
Checks that we are open for write Intended to be called in the Write method of derived classes
Definition at line 15 of file VEventFile.cc.
|
overridevirtual |
seek Event id set cursor there
Implements io::VEventFile.
Definition at line 169 of file CDASEventFile.cc.
References io::eEOF, and io::eSuccess.
|
inlineinherited |
Definition at line 54 of file VEventFile.h.
References io::VEventFile::fFilename.
Referenced by io::EventFile::GetFilename().
|
overridevirtual |
Implements io::VEventFile.
Definition at line 225 of file CDASEventFile.cc.
|
staticinherited |
Definition at line 123 of file VROOTFile.cc.
References io::eAppend, io::eNew, and io::eWrite.
Referenced by io::FDasEventFile::Open(), io::VROOTFile::OpenROOTFile(), and io::FDasEventFile::Write().
|
protectedinherited |
Definition at line 105 of file VROOTFile.cc.
References FATAL, io::VROOTFile::fFile, and io::VROOTFile::fTree.
Referenced by io::OfflineROOTFile::GetConfig(), and io::OfflineROOTFile::GetEventBranch().
|
overridevirtual |
goto by position in the file
Implements io::VEventFile.
Definition at line 207 of file CDASEventFile.cc.
References io::eEOF, and io::eSuccess.
|
overridevirtual |
Reimplemented from io::VROOTFile.
Definition at line 38 of file CDASEventFile.cc.
Referenced by CDASEventFile().
|
protectedinherited |
Definition at line 69 of file VROOTFile.cc.
References io::VROOTFile::Close(), io::VROOTFile::fFile, io::VEventFile::fFilename, io::VEventFile::fMode, and io::VROOTFile::GetRootMode().
Referenced by io::VROOTFile::Open(), and io::VROOTFile::VROOTFile().
|
overridevirtual |
read current event advance cursor by 1
Implements io::VEventFile.
Definition at line 96 of file CDASEventFile.cc.
References io::eAppend, io::eEOF, io::eNew, io::eSuccess, io::eWrite, sevt::SEvent::GetHeader(), evt::Header::GetId(), evt::Event::GetRawEvent(), evt::Event::HasRawEvent(), evt::Event::HasSEvent(), evt::Event::MakeRawEvent(), evt::Event::MakeSEvent(), utl::microsecond, utl::nanosecond, galactic::second, sevt::Header::SetId(), evt::Header::SetId(), sevt::Header::SetTime(), and evt::Header::SetTime().
|
overridevirtual |
Implements io::VEventFile.
Definition at line 70 of file CDASEventFile.cc.
References io::eRead, evt::Event::HasRawEvent(), and INFO.
|
protectedinherited |
Definition at line 72 of file VEventFile.h.
|
private |
Definition at line 44 of file CDASEventFile.h.
|
protectedinherited |
Definition at line 45 of file VROOTFile.h.
Referenced by io::VROOTFile::Close(), io::OfflineROOTFile::GetEventBranch(), io::VROOTFile::GetTree(), io::VROOTFile::OpenROOTFile(), and io::VROOTFile::~VROOTFile().
|
protectedinherited |
Definition at line 74 of file VEventFile.h.
Referenced by io::VEventFile::GetFilename(), io::FDasEventFile::Open(), io::AiresShowerFile::Open(), io::VROOTFile::OpenROOTFile(), io::AiresShowerFile::Read(), io::VROOTFile::VROOTFile(), and io::FDasEventFile::Write().
Definition at line 75 of file VEventFile.h.
Referenced by io::VROOTFile::Close(), io::OfflineROOTFile::GetEventBranch(), io::FDasEventFile::Open(), io::VROOTFile::OpenROOTFile(), io::IoAugerEventFile::Write(), and io::FDasEventFile::Write().
|
protectedinherited |
Definition at line 46 of file VROOTFile.h.
Referenced by io::VROOTFile::Close(), io::OfflineROOTFile::GetConfig(), io::OfflineROOTFile::GetEventBranch(), io::OfflineROOTFile::GetNEvents(), io::VROOTFile::GetTree(), io::OfflineROOTFile::Read(), and io::OfflineROOTFile::Write().