List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends
io::AiresShowerFile Class Referenceabstract

Utility to open an Aires generated shower file on disc. More...

#include <AiresShowerFile.h>

Inheritance diagram for io::AiresShowerFile:
Inheritance graph
[legend]

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::BranchfBranch = 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 ()
 

Private Attributes

bool fAltType
 
int fAtmosphereModel
 
int fAzimuthDist
 
int fChannel
 
std::string fChargeTableAppendix
 
int fCodsys
 
int fCurrentRecordNumber
 
DataLocationsType::iterator fCurrentShowerLocation
 
int fCurrentShowerNumber
 
DataLocationsType fDataLocations
 
std::string fdEdXTableAppendix
 
std::string fElectronTableAppendix
 
double fEnergyExponent
 
int fFirstInteractionDepthIndex
 
int fFirstShowerNumber
 
std::string fGammaTableAppendix
 
double fGeomagneticFieldDeclination
 
double fGeomagneticFieldInclination
 
double fGeomagneticFieldStrength
 
int fGlobalTimeShiftIndex
 
double fGroundAltitude
 
double fGroundDepth
 
int fGroundParticleCodeIndex
 
int fInitLevel
 
double fInjectionAltitude
 
int fInjectionAltitudeIndex
 
double fInjectionDepth
 
int fIrc
 
bool fIsOpen
 
int fLogBase
 
int fLogEIndex
 
int fLogRIndex
 
int fLongFitReturnCodeIndex
 
double fMaxAzimuth
 
double fMaxPrimaryEnergy
 
double fMaxRadiusCut
 
double fMaxZenith
 
double fMinAzimuth
 
double fMinPrimaryEnergy
 
double fMinRadiusCut
 
double fMinZenith
 
std::string fMuonTableAppendix
 
int fNumberDiffPrimaries
 
int fNumberGroundParticlesIndex
 
int fNumObsLvls
 
int fNumRecords [5]
 
AiresShowerFileParticleIteratorfParticleIterator = nullptr
 
int fPrimaryAzimuthIndex
 
int fPrimaryCodeIndex
 
int fPrimaryEnergyDist
 
int fPrimaryLogEIndex
 
int fPrimaryThinningIndex
 
int fPrimaryZenithIndex
 
int fReturnCode
 
int fShowerMaxIndex
 
int fShowerNumberIndex
 
int fShowerPrimaryCode
 
double fShowerPrimaryWeight
 
double fSiteLatitude
 
double fSiteLongitude
 
int fSkipHeader
 
int fThetaIndex
 
double fThinningParameter
 
int fTimeIndex
 
int fTotalChargedParticlesIndex
 
int fTotalParticlesInShowerIndex
 
int fUxIndex
 
int fUyIndex
 
int fVerbosity
 
int fWeightIndex
 
int fZenithDist
 

Friends

class AiresShowerFileParticleIterator
 

Detailed Description

Utility to open an Aires generated shower file on disc.

Author
Troy Porter
Date
22 May 2003

Definition at line 31 of file AiresShowerFile.h.

Member Typedef Documentation

typedef std::map<int, std::pair<int, int> > io::AiresShowerFile::DataLocationsType
private

Definition at line 131 of file AiresShowerFile.h.

Constructor & Destructor Documentation

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.

References io::eRead, Init(), and Open().

AiresShowerFile::~AiresShowerFile ( )
virtual

Definition at line 60 of file AiresShowerFile.cc.

References Close(), and fParticleIterator.

Member Function Documentation

void AiresShowerFile::Close ( )
virtual
int VEventFile::DefaultOpen ( const std::string &  filename,
const Mode  mode = eRead 
)
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().

int VEventFile::DefaultWrite ( evt::Event event)
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.

References io::eRead, and FATAL.

Status AiresShowerFile::FindEvent ( const unsigned int  eventId)
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.

const std::string& io::VEventFile::GetFilename ( ) const
inlineinherited

Definition at line 54 of file VEventFile.h.

References io::VEventFile::fFilename.

Referenced by io::EventFile::GetFilename().

int AiresShowerFile::GetNEvents ( )
virtual

Implements io::VEventFile.

Definition at line 838 of file AiresShowerFile.cc.

References fDataLocations.

Status AiresShowerFile::GotoPosition ( const unsigned int  position)
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.

void AiresShowerFile::Init ( void  )
private
virtual void io::VEventFile::Open ( const std::string &  filename,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)
pure virtualinherited
void AiresShowerFile::Open ( const std::string &  theFileName,
const Mode  theMode = eRead,
const utl::Branch b = nullptr 
)
Status AiresShowerFile::Read ( evt::Event event)
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().

void AiresShowerFile::SetRecordIndices ( )
private
void AiresShowerFile::SetRecordInformation ( )
private
void AiresShowerFile::Write ( const evt::Event event)
virtual

Implements io::VEventFile.

Definition at line 179 of file AiresShowerFile.cc.

References ERROR.

Friends And Related Function Documentation

friend class AiresShowerFileParticleIterator
friend

Definition at line 141 of file AiresShowerFile.h.

Referenced by Read().

Member Data Documentation

bool io::AiresShowerFile::fAltType
private

Definition at line 56 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordInformation().

int io::AiresShowerFile::fAtmosphereModel
private

Definition at line 89 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fAzimuthDist
private

Definition at line 87 of file AiresShowerFile.h.

Referenced by Init(), and Open().

utl::Branch* io::VEventFile::fBranch = nullptr
protectedinherited

Definition at line 72 of file VEventFile.h.

int io::AiresShowerFile::fChannel
private

Definition at line 53 of file AiresShowerFile.h.

Referenced by Close(), Init(), Open(), Read(), SetRecordIndices(), and SetRecordInformation().

std::string io::AiresShowerFile::fChargeTableAppendix
private

Definition at line 127 of file AiresShowerFile.h.

Referenced by Init(), and Read().

int io::AiresShowerFile::fCodsys
private

Definition at line 54 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fCurrentRecordNumber
private

Definition at line 125 of file AiresShowerFile.h.

DataLocationsType::iterator io::AiresShowerFile::fCurrentShowerLocation
private
int io::AiresShowerFile::fCurrentShowerNumber
private

Definition at line 125 of file AiresShowerFile.h.

Referenced by Init().

DataLocationsType io::AiresShowerFile::fDataLocations
private

Definition at line 132 of file AiresShowerFile.h.

Referenced by FindEvent(), GetNEvents(), GotoPosition(), Open(), Read(), and SetRecordInformation().

std::string io::AiresShowerFile::fdEdXTableAppendix
private

Definition at line 127 of file AiresShowerFile.h.

Referenced by Init(), and Read().

std::string io::AiresShowerFile::fElectronTableAppendix
private

Definition at line 129 of file AiresShowerFile.h.

Referenced by Init(), and Read().

double io::AiresShowerFile::fEnergyExponent
private

Definition at line 95 of file AiresShowerFile.h.

Referenced by Init(), and Open().

std::string io::VEventFile::fFilename
protectedinherited
int io::AiresShowerFile::fFirstInteractionDepthIndex
private

Definition at line 72 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fFirstShowerNumber
private

Definition at line 90 of file AiresShowerFile.h.

Referenced by Init(), and Open().

std::string io::AiresShowerFile::fGammaTableAppendix
private

Definition at line 128 of file AiresShowerFile.h.

Referenced by Init(), and Read().

double io::AiresShowerFile::fGeomagneticFieldDeclination
private
double io::AiresShowerFile::fGeomagneticFieldInclination
private

Definition at line 109 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fGeomagneticFieldStrength
private

Definition at line 108 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fGlobalTimeShiftIndex
private

Definition at line 74 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

double io::AiresShowerFile::fGroundAltitude
private

Definition at line 103 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fGroundDepth
private

Definition at line 104 of file AiresShowerFile.h.

Referenced by Init(), Open(), and Read().

int io::AiresShowerFile::fGroundParticleCodeIndex
private

Definition at line 61 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fInitLevel
private

Definition at line 54 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fInjectionAltitude
private

Definition at line 101 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fInjectionAltitudeIndex
private

Definition at line 73 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

double io::AiresShowerFile::fInjectionDepth
private

Definition at line 102 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fIrc
private

Definition at line 54 of file AiresShowerFile.h.

Referenced by Init(), Open(), Read(), and SetRecordInformation().

bool io::AiresShowerFile::fIsOpen
private

Definition at line 50 of file AiresShowerFile.h.

Referenced by Close(), Init(), and Open().

int io::AiresShowerFile::fLogBase
private

Definition at line 55 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fLogEIndex
private

Definition at line 62 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fLogRIndex
private

Definition at line 62 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fLongFitReturnCodeIndex
private

Definition at line 79 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

double io::AiresShowerFile::fMaxAzimuth
private

Definition at line 99 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fMaxPrimaryEnergy
private

Definition at line 94 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fMaxRadiusCut
private

Definition at line 112 of file AiresShowerFile.h.

Referenced by Init(), Open(), and Read().

double io::AiresShowerFile::fMaxZenith
private

Definition at line 97 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fMinAzimuth
private

Definition at line 98 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fMinPrimaryEnergy
private

Definition at line 93 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fMinRadiusCut
private

Definition at line 111 of file AiresShowerFile.h.

Referenced by Init(), Open(), and Read().

double io::AiresShowerFile::fMinZenith
private

Definition at line 96 of file AiresShowerFile.h.

Referenced by Init(), and Open().

Mode io::VEventFile::fMode = eRead
protectedinherited
std::string io::AiresShowerFile::fMuonTableAppendix
private

Definition at line 130 of file AiresShowerFile.h.

Referenced by Init(), and Read().

int io::AiresShowerFile::fNumberDiffPrimaries
private

Definition at line 85 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fNumberGroundParticlesIndex
private

Definition at line 78 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fNumObsLvls
private

Definition at line 88 of file AiresShowerFile.h.

Referenced by Init(), Open(), and Read().

int io::AiresShowerFile::fNumRecords[5]
private

Definition at line 123 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordInformation().

AiresShowerFileParticleIterator* io::AiresShowerFile::fParticleIterator = nullptr
private

Definition at line 51 of file AiresShowerFile.h.

Referenced by Close(), Init(), Read(), and ~AiresShowerFile().

int io::AiresShowerFile::fPrimaryAzimuthIndex
private

Definition at line 70 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fPrimaryCodeIndex
private

Definition at line 68 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fPrimaryEnergyDist
private

Definition at line 86 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fPrimaryLogEIndex
private

Definition at line 70 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fPrimaryThinningIndex
private

Definition at line 71 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fPrimaryZenithIndex
private

Definition at line 70 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fReturnCode
private

Definition at line 53 of file AiresShowerFile.h.

Referenced by Init(), Open(), Read(), SetRecordIndices(), and SetRecordInformation().

int io::AiresShowerFile::fShowerMaxIndex
private

Definition at line 80 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fShowerNumberIndex
private

Definition at line 69 of file AiresShowerFile.h.

Referenced by Init(), Read(), SetRecordIndices(), and SetRecordInformation().

int io::AiresShowerFile::fShowerPrimaryCode
private

Definition at line 91 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fShowerPrimaryWeight
private

Definition at line 107 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fSiteLatitude
private

Definition at line 105 of file AiresShowerFile.h.

Referenced by Init(), and Open().

double io::AiresShowerFile::fSiteLongitude
private

Definition at line 106 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fSkipHeader
private

Definition at line 55 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fThetaIndex
private

Definition at line 63 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

double io::AiresShowerFile::fThinningParameter
private

Definition at line 100 of file AiresShowerFile.h.

Referenced by Init(), and Open().

int io::AiresShowerFile::fTimeIndex
private

Definition at line 65 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fTotalChargedParticlesIndex
private

Definition at line 81 of file AiresShowerFile.h.

Referenced by Init(), Read(), and SetRecordIndices().

int io::AiresShowerFile::fTotalParticlesInShowerIndex
private

Definition at line 77 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fUxIndex
private

Definition at line 64 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fUyIndex
private

Definition at line 64 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fVerbosity
private

Definition at line 53 of file AiresShowerFile.h.

Referenced by Init(), Open(), Read(), SetRecordIndices(), and SetRecordInformation().

int io::AiresShowerFile::fWeightIndex
private

Definition at line 65 of file AiresShowerFile.h.

Referenced by Init(), and SetRecordIndices().

int io::AiresShowerFile::fZenithDist
private

Definition at line 87 of file AiresShowerFile.h.

Referenced by Init(), and Open().


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.