22std::ifstream* GSystemTextFactory::gSystemTextFileStream(
GSystem* system,
const std::string& SYSTEMTYPE) {
25 std::string fname = fileName + SYSTEMTYPE + variation +
".txt";
27 log->
info(0,
"gSystemTextFileStream filename is: ", fname);
30 auto IN =
new std::ifstream(fname.c_str());
33 log->
info(1,
"Trying file ", fname);
39 std::string newName = trialLocation +
"/" + fname;
41 log->
info(1,
"Trying file ", newName);
43 IN->open(newName.c_str());
46 log->
info(1,
"Trying file ", newName);
56 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 getAnnotations() const
std::string getVariation() const
std::string getFilePath()
Gets the full file path of the system.
Conventions and shared constants for the detector-system module.
#define ERR_GSETUPFILENOTOFOUND