EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
erhic::LogReaderFactory Class Reference

#include <eic-smear/blob/master/include/eicsmear/erhic/File.h>

+ Collaboration diagram for erhic::LogReaderFactory:

Public Member Functions

LogReaderCreateReader (const EventBase &event) const
 
LogReaderCreateReader (const std::string &name) const
 
LogReaderCreateReader (std::istream &) const
 
std::string Locate (const std::string &mcFile) const
 

Static Public Member Functions

static LogReaderFactoryGetInstance ()
 

Protected Types

typedef std::map< std::string,
LogReader * > 
Map
 

Protected Member Functions

 LogReaderFactory ()
 
 ~LogReaderFactory ()
 

Protected Attributes

Map prototypes_
 

Detailed Description

Factory class for LogReaders.

Singleton class. Creates a LogReader instance corresponding to a Monte Carlo generator type.

Definition at line 364 of file File.h.

View newest version in sPHENIX GitHub at line 364 of file File.h

Member Typedef Documentation

typedef std::map<std::string, LogReader*> erhic::LogReaderFactory::Map
protected

Definition at line 417 of file File.h.

View newest version in sPHENIX GitHub at line 417 of file File.h

Constructor & Destructor Documentation

erhic::LogReaderFactory::LogReaderFactory ( )
protected

Constructor.

Definition at line 473 of file File.cxx.

View newest version in sPHENIX GitHub at line 473 of file File.cxx

References prototypes_.

erhic::LogReaderFactory::~LogReaderFactory ( )
protected

Destructor.

Definition at line 485 of file File.cxx.

View newest version in sPHENIX GitHub at line 485 of file File.cxx

References prototypes_.

Member Function Documentation

LogReader * erhic::LogReaderFactory::CreateReader ( const EventBase event) const

Returns a LogReader instance of the type for reading log files from the Monte Carlo generator event type 'event'. Returns NULL in the case of an unsupported generator. The LogReader must be deleted by the user.

Definition at line 364 of file File.cxx.

View newest version in sPHENIX GitHub at line 364 of file File.cxx

References name.

Referenced by erhic::File< T >::CreateLogReader(), and CreateReader().

+ Here is the caller graph for this function:

LogReader * erhic::LogReaderFactory::CreateReader ( const std::string &  name) const

Returns a LogReader instance of the type for reading log files from the Monte Carlo generator named 'name'. Returns NULL in the case of an unsupported generator. The LogReader must be deleted by the user.

Definition at line 380 of file File.cxx.

View newest version in sPHENIX GitHub at line 380 of file File.cxx

References prototypes_, and reader().

+ Here is the call graph for this function:

LogReader * erhic::LogReaderFactory::CreateReader ( std::istream &  is) const

Returns a LogReader instance of the type for reading log files from the Monte Carlo generator which produced the content in an istream, by reading the first line of that stream. Returns NULL in the case of an unsupported generator. The LogReader must be deleted by the user.

Returns a LogReader instance of the type for reading log files from the Monte Carlo generator named 'name'. Returns NULL in the case of an unsupported generator. The LogReader must be deleted by the user.

Definition at line 398 of file File.cxx.

View newest version in sPHENIX GitHub at line 398 of file File.cxx

References CreateReader(), getline, and reader().

+ Here is the call graph for this function:

LogReaderFactory & erhic::LogReaderFactory::GetInstance ( )
static

Returns the single instance of LogReaderFactory.

Definition at line 353 of file File.cxx.

View newest version in sPHENIX GitHub at line 353 of file File.cxx

Referenced by BuildTree(), and erhic::File< T >::CreateLogReader().

+ Here is the caller graph for this function:

std::string erhic::LogReaderFactory::Locate ( const std::string &  mcFile) const

Attempts to locate a log file corresponding to the named Monte Carlo file. Searches for a file with the same base name and extension '.log'. Looks in the current directory and, if mcFile gives a path containing 'TXTFILES', in the corresonding directory substituting 'LOGFILES'.

Definition at line 428 of file File.cxx.

View newest version in sPHENIX GitHub at line 428 of file File.cxx

References configureMap::inFileName.

Referenced by BuildTree().

+ Here is the caller graph for this function:

Member Data Documentation

Map erhic::LogReaderFactory::prototypes_
protected

Definition at line 418 of file File.h.

View newest version in sPHENIX GitHub at line 418 of file File.h

Referenced by CreateReader(), LogReaderFactory(), and ~LogReaderFactory().


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