Utility to open an Aires generated shower file on disc. More...
#include <AiresShowerFile.h>
Public Member Functions | |
AiresShowerFile () | |
AiresShowerFile (const std::string &theFileName, const Mode theMode=eRead, const utl::Branch *const b=nullptr) | |
void | Close () |
Status | FindEvent (const unsigned int n) |
seek Event id set cursor there More... | |
const std::string & | GetFilename () const |
int | GetNEvents () |
Status | GotoPosition (const unsigned int n) |
goto by position in the file More... | |
virtual void | Open (const std::string &filename, const Mode mode=eRead, utl::Branch *const b=nullptr)=0 |
void | Open (const std::string &theFileName, const Mode theMode=eRead, const utl::Branch *b=nullptr) |
Status | Read (evt::Event &event) |
read current event advance cursor by 1 More... | |
void | Write (const evt::Event &event) |
virtual | ~AiresShowerFile () |
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 Types | |
typedef std::map< int, std::pair< int, int > > | DataLocationsType |
Private Member Functions | |
void | Init () |
void | SetRecordIndices () |
void | SetRecordInformation () |
Friends | |
class | AiresShowerFileParticleIterator |
Utility to open an Aires generated shower file on disc.
Definition at line 31 of file AiresShowerFile.h.
|
private |
Definition at line 131 of file AiresShowerFile.h.
AiresShowerFile::AiresShowerFile | ( | ) |
Definition at line 43 of file AiresShowerFile.cc.
References Init().
AiresShowerFile::AiresShowerFile | ( | const std::string & | theFileName, |
const Mode | theMode = eRead , |
||
const utl::Branch *const | b = nullptr |
||
) |
Definition at line 50 of file AiresShowerFile.cc.
|
virtual |
Definition at line 60 of file AiresShowerFile.cc.
References Close(), and fParticleIterator.
|
virtual |
Implements io::VEventFile.
Definition at line 165 of file AiresShowerFile.cc.
References io::AiresWrapper::cioclose1(), io::AiresWrapper::ciorshutdown(), fChannel, fIsOpen, and fParticleIterator.
Referenced by Open(), and ~AiresShowerFile().
|
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(), 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.
|
virtual |
seek Event id set cursor there
Implements io::VEventFile.
Definition at line 805 of file AiresShowerFile.cc.
References io::eFail, io::eSuccess, fCurrentShowerLocation, and fDataLocations.
|
inlineinherited |
Definition at line 54 of file VEventFile.h.
References io::VEventFile::fFilename.
Referenced by io::EventFile::GetFilename().
|
virtual |
Implements io::VEventFile.
Definition at line 838 of file AiresShowerFile.cc.
References fDataLocations.
|
virtual |
goto by position in the file
Implements io::VEventFile.
Definition at line 819 of file AiresShowerFile.cc.
References io::eFail, io::eSuccess, fCurrentShowerLocation, and fDataLocations.
|
private |
Definition at line 845 of file AiresShowerFile.cc.
References fAltType, fAtmosphereModel, fAzimuthDist, fChannel, fChargeTableAppendix, fCodsys, fCurrentShowerNumber, fdEdXTableAppendix, fElectronTableAppendix, fEnergyExponent, fFirstInteractionDepthIndex, fFirstShowerNumber, fGammaTableAppendix, fGeomagneticFieldDeclination, fGeomagneticFieldInclination, fGeomagneticFieldStrength, fGlobalTimeShiftIndex, fGroundAltitude, fGroundDepth, fGroundParticleCodeIndex, fInitLevel, fInjectionAltitude, fInjectionAltitudeIndex, fInjectionDepth, fIrc, fIsOpen, fLogBase, fLogEIndex, fLogRIndex, fLongFitReturnCodeIndex, fMaxAzimuth, fMaxPrimaryEnergy, fMaxRadiusCut, fMaxZenith, fMinAzimuth, fMinPrimaryEnergy, fMinRadiusCut, fMinZenith, fMuonTableAppendix, fNumberDiffPrimaries, fNumberGroundParticlesIndex, fNumObsLvls, fNumRecords, fParticleIterator, fPrimaryAzimuthIndex, fPrimaryCodeIndex, fPrimaryEnergyDist, fPrimaryLogEIndex, fPrimaryThinningIndex, fPrimaryZenithIndex, fReturnCode, fShowerMaxIndex, fShowerNumberIndex, fShowerPrimaryCode, fShowerPrimaryWeight, fSiteLatitude, fSiteLongitude, fSkipHeader, fThetaIndex, fThinningParameter, fTimeIndex, fTotalChargedParticlesIndex, fTotalParticlesInShowerIndex, fUxIndex, fUyIndex, fVerbosity, fWeightIndex, and fZenithDist.
Referenced by AiresShowerFile(), and Open().
|
pure virtualinherited |
Implemented in io::EVAFile, io::SELFASFile, io::REASH5File, io::OfflineROOTFile, io::CorsikaShowerFile, io::CONEXFile, io::REASFile, io::SenecaShowerFile, io::ArtificialShowerFile, io::VROOTFile, io::FDasEventFile, io::RadioFileAERAroot, io::ZHAireSFile, io::CDASEventFile, io::IoAugerEventFile, and io::RadioFileAERA.
Referenced by io::EventFile::Open().
void AiresShowerFile::Open | ( | const std::string & | theFileName, |
const Mode | theMode = eRead , |
||
const utl::Branch * | b = nullptr |
||
) |
Definition at line 68 of file AiresShowerFile.cc.
References io::AiresWrapper::ciorinit(), Close(), utl::cm2, io::AiresWrapper::croinputdata0(), io::VEventFile::DefaultOpen(), utl::deg, io::eRead, FATAL, fAtmosphereModel, fAzimuthDist, fChannel, fCodsys, fCurrentShowerLocation, fDataLocations, fEnergyExponent, io::VEventFile::fFilename, fFirstShowerNumber, fGeomagneticFieldDeclination, fGeomagneticFieldInclination, fGeomagneticFieldStrength, fGroundAltitude, fGroundDepth, fInitLevel, fInjectionAltitude, fInjectionDepth, fIrc, fIsOpen, fLogBase, fMaxAzimuth, fMaxPrimaryEnergy, fMaxRadiusCut, fMaxZenith, fMinAzimuth, fMinPrimaryEnergy, fMinRadiusCut, fMinZenith, fNumberDiffPrimaries, fNumObsLvls, fPrimaryEnergyDist, fReturnCode, fShowerPrimaryCode, fShowerPrimaryWeight, fSiteLatitude, fSiteLongitude, fSkipHeader, fThinningParameter, fVerbosity, fZenithDist, utl::g, utl::GeV, Init(), io::Aires::kMagneticFieldDeclination, utl::m, galactic::meter, io::AiresWrapper::opencrofilec(), SetRecordIndices(), SetRecordInformation(), and galactic::tesla.
Referenced by AiresShowerFile().
|
virtual |
read current event advance cursor by 1
Implements io::VEventFile.
Definition at line 188 of file AiresShowerFile.cc.
References utl::abs(), AiresShowerFileParticleIterator, io::Aires::AiresToPDG(), utl::TabulatedFunction::Clear(), utl::cm, utl::cm2, io::AiresWrapper::crogotorec(), io::AiresWrapper::crotaskidc(), data, utl::deg, evt::gh::eClassic, cevt::StationConstants::eElectron, io::eEOF, io::eFail, evt::gh::eLambda, cevt::StationConstants::eMuon, cevt::StationConstants::ePhoton, ERROR, io::eSuccess, evt::gh::eX0, exists, fAltType, fChannel, fChargeTableAppendix, fCurrentShowerLocation, fDataLocations, fdEdXTableAppendix, fElectronTableAppendix, io::VEventFile::fFilename, fFirstInteractionDepthIndex, fGammaTableAppendix, fGroundDepth, filename, fIrc, io::AiresWrapper::fitghf(), fLongFitReturnCodeIndex, fMaxRadiusCut, fMinRadiusCut, fMuonTableAppendix, fNumObsLvls, fParticleIterator, fPrimaryAzimuthIndex, fPrimaryCodeIndex, fPrimaryLogEIndex, fPrimaryZenithIndex, fReturnCode, fShowerMaxIndex, fShowerNumberIndex, fTotalChargedParticlesIndex, fVerbosity, utl::g, io::AiresWrapper::getcrorecord(), evt::ShowerSimData::GetGroundParticles(), io::AiresShowerFileParticleIterator::GetOneParticle(), evt::Event::GetSimShower(), utl::Particle::GetType(), utl::Particle::GetWeight(), utl::GeV, evt::ShowerSimData::HasdEdX(), evt::ShowerSimData::HasGHParameters(), evt::ShowerSimData::HasGroundParticles(), evt::ShowerSimData::HasLongitudinalProfile(), evt::Event::HasSimShower(), INFO, evt::ShowerSimData::MakedEdX(), evt::ShowerSimData::MakeGHParameters(), evt::ShowerSimData::MakeGroundParticles(), evt::ShowerSimData::MakeLongitudinalProfile(), evt::Event::MakeSimShower(), galactic::meter, G4StationSimulatorOG::p, std::pow(), utl::TabulatedFunction::PushBack(), io::AiresShowerFileParticleIterator::Rewind(), evt::VGaisserHillasParameter::SetChiSquare(), evt::ShowerSimData::SetEnergy(), utl::ShowerParticleList::SetFileInterface(), evt::ShowerSimData::SetGroundParticleCoordinateSystemAzimuth(), evt::ShowerSimData::SetGroundParticleCoordinateSystemZenith(), evt::ShowerSimData::SetMaxRadiusCut(), evt::ShowerSimData::SetMinRadiusCut(), evt::ShowerSimData::SetMuonNumber(), evt::VGaisserHillasParameter::SetNMax(), evt::ShowerSimData::SetPrimaryParticle(), evt::GaisserHillas4Parameter::SetShapeParameter(), evt::ShowerSimData::SetShowerNumber(), evt::ShowerSimData::SetShowerRunId(), evt::ShowerSimData::SetXFirst(), evt::VGaisserHillasParameter::SetXMax(), WARNING, and utl::TabulatedFunction::Y().
|
private |
Definition at line 921 of file AiresShowerFile.cc.
References io::AiresWrapper::crofieldindex(), fChannel, fFirstInteractionDepthIndex, fGlobalTimeShiftIndex, fGroundParticleCodeIndex, fInjectionAltitudeIndex, fLogEIndex, fLogRIndex, fLongFitReturnCodeIndex, fNumberGroundParticlesIndex, fPrimaryAzimuthIndex, fPrimaryCodeIndex, fPrimaryLogEIndex, fPrimaryThinningIndex, fPrimaryZenithIndex, fReturnCode, fShowerMaxIndex, fShowerNumberIndex, fThetaIndex, fTimeIndex, fTotalChargedParticlesIndex, fTotalParticlesInShowerIndex, fUxIndex, fUyIndex, fVerbosity, and fWeightIndex.
Referenced by Open().
|
private |
Definition at line 1003 of file AiresShowerFile.cc.
References io::AiresWrapper::croreccount(), io::AiresWrapper::crorecfind(), io::AiresWrapper::crorecnumber(), io::AiresWrapper::crorewind(), ERROR, fAltType, fChannel, fDataLocations, fIrc, fNumRecords, fReturnCode, fShowerNumberIndex, fVerbosity, and io::AiresWrapper::regetcrorecord().
Referenced by Open().
|
virtual |
|
friend |
Definition at line 141 of file AiresShowerFile.h.
Referenced by Read().
|
private |
Definition at line 56 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordInformation().
|
private |
Definition at line 89 of file AiresShowerFile.h.
|
private |
Definition at line 87 of file AiresShowerFile.h.
|
protectedinherited |
Definition at line 72 of file VEventFile.h.
|
private |
Definition at line 53 of file AiresShowerFile.h.
Referenced by Close(), Init(), Open(), Read(), SetRecordIndices(), and SetRecordInformation().
|
private |
Definition at line 127 of file AiresShowerFile.h.
|
private |
Definition at line 54 of file AiresShowerFile.h.
|
private |
Definition at line 125 of file AiresShowerFile.h.
|
private |
Definition at line 133 of file AiresShowerFile.h.
Referenced by io::AiresShowerFileParticleIterator::AiresShowerFileParticleIterator(), FindEvent(), GotoPosition(), Open(), and Read().
|
private |
Definition at line 125 of file AiresShowerFile.h.
Referenced by Init().
|
private |
Definition at line 132 of file AiresShowerFile.h.
Referenced by FindEvent(), GetNEvents(), GotoPosition(), Open(), Read(), and SetRecordInformation().
|
private |
Definition at line 127 of file AiresShowerFile.h.
|
private |
Definition at line 129 of file AiresShowerFile.h.
|
private |
Definition at line 95 of file AiresShowerFile.h.
|
protectedinherited |
Definition at line 74 of file VEventFile.h.
Referenced by io::VEventFile::GetFilename(), io::FDasEventFile::Open(), Open(), io::VROOTFile::OpenROOTFile(), Read(), io::VROOTFile::VROOTFile(), and io::FDasEventFile::Write().
|
private |
Definition at line 72 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 90 of file AiresShowerFile.h.
|
private |
Definition at line 128 of file AiresShowerFile.h.
|
private |
Definition at line 110 of file AiresShowerFile.h.
Referenced by io::AiresShowerFileParticleIterator::AiresShowerFileParticleIterator(), Init(), and Open().
|
private |
Definition at line 109 of file AiresShowerFile.h.
|
private |
Definition at line 108 of file AiresShowerFile.h.
|
private |
Definition at line 74 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 103 of file AiresShowerFile.h.
|
private |
Definition at line 104 of file AiresShowerFile.h.
|
private |
Definition at line 61 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 54 of file AiresShowerFile.h.
|
private |
Definition at line 101 of file AiresShowerFile.h.
|
private |
Definition at line 73 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 102 of file AiresShowerFile.h.
|
private |
Definition at line 54 of file AiresShowerFile.h.
Referenced by Init(), Open(), Read(), and SetRecordInformation().
|
private |
Definition at line 50 of file AiresShowerFile.h.
|
private |
Definition at line 55 of file AiresShowerFile.h.
|
private |
Definition at line 62 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 62 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 79 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 99 of file AiresShowerFile.h.
|
private |
Definition at line 94 of file AiresShowerFile.h.
|
private |
Definition at line 112 of file AiresShowerFile.h.
|
private |
Definition at line 97 of file AiresShowerFile.h.
|
private |
Definition at line 98 of file AiresShowerFile.h.
|
private |
Definition at line 93 of file AiresShowerFile.h.
|
private |
Definition at line 111 of file AiresShowerFile.h.
|
private |
Definition at line 96 of file AiresShowerFile.h.
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 130 of file AiresShowerFile.h.
|
private |
Definition at line 85 of file AiresShowerFile.h.
|
private |
Definition at line 78 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 88 of file AiresShowerFile.h.
|
private |
Definition at line 123 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordInformation().
|
private |
Definition at line 51 of file AiresShowerFile.h.
Referenced by Close(), Init(), Read(), and ~AiresShowerFile().
|
private |
Definition at line 70 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 68 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 86 of file AiresShowerFile.h.
|
private |
Definition at line 70 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 71 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 70 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 53 of file AiresShowerFile.h.
Referenced by Init(), Open(), Read(), SetRecordIndices(), and SetRecordInformation().
|
private |
Definition at line 80 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 69 of file AiresShowerFile.h.
Referenced by Init(), Read(), SetRecordIndices(), and SetRecordInformation().
|
private |
Definition at line 91 of file AiresShowerFile.h.
|
private |
Definition at line 107 of file AiresShowerFile.h.
|
private |
Definition at line 105 of file AiresShowerFile.h.
|
private |
Definition at line 106 of file AiresShowerFile.h.
|
private |
Definition at line 55 of file AiresShowerFile.h.
|
private |
Definition at line 63 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 100 of file AiresShowerFile.h.
|
private |
Definition at line 65 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 81 of file AiresShowerFile.h.
Referenced by Init(), Read(), and SetRecordIndices().
|
private |
Definition at line 77 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 64 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 64 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 53 of file AiresShowerFile.h.
Referenced by Init(), Open(), Read(), SetRecordIndices(), and SetRecordInformation().
|
private |
Definition at line 65 of file AiresShowerFile.h.
Referenced by Init(), and SetRecordIndices().
|
private |
Definition at line 87 of file AiresShowerFile.h.