List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
io::REASFile Class Reference

Read REAS simulation output. More...

#include "io/REASFile.h"

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

Public Member Functions

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
 
int ParseForREASFile (const std::string &directory, std::string &ourFileName)
 
Status Read (evt::Event &event) override
 read current event advance cursor by 1 More...
 
 REASFile ()
 
 REASFile (const std::string &fileName, const Mode mode=eRead, utl::Branch *const b=nullptr)
 
void Write (const evt::Event &event) override
 
virtual ~REASFile ()
 

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 Member Functions

REASFileoperator= (const REASFile &)
 
 REASFile (const REASFile &)
 

Private Attributes

std::vector< std::string > fBinFileList
 
CorsikaShowerFilefCorsikaShowerFile = nullptr
 
unsigned int fCurrentPosition = 0
 
std::string fHostName
 
std::string fOrigDirectory
 
unsigned long fProcessId = 0
 
std::string fReasDirectory
 
std::ifstream * fReasin = nullptr
 

Detailed Description

Read REAS simulation output.

Author
Tim Huege
Date
Mon Aug 11 17:37:28 CEST 2008
Todo:
readin of single simulation from .reas file

Definition at line 34 of file REASFile.h.

Constructor & Destructor Documentation

io::REASFile::REASFile ( )

Definition at line 65 of file REASFile.cc.

io::REASFile::REASFile ( const std::string &  fileName,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)

Definition at line 70 of file REASFile.cc.

References Open().

io::REASFile::~REASFile ( )
virtual

Definition at line 58 of file REASFile.cc.

io::REASFile::REASFile ( const REASFile )
private

Member Function Documentation

void io::REASFile::Close ( )
overridevirtual
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(), io::AiresShowerFile::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 io::REASFile::FindEvent ( const unsigned int  eventId)
overridevirtual

seek Event id set cursor there

Implements io::VEventFile.

Definition at line 750 of file REASFile.cc.

References GotoPosition().

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 io::REASFile::GetNEvents ( )
overridevirtual

Implements io::VEventFile.

Definition at line 796 of file REASFile.cc.

Referenced by GotoPosition(), and Read().

Status io::REASFile::GotoPosition ( const unsigned int  position)
overridevirtual

goto by position in the file

Implements io::VEventFile.

Definition at line 758 of file REASFile.cc.

References io::eFail, io::eSuccess, and GetNEvents().

Referenced by FindEvent().

void io::REASFile::Open ( const std::string &  fileName,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)
overridevirtual
REASFile& io::REASFile::operator= ( const REASFile )
private
int io::REASFile::ParseForREASFile ( const std::string &  directory,
std::string &  ourFileName 
)

Definition at line 770 of file REASFile.cc.

Referenced by Open().

Status io::REASFile::Read ( evt::Event event)
overridevirtual

read current event advance cursor by 1

Implements io::VEventFile.

Definition at line 228 of file REASFile.cc.

References evt::RadioSimulation::AddSimRadioPulse(), utl::BareFileName(), io::CorsikaShowerFile::Close(), utl::cm, degree, io::eEOF, io::eFail, io::eRead, ERROR, io::eSuccess, fBinFileList, fCorsikaShowerFile, fCurrentPosition, fOrigDirectory, fReasDirectory, fReasin, fwk::CoordinateSystemRegistry::Get(), evt::SimRadioPulse::GetEfieldTimeSeries(), GetNEvents(), evt::ShowerSimData::GetRadioSimulation(), utl::Trace< T >::GetSize(), evt::SimRadioPulse::GetStartTime(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), io::CorsikaShowerFile::GotoPosition(), evt::ShowerSimData::HasRadioSimulation(), evt::Event::HasSimShower(), INFO, evt::ShowerSimData::MakeRadioSimulation(), galactic::meter, utl::micro, utl::Trace< T >::PushBack(), io::CorsikaShowerFile::Read(), galactic::second, evt::SimRadioPulse::SetAntennaName(), evt::SimRadioPulse::SetBinning(), evt::RadioSimulation::SetCorePosition(), evt::ShowerSimData::SetDistanceOfShowerMaximum(), evt::RadioSimulation::SetEventNumber(), evt::RadioSimulation::SetEventTime(), io::CorsikaShowerFile::SetMagneticFieldDeclination(), evt::ShowerSimData::SetMagneticFieldDeclination(), evt::RadioSimulation::SetRefractiveIndexAtSeaLevel(), evt::SimRadioPulse::SetRelativeCoordinates(), evt::RadioSimulation::SetRunNumber(), evt::ShowerSimData::SetShowerNumber(), evt::SimRadioPulse::SetStartTime(), galactic::volt, and WARNING.

void io::REASFile::Write ( const evt::Event event)
overridevirtual

Implements io::VEventFile.

Definition at line 741 of file REASFile.cc.

References ERROR.

Member Data Documentation

std::vector<std::string> io::REASFile::fBinFileList
private

Definition at line 56 of file REASFile.h.

Referenced by Open(), and Read().

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

Definition at line 72 of file VEventFile.h.

CorsikaShowerFile* io::REASFile::fCorsikaShowerFile = nullptr
private

Definition at line 63 of file REASFile.h.

Referenced by Close(), and Read().

unsigned int io::REASFile::fCurrentPosition = 0
private

Definition at line 55 of file REASFile.h.

Referenced by Read().

std::string io::VEventFile::fFilename
protectedinherited
std::string io::REASFile::fHostName
private

Definition at line 60 of file REASFile.h.

Referenced by Close(), and Open().

Mode io::VEventFile::fMode = eRead
protectedinherited
std::string io::REASFile::fOrigDirectory
private

Definition at line 58 of file REASFile.h.

Referenced by Open(), and Read().

unsigned long io::REASFile::fProcessId = 0
private

Definition at line 61 of file REASFile.h.

Referenced by Close(), and Open().

std::string io::REASFile::fReasDirectory
private

Definition at line 59 of file REASFile.h.

Referenced by Open(), and Read().

std::ifstream* io::REASFile::fReasin = nullptr
private

Definition at line 57 of file REASFile.h.

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


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

, generated on Tue Sep 26 2023.