52 CCalSensitiveConfIterator it = theConfiguration.find(n);
54 if (it != theConfiguration.end())
55 flag = (*it).second.SensitiveFlag;
57 G4cerr <<
"ERROR: In CCalSensitiveConfiguration::getSensitiveFlag(const "
58 <<
"G4String& n)" <<
G4endl
59 <<
" " << n <<
" not found in configuration file" <<
G4endl;
67 CCalSensitiveConfIterator it = theConfiguration.find(n);
69 if (it != theConfiguration.end())
70 fn = (*it).second.FileName;
72 G4cerr <<
"ERROR: In CCalSensitiveConfiguration::getFileName(const "
73 <<
"G4String& n)" <<
G4endl
74 <<
" " << n <<
" not found in configuration file" <<
G4endl;
80 CCalSensitiveConfiguration::CCalSensitiveConfiguration(): theConfiguration() {
84 G4String pathName = getenv(
"CCAL_CONFPATH");
85 G4String fileenv = getenv(
"CCAL_SENSITIVECONF");
86 if (!pathName || !fileenv) {
88 ed <<
"ERROR: CCAL_SENSITIVECONF and/or CCAL_CONFPATH not set" <<
G4endl
89 <<
" Set them to the sensitive configuration file/path" <<
G4endl;
90 G4Exception(
"CCalSensitiveConfiguration::CCalSensitiveConfiguration()",
95 G4cout <<
" ==> Opening file " << fileenv <<
"..." <<
G4endl;
100 G4Exception(
"CCalSensitiveConfiguration::CCalSensitiveConfiguration()",
103 "Unable to open sensitive input file");
114 is >> gcinfo.SensitiveFlag >>
jump;
116 G4cout <<
"CCalSensitiveConfiguration constructor: Read \"" << name
117 <<
"\" \"" << gcinfo.FileName <<
"\"" <<
tab << gcinfo.SensitiveFlag
120 theConfiguration[
name] = gcinfo;
bool openGeomFile(std::ifstream &is, const G4String &pathname, const G4String &filename)
std::ostringstream G4ExceptionDescription
G4String getFileName(const G4String &n)
std::istream & jump(std::istream &)
static CCalSensitiveConfiguration * getInstance()
std::ifstream & readName(std::ifstream &, G4String &)
G4GLOB_DLL std::ostream G4cout
std::ostream & tab(std::ostream &)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
int getSensitiveFlag(const G4String &n)
G4GLOB_DLL std::ostream G4cerr