Read profiles from CONEX. More...
#include "io/CONEXFile.h"
Public Member Functions | |
void | Close () override |
CONEXFile () | |
CONEXFile (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 | ~CONEXFile () |
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 | |
CONEXFile (const CONEXFile &) | |
void | MapHeader (const float version) |
void | MapShower (const float version) |
virtual int | NextEntry () |
CONEXFile & | operator= (const CONEXFile &) |
Private Attributes | |
unsigned int | fCurrentPosition = 0 |
TFile * | fFile = nullptr |
double | fFirstGrammageBin = 0 |
CONEXHeader * | fHeader = nullptr |
TTree * | fHeaderTree = nullptr |
std::vector < io::CONEXLeadingParticles > | fLPvector |
float | fROOTVersion = 0 |
CONEXShower * | fShower = nullptr |
TTree * | fShowerTree = nullptr |
float | fVersion = 0 |
|
inline |
Definition at line 39 of file CONEXFile.h.
io::CONEXFile::CONEXFile | ( | const std::string & | fileName, |
const Mode | mode = eRead , |
||
utl::Branch *const | b = nullptr |
||
) |
Definition at line 47 of file CONEXFile.cc.
References Open().
|
virtual |
Definition at line 39 of file CONEXFile.cc.
|
private |
|
overridevirtual |
Implements io::VEventFile.
Definition at line 55 of file CONEXFile.cc.
References fFile, fHeader, and fShower.
Referenced by 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.
|
overridevirtual |
seek Event id set cursor there
Implements io::VEventFile.
Definition at line 237 of file CONEXFile.cc.
References GotoPosition().
|
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 265 of file CONEXFile.cc.
References ERROR, and fShowerTree.
Referenced by GotoPosition(), io::CONEXRandomFile::NextEntry(), and Read().
|
overridevirtual |
goto by position in the file
Implements io::VEventFile.
Definition at line 245 of file CONEXFile.cc.
References io::eFail, io::eSuccess, fCurrentPosition, and GetNEvents().
Referenced by FindEvent().
|
private |
Definition at line 278 of file CONEXFile.cc.
References io::CONEXHeader::fDelX, io::CONEXHeader::fECutEM, io::CONEXHeader::fECutHadrons, io::CONEXHeader::fECutLongProfElectrons, io::CONEXHeader::fECutLongProfHadrons, io::CONEXHeader::fECutLongProfMuons, io::CONEXHeader::fECutLongProfPhotons, io::CONEXHeader::fEThrEM, io::CONEXHeader::fEThrHadrons, io::CONEXHeader::fEThrMuons, fHeader, fHeaderTree, io::CONEXHeader::fHighEnergyModel, io::CONEXHeader::fHighLowEnergy, io::CONEXHeader::fLowEnergyModel, io::CONEXHeader::fParticleID, fROOTVersion, and io::CONEXHeader::fSeed.
Referenced by Open().
|
private |
Definition at line 305 of file CONEXFile.cc.
References io::CONEXShower::fAzimuth, io::CONEXShower::fChi2, io::CONEXShower::fdEdX, io::CONEXShower::fGroundEnergy, io::CONEXShower::fLogE, io::CONEXShower::fMuProd, io::CONEXShower::fN, io::CONEXShower::fNele, io::CONEXShower::fNgam, io::CONEXShower::fNmax, io::CONEXShower::fNmu, io::CONEXShower::fNX, io::CONEXShower::fP1, io::CONEXShower::fP2, io::CONEXShower::fP3, fROOTVersion, fShower, fShowerTree, io::CONEXShower::fX, io::CONEXShower::fX0, io::CONEXShower::fXfirst, io::CONEXShower::fXmax, and io::CONEXShower::fZenith.
|
privatevirtual |
Reimplemented in io::CONEXRandomFile.
Definition at line 257 of file CONEXFile.cc.
References fCurrentPosition.
Referenced by Read().
|
overridevirtual |
Implements io::VEventFile.
Definition at line 71 of file CONEXFile.cc.
References Close(), io::eRead, ERROR, fFile, io::CONEXHeader::fFirstDepth, fFirstGrammageBin, fHeader, fHeaderTree, fROOTVersion, fShower, fShowerTree, INFO, MapHeader(), and MapShower().
Referenced by CONEXFile().
|
overridevirtual |
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, fCurrentPosition, fFile, fHeader, io::CONEXHeader::fHighEnergyModel, io::FillShowerProfileDataFromConex(), io::FillShowerSimDataFromConex(), fLPvector, fROOTVersion, io::CONEXHeader::fSeed, fShower, fShowerTree, io::CONEXHeader::fVersion, io::CONEXShower::fZenith, utl::g, evt::ShowerSimData::GetEnergy(), evt::ShowerSimData::GetGHParameters(), GetNEvents(), evt::VGaisserHillasParameter::GetXMax(), evt::Event::HasSimShower(), INFO, MapShower(), NextEntry(), evt::ShowerSimData::SetShowerNumber(), evt::ShowerSimData::SetShowerRunId(), and io::CONEXShower::SetVectorLength().
|
overridevirtual |
|
protectedinherited |
Definition at line 72 of file VEventFile.h.
|
private |
Definition at line 72 of file CONEXFile.h.
Referenced by GotoPosition(), NextEntry(), and Read().
|
private |
Definition at line 60 of file CONEXFile.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().
|
private |
Definition at line 67 of file CONEXFile.h.
Referenced by Open().
|
private |
Definition at line 65 of file CONEXFile.h.
Referenced by Close(), MapHeader(), Open(), and Read().
|
private |
Definition at line 62 of file CONEXFile.h.
Referenced by MapHeader(), and Open().
|
private |
Definition at line 66 of file CONEXFile.h.
Referenced by Read().
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().
|
private |
Definition at line 70 of file CONEXFile.h.
Referenced by MapHeader(), MapShower(), Open(), and Read().
|
private |
Definition at line 64 of file CONEXFile.h.
Referenced by Close(), MapShower(), Open(), and Read().
|
private |
Definition at line 61 of file CONEXFile.h.
Referenced by GetNEvents(), MapShower(), Open(), and Read().
|
private |
Definition at line 69 of file CONEXFile.h.