50G4NuclearLevelStore::G4NuclearLevelStore()
53 char* env = getenv(
"G4LEVELGAMMADATA");
56 G4cout <<
"G4NuclarLevelStore: please set the G4LEVELGAMMADATA environment variable\n";
68 ManagersMap::iterator i;
69 for (i = theManagers.begin(); i != theManagers.end(); ++i)
71 MapForHEP::iterator j;
72 for (j = managersForHEP.begin(); j != managersForHEP.end(); ++j)
75 std::map<G4int, G4String>::iterator k;
76 for (k = theUserDataFiles.begin(); k != theUserDataFiles.end(); ++k)
86 G4cout<<
"G4NuclearLevelStore::AddUserEvaporationDataFile "
87 <<
" Z= " << Z <<
" and A= " << A <<
" not valid!"<<
G4endl;
90 std::ifstream DecaySchemeFile(filename);
92 G4int ID_ion=Z*1000+A;
93 theUserDataFiles[ID_ion]=filename;
97 G4cout<<
"The file "<<filename<<
" does not exist!"<<
G4endl;
102G4NuclearLevelStore::GenerateFileName(
G4int Z,
G4int A)
const
104 std::ostringstream streamName;
105 streamName <<
'z' << Z <<
".a" << A;
114 if (A < 1 || Z < 1 || A < Z)
122 G4int key = Z*1000+A;
125 ManagersMap::iterator idx = theManagers.find(key);
127 if ( idx == theManagers.end() )
129 G4String file = dirName + GenerateFileName(Z,A);
133 G4String file1 = theUserDataFiles[key];
134 if (file1 !=
"") { file = file1; }
137 theManagers.insert(std::make_pair(key,result));
142 result = idx->second;
153 G4int key = Z*1000+A;
156 MapForHEP::iterator idx = managersForHEP.find(key);
158 if ( idx == managersForHEP.end() ) {
160 dirName + GenerateFileName(Z,A));
161 managersForHEP.insert(std::make_pair(key,result));
165 result = idx->second;
G4DLLIMPORT std::ostream G4cout
G4LevelManager * GetLevelManager(G4int Z, G4int A)
G4NuclearLevelManager * GetManager(G4int Z, G4int A)
void AddUserEvaporationDataFile(G4int Z, G4int A, const G4String &filename)
static G4NuclearLevelStore * GetInstance()