#include <G4HCIOcatalog.hh>
Public Member Functions | |
G4HCIOcatalog () | |
virtual | ~G4HCIOcatalog () |
void | SetVerboseLevel (int v) |
void | RegisterEntry (G4VHCIOentry *d) |
void | RegisterHCIOmanager (G4VPHitsCollectionIO *d) |
G4VHCIOentry * | GetEntry (std::string name) |
G4VPHitsCollectionIO * | GetHCIOmanager (std::string name) |
void | PrintEntries () |
std::string | CurrentHCIOmanager () |
void | PrintHCIOmanager () |
size_t | NumberOfHCIOmanager () |
G4VPHitsCollectionIO * | GetHCIOmanager (int n) |
Static Public Member Functions | |
static G4HCIOcatalog * | GetHCIOcatalog () |
Definition at line 47 of file G4HCIOcatalog.hh.
G4HCIOcatalog::G4HCIOcatalog | ( | ) |
virtual G4HCIOcatalog::~G4HCIOcatalog | ( | ) | [inline, virtual] |
std::string G4HCIOcatalog::CurrentHCIOmanager | ( | ) |
Definition at line 116 of file G4HCIOcatalog.cc.
Referenced by G4PersistencyCenter::CurrentHCIOmanager().
00117 { 00118 std::string list = ""; 00119 HCIOstore::const_iterator it; 00120 for ( it=theStore.begin(); it != theStore.end(); it++ ) { 00121 list += (*it).first + " "; 00122 } 00123 return list; 00124 }
G4VHCIOentry * G4HCIOcatalog::GetEntry | ( | std::string | name | ) |
Definition at line 79 of file G4HCIOcatalog.cc.
References G4cout.
Referenced by G4PersistencyCenter::AddHCIOmanager().
00080 { 00081 if ( theCatalog.find(name) == theCatalog.end() ) { 00082 G4cout << "Hit Collection I/O manager entry \"" << name 00083 << "\" not found!" << std::endl; 00084 return 0; 00085 } else { 00086 G4VHCIOentry* ds = theCatalog[name]; 00087 return ds; 00088 } 00089 }
G4HCIOcatalog * G4HCIOcatalog::GetHCIOcatalog | ( | ) | [static] |
Definition at line 44 of file G4HCIOcatalog.cc.
Referenced by G4PersistencyCenter::AddHCIOmanager(), G4HCIOentryT< T >::CreateHCIOmanager(), G4PersistencyCenter::CurrentHCIOmanager(), G4VHCIOentry::G4VHCIOentry(), G4VPHitIO::G4VPHitIO(), G4PersistencyCenter::PrintAll(), and G4PersistencyManager::SetVerboseLevel().
00045 { 00046 if ( f_thePointer == 0 ) f_thePointer = new G4HCIOcatalog; 00047 return f_thePointer; 00048 }
G4VPHitsCollectionIO * G4HCIOcatalog::GetHCIOmanager | ( | int | n | ) |
Definition at line 139 of file G4HCIOcatalog.cc.
00140 { 00141 int i = 0; 00142 HCIOstore::const_iterator it; 00143 for ( it=theStore.begin(); it != theStore.end(); it++ ) { 00144 if (i++ == n) return (*it).second; 00145 } 00146 return 0; 00147 }
G4VPHitsCollectionIO * G4HCIOcatalog::GetHCIOmanager | ( | std::string | name | ) |
Definition at line 92 of file G4HCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4VPHitIO::SetVerboseLevel(), and G4PersistencyManager::SetVerboseLevel().
00093 { 00094 if ( theStore.find(name) == theStore.end() ) { 00095 G4cout << "Hit Collection I/O manager \"" << name 00096 << "\" not found!" << G4endl; 00097 return 0; 00098 } else { 00099 G4VPHitsCollectionIO* ds = theStore[name]; 00100 return ds; 00101 } 00102 }
size_t G4HCIOcatalog::NumberOfHCIOmanager | ( | ) | [inline] |
Definition at line 84 of file G4HCIOcatalog.hh.
Referenced by G4VPHitIO::SetVerboseLevel(), and G4PersistencyManager::SetVerboseLevel().
void G4HCIOcatalog::PrintEntries | ( | ) |
Definition at line 105 of file G4HCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4PersistencyCenter::PrintAll().
00106 { 00107 G4cout << "I/O manager entries: "; 00108 G4cout << theCatalog.size() << G4endl; 00109 HCIOmap::const_iterator it; 00110 for ( it=theCatalog.begin(); it != theCatalog.end(); it++ ) { 00111 G4cout << " --- " << (*it).first << G4endl; 00112 } 00113 }
void G4HCIOcatalog::PrintHCIOmanager | ( | ) |
Definition at line 127 of file G4HCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4HCIOentryT< T >::CreateHCIOmanager(), and G4PersistencyCenter::PrintAll().
00128 { 00129 G4cout << "I/O managers: "; 00130 G4cout << theStore.size() << G4endl; 00131 HCIOstore::const_iterator it; 00132 for ( it=theStore.begin(); it != theStore.end(); it++ ) { 00133 G4cout << " --- " << (*it).first 00134 << ", " << (*it).second << "." << G4endl; 00135 } 00136 }
void G4HCIOcatalog::RegisterEntry | ( | G4VHCIOentry * | d | ) |
Definition at line 51 of file G4HCIOcatalog.cc.
References G4cout, G4endl, and G4VHCIOentry::GetName().
Referenced by G4VHCIOentry::G4VHCIOentry().
00052 { 00053 if ( m_verbose > 0 ) { 00054 G4cout << "registering I/O manager entry \"" << d->GetName() 00055 << "\" " << d << "." << G4endl; 00056 } 00057 if ( theCatalog.find(d->GetName()) != theCatalog.end() ) { 00058 G4cout << "Redefining I/O Managers list " << d->GetName() << G4endl; 00059 } else { 00060 theCatalog[d->GetName()] = d; 00061 } 00062 }
void G4HCIOcatalog::RegisterHCIOmanager | ( | G4VPHitsCollectionIO * | d | ) |
Definition at line 65 of file G4HCIOcatalog.cc.
References G4cout, G4endl, and G4VPHitsCollectionIO::SDname().
Referenced by G4HCIOentryT< T >::CreateHCIOmanager().
00066 { 00067 if ( m_verbose > 0 ) { 00068 G4cout << "registering I/O manager \"" << d->SDname() 00069 << "\" " << d << "." << G4endl; 00070 } 00071 if ( theStore.find(d->SDname()) != theStore.end() ) { 00072 G4cout << "Redefining I/O Manager " << d->SDname() << G4endl; 00073 } else { 00074 theStore[d->SDname()] = d; 00075 } 00076 }
void G4HCIOcatalog::SetVerboseLevel | ( | int | v | ) | [inline] |
Definition at line 60 of file G4HCIOcatalog.hh.
Referenced by G4PersistencyManager::SetVerboseLevel().