eic-smear  1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
erhic::LogReaderFactory Class Reference

#include <File.h>

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 360 of file File.h.

Constructor & Destructor Documentation

erhic::LogReaderFactory::LogReaderFactory ( )
protected

Constructor.

Definition at line 472 of file File.cxx.

erhic::LogReaderFactory::~LogReaderFactory ( )
protected

Destructor.

Definition at line 484 of file File.cxx.

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 371 of file File.cxx.

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 387 of file File.cxx.

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 405 of file File.cxx.

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

Returns the single instance of LogReaderFactory.

Definition at line 360 of file File.cxx.

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 427 of file File.cxx.


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