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

Interface for CDAS file reading. More...

#include <CDASEventFile.h>

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

Public Member Functions

 CDASEventFile ()=default
 
 CDASEventFile (const std::string &filename, const Mode mode=eRead, utl::Branch *const b=nullptr)
 
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...
 
void Write (const evt::Event &event) override
 
virtual ~CDASEventFile ()=default
 

Static Public Member Functions

static std::string GetRootMode (const Mode mode)
 

Protected Member Functions

int DefaultOpen (const std::string &filename, const Mode mode=eRead)
 
int DefaultWrite (evt::Event &event)
 
int GetTree (const std::string &name)
 
int OpenROOTFile ()
 

Protected Attributes

utl::BranchfBranch = nullptr
 
TFile * fFile = nullptr
 
std::string fFilename
 
Mode fMode = eRead
 
TTree * fTree = nullptr
 

Private Attributes

int fCurrentEvent = -1
 

Detailed Description

Interface for CDAS file reading.

Author
Troy Porter
Date
31 Jan 2004

Definition at line 19 of file CDASEventFile.h.

Constructor & Destructor Documentation

io::CDASEventFile::CDASEventFile ( )
default
io::CDASEventFile::CDASEventFile ( const std::string &  filename,
const Mode  mode = eRead,
utl::Branch *const  b = nullptr 
)
inline

Definition at line 24 of file CDASEventFile.h.

References RdGeoCeLDFFitter::b, and Open().

virtual io::CDASEventFile::~CDASEventFile ( )
virtualdefault

Member Function Documentation

void CDASEventFile::Close ( )
overridevirtual

Reimplemented from io::VROOTFile.

Definition at line 55 of file CDASEventFile.cc.

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

seek Event id set cursor there

Implements io::VEventFile.

Definition at line 169 of file CDASEventFile.cc.

References io::eEOF, and io::eSuccess.

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

Implements io::VEventFile.

Definition at line 225 of file CDASEventFile.cc.

string VROOTFile::GetRootMode ( const Mode  mode)
staticinherited
int VROOTFile::GetTree ( const std::string &  name)
protectedinherited
Status CDASEventFile::GotoPosition ( const unsigned int  position)
overridevirtual

goto by position in the file

Implements io::VEventFile.

Definition at line 207 of file CDASEventFile.cc.

References io::eEOF, and io::eSuccess.

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

Reimplemented from io::VROOTFile.

Definition at line 38 of file CDASEventFile.cc.

Referenced by CDASEventFile().

int VROOTFile::OpenROOTFile ( )
protectedinherited
Status CDASEventFile::Read ( evt::Event event)
overridevirtual
void CDASEventFile::Write ( const evt::Event event)
overridevirtual

Implements io::VEventFile.

Definition at line 70 of file CDASEventFile.cc.

References io::eRead, evt::Event::HasRawEvent(), and INFO.

Member Data Documentation

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

Definition at line 72 of file VEventFile.h.

int io::CDASEventFile::fCurrentEvent = -1
private

Definition at line 44 of file CDASEventFile.h.

TFile* io::VROOTFile::fFile = nullptr
protectedinherited
std::string io::VEventFile::fFilename
protectedinherited
Mode io::VEventFile::fMode = eRead
protectedinherited
TTree* io::VROOTFile::fTree = nullptr
protectedinherited

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

, generated on Tue Sep 26 2023.