23std::unique_ptr<std::ifstream> GSystemTextFactory::gSystemTextFileStream(
GSystem* system,
const std::string& SYSTEMTYPE) {
26 std::string fname = fileName + SYSTEMTYPE + variation +
".txt";
28 log->
info(0,
"gSystemTextFileStream filename is: ", fname);
31 auto IN = std::make_unique<std::ifstream>(fname.c_str());
34 log->
info(1,
"Trying file ", fname);
40 std::string newName = trialLocation +
"/" + fname;
42 log->
info(1,
"Trying file ", newName);
44 IN->open(newName.c_str());
47 log->
info(1,
"Trying file ", newName);
57 log->
info(1,
"File ", fname,
" not found, but this is ok because the system annotation is 'mats_only'");
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
std::vector< std::string > possibleLocationOfFiles
List of candidate directories used by file-based factories.
Represents a single detector system (e.g., calorimeter, tracker).
std::string getFilePath() const
Gets the full file path of the system.
std::string getAnnotations() const
std::string getVariation() const
Conventions and shared constants for the detector-system module.
#define ERR_GSETUPFILENOTOFOUND