![]() |
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
|
#include <File.h>
Public Member Functions | |
LogReader * | CreateReader (const EventBase &event) const |
LogReader * | CreateReader (const std::string &name) const |
LogReader * | CreateReader (std::istream &) const |
std::string | Locate (const std::string &mcFile) const |
Static Public Member Functions | |
static LogReaderFactory & | GetInstance () |
Protected Types | |
typedef std::map< std::string, LogReader * > | Map |
Protected Member Functions | |
LogReaderFactory () | |
~LogReaderFactory () | |
Protected Attributes | |
Map | prototypes_ |
Factory class for LogReaders.
Singleton class. Creates a LogReader instance corresponding to a Monte Carlo generator type.
|
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 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.
|
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'.