|
||||
Warning, file /include/Geant4/G4DCIOentryT.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 // File: G4DCIOentryT.hh 0027 // 0028 // Class Description: 0029 // 0030 // Template class of DigitsCollection I/O Manager for late binding 0031 0032 // Author: Youhei Morita, 12.09.2001 0033 // -------------------------------------------------------------------- 0034 #ifndef G4DCIOENTRYT_HH 0035 #define G4DCIOENTRYT_HH 1 0036 0037 #include <string> 0038 #include "G4Types.hh" 0039 #include "G4VPDigitsCollectionIO.hh" 0040 0041 // Class inherited: 0042 #include "G4VDCIOentry.hh" 0043 0044 template <class T> 0045 class G4DCIOentryT : public G4VDCIOentry 0046 { 0047 public: 0048 0049 G4DCIOentryT<T>(std::string n) : G4VDCIOentry(n) 0050 { 0051 if(m_verbose > 2) 0052 { 0053 G4cout << "G4DCIOentryT: Registering DigitsCollection IO manager" 0054 << " for \"" << n << "\"" << G4endl; 0055 } 0056 } 0057 // Constructor 0058 0059 ~G4DCIOentryT() {} 0060 // Destructor 0061 0062 void CreateDCIOmanager(const G4String& detName, const G4String& colName) 0063 { 0064 if(f_manager == nullptr) 0065 { 0066 f_manager = new T(detName, colName); 0067 if(m_verbose > 2) 0068 { 0069 G4cout << "G4DCIOentryT: Constructing DigitsCollection IO manager" 0070 << " for \"" << detName << "\" " << f_manager << G4endl; 0071 } 0072 G4DCIOcatalog::GetDCIOcatalog()->RegisterDCIOmanager(f_manager); 0073 if(m_verbose > 2) 0074 { 0075 G4DCIOcatalog::GetDCIOcatalog()->PrintDCIOmanager(); 0076 } 0077 } 0078 } 0079 // Create a new digits collection I/O manager 0080 0081 void DeleteDCIOmanager() 0082 { 0083 if(f_manager != nullptr) { delete f_manager; } 0084 } 0085 // Delete a digits collection I/O manager 0086 0087 private: 0088 0089 G4VPDigitsCollectionIO* f_manager = nullptr; 0090 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 |