00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // $Id$ 00027 // 00028 // 04-10-2010 M. Kelsey -- Replace G4String keys with integers (ZZZAAA), 00029 // move string operation to GenerateFilename() 00030 // 17-11-2010 V. Ivanchenko - make as a classical singleton. 00031 // 00032 // 17-10-2011 L. Desorgher -- Allow the user to replace the radioactive 00033 // decay data provided in Geant4 by its own data file for 00034 // a given isotope 00035 // 06-01-2012 V. Ivanchenko - added nuclear level data structure for 00036 // usage in HEP where internal conversion is neglected; 00037 // cleanup the code; new method GetLevelManager 00038 00039 #ifndef G4NuclearLevelStore_hh 00040 #define G4NuclearLevelStore_hh 1 00041 00042 #include "G4NuclearLevelManager.hh" 00043 #include "G4LevelManager.hh" 00044 #include "G4LevelReader.hh" 00045 #include "globals.hh" 00046 #include <map> 00047 00048 class G4NuclearLevelStore 00049 { 00050 private: 00051 00052 G4NuclearLevelStore(); 00053 00054 public: 00055 00056 static G4NuclearLevelStore* GetInstance(); 00057 00058 G4NuclearLevelManager* GetManager(G4int Z, G4int A); 00059 00060 G4LevelManager* GetLevelManager(G4int Z, G4int A); 00061 00062 ~G4NuclearLevelStore(); 00063 00064 void AddUserEvaporationDataFile(G4int Z, G4int A, 00065 const G4String& filename); 00066 00067 private: 00068 00069 G4int GenerateKey(G4int Z, G4int A) const { return Z*1000+A; } 00070 00071 G4String GenerateFileName(G4int Z, G4int A) const; 00072 00073 typedef std::map<G4int,G4NuclearLevelManager*> ManagersMap; 00074 typedef std::map<G4int,G4LevelManager*> MapForHEP; 00075 00076 G4LevelReader reader; 00077 ManagersMap theManagers; 00078 MapForHEP managersForHEP; 00079 G4String dirName; 00080 00081 static G4NuclearLevelStore* theInstance; 00082 00083 G4bool userFiles; 00084 std::map<G4int, G4String> theUserDataFiles; 00085 }; 00086 #endif