|
||||
File indexing completed on 2025-01-18 09:58:54
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4ParticlePropertyTable 0027 // 0028 // Class description: 0029 // 0030 // This class manages properties of a particle which are properties 0031 // in G4ParticlePropertyTable class. This class is a singleton. 0032 0033 // Author: H.Kurashige, 9 June 2003 - First implementation 0034 // -------------------------------------------------------------------- 0035 #ifndef G4ParticlePropertyTable_hh 0036 #define G4ParticlePropertyTable_hh 1 0037 0038 #include "G4ParticleDefinition.hh" 0039 #include "G4ParticlePropertyData.hh" 0040 #include "G4ParticleTable.hh" 0041 #include "G4ios.hh" 0042 #include "globals.hh" 0043 0044 #include <vector> 0045 0046 class G4ParticlePropertyTable 0047 { 0048 public: 0049 G4ParticlePropertyTable(const G4ParticlePropertyTable&) = delete; 0050 G4ParticlePropertyTable& operator=(const G4ParticlePropertyTable&) = delete; 0051 0052 ~G4ParticlePropertyTable(); 0053 0054 // Return the pointer to G4ParticlePropertyTable object 0055 // G4ParticlePropertyTable is a "singleton" and can get its pointer 0056 // by this function. At the first time of calling this function, 0057 // the G4ParticleTable object is instantiated 0058 static G4ParticlePropertyTable* GetParticlePropertyTable(); 0059 0060 // Return the pointer to G4ParticlePropertyData object, 0061 // which contains properties for the particle specified. 0062 // (return 0 if the specified particle does not exist) 0063 G4ParticlePropertyData* GetParticleProperty(const G4String& aParticleName); 0064 G4ParticlePropertyData* GetParticleProperty(const G4ParticleDefinition* aP); 0065 0066 // Change particle properties for the particle specified. 0067 // Return true if properties are successfully set 0068 G4bool SetParticleProperty(const G4ParticlePropertyData& newProperty); 0069 0070 // Clear and destroy data 0071 void Clear(); 0072 0073 // Control flag for output message 0074 // 0: Silent 0075 // 1: Warning message 0076 // 2: More 0077 void SetVerboseLevel(G4int value); 0078 G4int GetVerboseLevel() const; 0079 0080 protected: 0081 // Hidden default constructor; this class is a singleton 0082 G4ParticlePropertyTable(); 0083 0084 G4ParticleTable* fParticleTable = nullptr; 0085 0086 std::vector<G4ParticlePropertyData*> arrayDataObject; 0087 0088 private: 0089 G4int verboseLevel = 1; 0090 static G4ThreadLocal G4ParticlePropertyTable* fgParticlePropertyTable; 0091 }; 0092 0093 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |