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
|
Factory class for LogReaders. More...
#include <File.h>
Public Member Functions | |
LogReader * | CreateReader (const EventBase &event) const |
Returns a LogReader instance of the type for reading log files from the Monte Carlo generator event type 'event'. More... | |
LogReader * | CreateReader (const std::string &name) const |
Returns a LogReader instance of the type for reading log files from the Monte Carlo generator named 'name'. More... | |
LogReader * | CreateReader (std::istream &) 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. More... | |
std::string | Locate (const std::string &mcFile) const |
Attempts to locate a log file corresponding to the named Monte Carlo file. More... | |
Static Public Member Functions | |
static LogReaderFactory & | GetInstance () |
Returns the single instance of LogReaderFactory. More... | |
Protected Types | |
typedef std::map< std::string, LogReader * > | Map |
Protected Member Functions | |
LogReaderFactory () | |
Constructor. More... | |
~LogReaderFactory () | |
Destructor. More... | |
Protected Attributes | |
Map | prototypes_ |
Factory class for LogReaders.
Singleton class. Creates a LogReader instance corresponding to a Monte Carlo generator type.
|
protected |
|
protected |
|
protected |
LogReader * erhic::LogReaderFactory::CreateReader | ( | const std::string & | name | ) | const |
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 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.
|
static |
Returns the single instance of LogReaderFactory.
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'.