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