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

Read profiles from CONEXRandom by random access. More...

#include "io/CONEXRandomFile.h"

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

Public Member Functions

void Close () override
 
 CONEXRandomFile ()
 
 CONEXRandomFile (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 ~CONEXRandomFile ()
 

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

virtual int NextEntry ()
 

Friends

class CONEXFile
 

Detailed Description

Read profiles from CONEXRandom by random access.

Author
Ralf Ulrich
Date
Mon May 23 14:50:01 CEST 2005

Definition at line 25 of file CONEXRandomFile.h.

Constructor & Destructor Documentation

io::CONEXRandomFile::CONEXRandomFile ( )
inline

Definition at line 28 of file CONEXRandomFile.h.

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

Definition at line 27 of file CONEXRandomFile.cc.

virtual io::CONEXRandomFile::~CONEXRandomFile ( )
inlinevirtual

Definition at line 30 of file CONEXRandomFile.h.

Member Function Documentation

void io::CONEXFile::Close ( )
overridevirtualinherited

Implements io::VEventFile.

Definition at line 55 of file CONEXFile.cc.

References io::CONEXFile::fFile, io::CONEXFile::fHeader, and io::CONEXFile::fShower.

Referenced by io::CONEXFile::Open().

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

seek Event id set cursor there

Implements io::VEventFile.

Definition at line 237 of file CONEXFile.cc.

References io::CONEXFile::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::CONEXFile::GetNEvents ( )
overridevirtualinherited

Implements io::VEventFile.

Definition at line 265 of file CONEXFile.cc.

References ERROR, and io::CONEXFile::fShowerTree.

Referenced by io::CONEXFile::GotoPosition(), NextEntry(), and io::CONEXFile::Read().

Status io::CONEXFile::GotoPosition ( const unsigned int  position)
overridevirtualinherited

goto by position in the file

Implements io::VEventFile.

Definition at line 245 of file CONEXFile.cc.

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

Referenced by io::CONEXFile::FindEvent().

int CONEXRandomFile::NextEntry ( )
privatevirtual

Reimplemented from io::CONEXFile.

Definition at line 33 of file CONEXRandomFile.cc.

References utl::RandomEngine::GetEngine(), io::CONEXFile::GetNEvents(), and INFO.

void io::CONEXFile::Open ( const std::string &  fileName,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)
overridevirtualinherited
Status io::CONEXFile::Read ( evt::Event event)
overridevirtualinherited
void io::CONEXFile::Write ( const evt::Event event)
overridevirtualinherited

Implements io::VEventFile.

Definition at line 228 of file CONEXFile.cc.

References ERROR.

Friends And Related Function Documentation

friend class CONEXFile
friend

Definition at line 35 of file CONEXRandomFile.h.

Member Data Documentation

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

Definition at line 72 of file VEventFile.h.

std::string io::VEventFile::fFilename
protectedinherited
Mode io::VEventFile::fMode = eRead
protectedinherited

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

, generated on Tue Sep 26 2023.