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

Read REASH5 simulation output. More...

#include "io/REASH5File.h"

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

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
 

Static Private Member Functions

static herr_t AddObserver (hid_t loc_id, const char *const name, void *const operator_data)
 
template<typename T >
static T ReadAttribute (H5::Group group, const std::string &attributeName)
 

Private Attributes

std::vector< std::string > fBinFileList
 
CorsikaShowerFilefCorsikaShowerFile = nullptr
 
unsigned int fCurrentPosition = 0
 
std::string fOrigDirectory
 
std::string fReasDirectory
 
H5::H5File fReasH5
 

Detailed Description

Read REASH5 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 40 of file REASH5File.h.

Constructor & Destructor Documentation

io::REASH5File::REASH5File ( )
inline

Definition at line 43 of file REASH5File.h.

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

Definition at line 153 of file REASH5File.cc.

References Open().

io::REASH5File::~REASH5File ( )
virtual

Definition at line 160 of file REASH5File.cc.

References fCorsikaShowerFile.

Member Function Documentation

herr_t io::REASH5File::AddObserver ( hid_t  loc_id,
const char *const  name,
void *const  operator_data 
)
staticprivate
void io::REASH5File::Close ( )
overridevirtual

Implements io::VEventFile.

Definition at line 222 of file REASH5File.cc.

References io::CorsikaShowerFile::Close(), fCorsikaShowerFile, and fReasH5.

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::REASH5File::FindEvent ( const unsigned int  eventId)
overridevirtual

seek Event id set cursor there

Implements io::VEventFile.

Definition at line 412 of file REASH5File.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::REASH5File::GetNEvents ( )
overridevirtual

Implements io::VEventFile.

Definition at line 442 of file REASH5File.cc.

Referenced by GotoPosition(), and Read().

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

goto by position in the file

Implements io::VEventFile.

Definition at line 420 of file REASH5File.cc.

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

Referenced by FindEvent().

void io::REASH5File::Open ( const std::string &  fileName,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)
overridevirtual

Implements io::VEventFile.

Definition at line 168 of file REASH5File.cc.

References io::eRead, ERROR, fOrigDirectory, fReasDirectory, fReasH5, and INFO.

Referenced by REASH5File().

Status io::REASH5File::Read ( evt::Event event)
overridevirtual
template<typename T >
static T io::REASH5File::ReadAttribute ( H5::Group  group,
const std::string &  attributeName 
)
inlinestaticprivate

Definition at line 79 of file REASH5File.h.

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

Implements io::VEventFile.

Definition at line 403 of file REASH5File.cc.

References ERROR.

Member Data Documentation

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

Definition at line 69 of file REASH5File.h.

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

Definition at line 72 of file VEventFile.h.

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

Definition at line 74 of file REASH5File.h.

Referenced by Close(), Read(), and ~REASH5File().

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

Definition at line 68 of file REASH5File.h.

Referenced by Read().

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

Definition at line 71 of file REASH5File.h.

Referenced by Open(), and Read().

std::string io::REASH5File::fReasDirectory
private

Definition at line 72 of file REASH5File.h.

Referenced by Open(), and Read().

H5::H5File io::REASH5File::fReasH5
private

Definition at line 70 of file REASH5File.h.

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


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

, generated on Tue Sep 26 2023.