Read profiles from CONEXRandom by random access. More...
#include "io/CONEXRandomFile.h"
Public Member Functions | |
void | Close () override |
CONEXRandomFile () | |
CONEXRandomFile (const std::string &fileName, const Mode mode=eRead, utl::Branch *const b=nullptr) | |
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 | ~CONEXRandomFile () |
Protected Member Functions | |
int | DefaultOpen (const std::string &filename, const Mode mode=eRead) |
int | DefaultWrite (evt::Event &event) |
Protected Attributes | |
utl::Branch * | fBranch = nullptr |
std::string | fFilename |
Mode | fMode = eRead |
Private Member Functions | |
virtual int | NextEntry () |
Friends | |
class | CONEXFile |
Read profiles from CONEXRandom by random access.
Definition at line 25 of file CONEXRandomFile.h.
|
inline |
Definition at line 28 of file CONEXRandomFile.h.
CONEXRandomFile::CONEXRandomFile | ( | const std::string & | fileName, |
const Mode | mode = eRead , |
||
utl::Branch *const | b = nullptr |
||
) |
Definition at line 27 of file CONEXRandomFile.cc.
|
inlinevirtual |
Definition at line 30 of file CONEXRandomFile.h.
|
overridevirtualinherited |
Implements io::VEventFile.
Definition at line 55 of file CONEXFile.cc.
References io::CONEXFile::fFile, io::CONEXFile::fHeader, and io::CONEXFile::fShower.
Referenced by io::CONEXFile::Open().
|
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.
|
overridevirtualinherited |
seek Event id set cursor there
Implements io::VEventFile.
Definition at line 237 of file CONEXFile.cc.
References io::CONEXFile::GotoPosition().
|
inlineinherited |
Definition at line 54 of file VEventFile.h.
References io::VEventFile::fFilename.
Referenced by io::EventFile::GetFilename().
|
overridevirtualinherited |
Implements io::VEventFile.
Definition at line 265 of file CONEXFile.cc.
References ERROR, and io::CONEXFile::fShowerTree.
Referenced by io::CONEXFile::GotoPosition(), NextEntry(), and io::CONEXFile::Read().
|
overridevirtualinherited |
goto by position in the file
Implements io::VEventFile.
Definition at line 245 of file CONEXFile.cc.
References io::eFail, io::eSuccess, io::CONEXFile::fCurrentPosition, and io::CONEXFile::GetNEvents().
Referenced by io::CONEXFile::FindEvent().
|
privatevirtual |
Reimplemented from io::CONEXFile.
Definition at line 33 of file CONEXRandomFile.cc.
References utl::RandomEngine::GetEngine(), io::CONEXFile::GetNEvents(), and INFO.
|
overridevirtualinherited |
Implements io::VEventFile.
Definition at line 71 of file CONEXFile.cc.
References io::CONEXFile::Close(), io::eRead, ERROR, io::CONEXFile::fFile, io::CONEXHeader::fFirstDepth, io::CONEXFile::fFirstGrammageBin, io::CONEXFile::fHeader, io::CONEXFile::fHeaderTree, io::CONEXFile::fROOTVersion, io::CONEXFile::fShower, io::CONEXFile::fShowerTree, INFO, io::CONEXFile::MapHeader(), and io::CONEXFile::MapShower().
Referenced by io::CONEXFile::CONEXFile().
|
overridevirtualinherited |
read current event advance cursor by 1
Implements io::VEventFile.
Definition at line 167 of file CONEXFile.cc.
References utl::cm2, io::eEOF, io::eFail, ERROR, io::eSuccess, galactic::eV, io::CONEXFile::fCurrentPosition, io::CONEXFile::fFile, io::CONEXFile::fHeader, io::CONEXHeader::fHighEnergyModel, io::FillShowerProfileDataFromConex(), io::FillShowerSimDataFromConex(), io::CONEXFile::fLPvector, io::CONEXFile::fROOTVersion, io::CONEXHeader::fSeed, io::CONEXFile::fShower, io::CONEXFile::fShowerTree, io::CONEXHeader::fVersion, io::CONEXShower::fZenith, utl::g, evt::ShowerSimData::GetEnergy(), evt::ShowerSimData::GetGHParameters(), io::CONEXFile::GetNEvents(), evt::VGaisserHillasParameter::GetXMax(), evt::Event::HasSimShower(), INFO, io::CONEXFile::MapShower(), io::CONEXFile::NextEntry(), evt::ShowerSimData::SetShowerNumber(), evt::ShowerSimData::SetShowerRunId(), and io::CONEXShower::SetVectorLength().
|
overridevirtualinherited |
|
friend |
Definition at line 35 of file CONEXRandomFile.h.
|
protectedinherited |
Definition at line 72 of file VEventFile.h.
|
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().