![]() |
|
|||
File indexing completed on 2025-09-15 08:58:43
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 // G4HCIOcatalog 0027 // 0028 // Class Description: 0029 // 0030 // Catalog for the I/O manager of hits collection for each detector. 0031 0032 // Author: Youhei Morita, 12.09.2001 0033 // -------------------------------------------------------------------- 0034 #ifndef G4HCIOCATALOG_HH 0035 #define G4HCIOCATALOG_HH 1 0036 0037 #include <map> 0038 #include "G4Types.hh" 0039 #include "G4String.hh" 0040 #include "G4VPHitsCollectionIO.hh" 0041 0042 class G4VHCIOentry; 0043 0044 using HCIOmap = std::map<G4String, G4VHCIOentry*, std::less<G4String>>; 0045 using HCIOstore = std::map<G4String, G4VPHitsCollectionIO*, std::less<G4String>>; 0046 0047 class G4HCIOcatalog 0048 { 0049 public: 0050 0051 G4HCIOcatalog(); 0052 // Constructor 0053 0054 virtual ~G4HCIOcatalog() {} 0055 // Destructor 0056 0057 static G4HCIOcatalog* GetHCIOcatalog(); 0058 // Construct G4HCIOcatalog and returns the pointer 0059 0060 void SetVerboseLevel(G4int v) { m_verbose = v; } 0061 // Set verbose level 0062 0063 void RegisterEntry(G4VHCIOentry* d); 0064 // Register I/O manager entry 0065 0066 void RegisterHCIOmanager(G4VPHitsCollectionIO* d); 0067 // Register I/O manager 0068 0069 G4VHCIOentry* GetEntry(const G4String& name); 0070 // Returns the I/O manager entry 0071 0072 G4VPHitsCollectionIO* GetHCIOmanager(const G4String& name); 0073 // Returns the registered I/O manager entry 0074 0075 void PrintEntries(); 0076 // Prints the list of I/O manager entries 0077 0078 G4String CurrentHCIOmanager(); 0079 // Returns the list of I/O managers 0080 0081 void PrintHCIOmanager(); 0082 // Prints the list of I/O managers 0083 0084 std::size_t NumberOfHCIOmanager() { return theStore.size(); } 0085 // Returns the number of registered I/O managers. 0086 0087 G4VPHitsCollectionIO* GetHCIOmanager(G4int n); 0088 // Returns the n-th registered I/O manager entry 0089 0090 private: 0091 0092 G4int m_verbose = 0; 0093 static G4ThreadLocal G4HCIOcatalog* f_thePointer; 0094 HCIOmap theCatalog; 0095 HCIOstore theStore; 0096 }; 0097 0098 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |