List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
io::EventFileChain Class Reference

A collection of EventFile. More...

#include "io/EventFileChain.h"

Public Member Functions

 EventFileChain (utl::Branch &branch)
 
 EventFileChain (const Type type)
 
 EventFileChain (const std::string &filenames, const Type type)
 Create from a list of file names separated by a space. More...
 
 EventFileChain (const std::vector< std::string > &filenames, const Type type)
 Create from a vector of strings. More...
 
const std::string & GetCurrentFilename () const
 
Type GetFileType () const
 
Status Read (evt::Event &event)
 read current event and advance cursor by 1 More...
 
void SetFileList (const std::vector< std::string > &filenames)
 
void SetIgnoreExceptions (const bool ignore)
 
 ~EventFileChain ()
 

Private Types

typedef std::vector< std::string > FileContainer
 

Private Member Functions

FileContainer::iterator
fFileIterator fFileList 
end ()}
 
 EventFileChain (const EventFileChain &eventFileChain)
 copying disabled More...
 
Status OpenCurrent ()
 
EventFileChainoperator= (const EventFileChain &eventFileChain)
 
void Parse ()
 

Static Private Member Functions

static void InitXMLDictionary ()
 

Private Attributes

utl::Branch fBranch
 
bool fCatchExceptions = false
 
FileContainer fFileList
 
EventFilefOpenFile = nullptr
 
Type fType = io::Type::eUnknownType
 

Static Private Attributes

static std::map< std::string,
std::string > 
fgXMLDictionary
 

Detailed Description

A collection of EventFile.

Author
Stefano Argiro`
Darko Veberic
Date
02 Feb 2004

Definition at line 33 of file EventFileChain.h.

Member Typedef Documentation

typedef std::vector<std::string> io::EventFileChain::FileContainer
private

Definition at line 76 of file EventFileChain.h.

Constructor & Destructor Documentation

io::EventFileChain::EventFileChain ( utl::Branch branch)
io::EventFileChain::EventFileChain ( const Type  type)
inline

Definition at line 38 of file EventFileChain.h.

io::EventFileChain::EventFileChain ( const std::string &  filenames,
const Type  type 
)

Create from a list of file names separated by a space.

This will trow an IOFailure exception if one of the filenams does not exist

Definition at line 81 of file EventFileChain.cc.

References fFileList, and Parse().

io::EventFileChain::EventFileChain ( const std::vector< std::string > &  filenames,
const Type  type 
)

Create from a vector of strings.

Definition at line 95 of file EventFileChain.cc.

References Parse().

io::EventFileChain::~EventFileChain ( )

Definition at line 105 of file EventFileChain.cc.

References fOpenFile.

io::EventFileChain::EventFileChain ( const EventFileChain eventFileChain)
private

copying disabled

Member Function Documentation

FileContainer::iterator fFileIterator fFileList io::EventFileChain::end ( )
private
const std::string & io::EventFileChain::GetCurrentFilename ( ) const

Definition at line 165 of file EventFileChain.cc.

References fFileList.

Referenced by Read().

Type io::EventFileChain::GetFileType ( ) const
inline

Definition at line 59 of file EventFileChain.h.

References fType.

void io::EventFileChain::InitXMLDictionary ( )
staticprivate

Definition at line 313 of file EventFileChain.cc.

References fgXMLDictionary.

Referenced by Parse().

Status io::EventFileChain::OpenCurrent ( )
inlineprivate
EventFileChain& io::EventFileChain::operator= ( const EventFileChain eventFileChain)
private
void io::EventFileChain::Parse ( )
private
Status io::EventFileChain::Read ( evt::Event event)

read current event and advance cursor by 1

Will step to the next file if necessary

Definition at line 129 of file EventFileChain.cc.

References io::eEOF, io::eFail, io::eSuccess, fFileList, fOpenFile, GetCurrentFilename(), OpenCurrent(), io::EventFile::Read(), and WARNING.

Referenced by RdEventMerger::RdEventMerger::Run().

void io::EventFileChain::SetFileList ( const std::vector< std::string > &  filenames)

Definition at line 112 of file EventFileChain.cc.

References fFileList, fOpenFile, and Parse().

Referenced by EventFileChain().

void io::EventFileChain::SetIgnoreExceptions ( const bool  ignore)
inline

Definition at line 61 of file EventFileChain.h.

References fCatchExceptions.

Member Data Documentation

utl::Branch io::EventFileChain::fBranch
private

Definition at line 74 of file EventFileChain.h.

Referenced by EventFileChain(), and OpenCurrent().

bool io::EventFileChain::fCatchExceptions = false
private

Definition at line 84 of file EventFileChain.h.

Referenced by OpenCurrent(), and SetIgnoreExceptions().

FileContainer io::EventFileChain::fFileList
private

Definition at line 78 of file EventFileChain.h.

Referenced by EventFileChain(), GetCurrentFilename(), Parse(), Read(), and SetFileList().

std::map< std::string, std::string > io::EventFileChain::fgXMLDictionary
staticprivate

Definition at line 86 of file EventFileChain.h.

Referenced by InitXMLDictionary(), and Parse().

EventFile* io::EventFileChain::fOpenFile = nullptr
private

Definition at line 81 of file EventFileChain.h.

Referenced by OpenCurrent(), Read(), SetFileList(), and ~EventFileChain().

Type io::EventFileChain::fType = io::Type::eUnknownType
private

Definition at line 82 of file EventFileChain.h.

Referenced by EventFileChain(), GetFileType(), and OpenCurrent().


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

, generated on Tue Sep 26 2023.