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

Read profiles from CONEX. More...

#include "io/CONEXFile.h"

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

Public Member Functions

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

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

 CONEXFile (const CONEXFile &)
 
void MapHeader (const float version)
 
void MapShower (const float version)
 
virtual int NextEntry ()
 
CONEXFileoperator= (const CONEXFile &)
 

Private Attributes

unsigned int fCurrentPosition = 0
 
TFile * fFile = nullptr
 
double fFirstGrammageBin = 0
 
CONEXHeaderfHeader = nullptr
 
TTree * fHeaderTree = nullptr
 
std::vector
< io::CONEXLeadingParticles
fLPvector
 
float fROOTVersion = 0
 
CONEXShowerfShower = nullptr
 
TTree * fShowerTree = nullptr
 
float fVersion = 0
 

Detailed Description

Read profiles from CONEX.

Author
Ralf Ulrich
Date
7 Apr 2005

Definition at line 36 of file CONEXFile.h.

Constructor & Destructor Documentation

io::CONEXFile::CONEXFile ( )
inline

Definition at line 39 of file CONEXFile.h.

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

Definition at line 47 of file CONEXFile.cc.

References Open().

io::CONEXFile::~CONEXFile ( )
virtual

Definition at line 39 of file CONEXFile.cc.

io::CONEXFile::CONEXFile ( const CONEXFile )
private

Member Function Documentation

void io::CONEXFile::Close ( )
overridevirtual

Implements io::VEventFile.

Definition at line 55 of file CONEXFile.cc.

References fFile, fHeader, and fShower.

Referenced by 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)
overridevirtual

seek Event id set cursor there

Implements io::VEventFile.

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

Implements io::VEventFile.

Definition at line 265 of file CONEXFile.cc.

References ERROR, and fShowerTree.

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

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

goto by position in the file

Implements io::VEventFile.

Definition at line 245 of file CONEXFile.cc.

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

Referenced by FindEvent().

void io::CONEXFile::MapHeader ( const float  version)
private
void io::CONEXFile::MapShower ( const float  version)
private
int io::CONEXFile::NextEntry ( )
privatevirtual

Reimplemented in io::CONEXRandomFile.

Definition at line 257 of file CONEXFile.cc.

References fCurrentPosition.

Referenced by Read().

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

Implements io::VEventFile.

Definition at line 228 of file CONEXFile.cc.

References ERROR.

Member Data Documentation

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

Definition at line 72 of file VEventFile.h.

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

Definition at line 72 of file CONEXFile.h.

Referenced by GotoPosition(), NextEntry(), and Read().

TFile* io::CONEXFile::fFile = nullptr
private

Definition at line 60 of file CONEXFile.h.

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

std::string io::VEventFile::fFilename
protectedinherited
double io::CONEXFile::fFirstGrammageBin = 0
private

Definition at line 67 of file CONEXFile.h.

Referenced by Open().

CONEXHeader* io::CONEXFile::fHeader = nullptr
private

Definition at line 65 of file CONEXFile.h.

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

TTree* io::CONEXFile::fHeaderTree = nullptr
private

Definition at line 62 of file CONEXFile.h.

Referenced by MapHeader(), and Open().

std::vector<io::CONEXLeadingParticles> io::CONEXFile::fLPvector
private

Definition at line 66 of file CONEXFile.h.

Referenced by Read().

Mode io::VEventFile::fMode = eRead
protectedinherited
float io::CONEXFile::fROOTVersion = 0
private

Definition at line 70 of file CONEXFile.h.

Referenced by MapHeader(), MapShower(), Open(), and Read().

CONEXShower* io::CONEXFile::fShower = nullptr
private

Definition at line 64 of file CONEXFile.h.

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

TTree* io::CONEXFile::fShowerTree = nullptr
private

Definition at line 61 of file CONEXFile.h.

Referenced by GetNEvents(), MapShower(), Open(), and Read().

float io::CONEXFile::fVersion = 0
private

Definition at line 69 of file CONEXFile.h.


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

, generated on Tue Sep 26 2023.