#include <G4DCIOcatalog.hh>
Public Member Functions | |
G4DCIOcatalog () | |
virtual | ~G4DCIOcatalog () |
void | SetVerboseLevel (int v) |
void | RegisterEntry (G4VDCIOentry *d) |
void | RegisterDCIOmanager (G4VPDigitsCollectionIO *d) |
G4VDCIOentry * | GetEntry (std::string name) |
G4VPDigitsCollectionIO * | GetDCIOmanager (std::string name) |
void | PrintEntries () |
std::string | CurrentDCIOmanager () |
void | PrintDCIOmanager () |
size_t | NumberOfDCIOmanager () |
G4VPDigitsCollectionIO * | GetDCIOmanager (int n) |
Static Public Member Functions | |
static G4DCIOcatalog * | GetDCIOcatalog () |
Definition at line 47 of file G4DCIOcatalog.hh.
G4DCIOcatalog::G4DCIOcatalog | ( | ) |
virtual G4DCIOcatalog::~G4DCIOcatalog | ( | ) | [inline, virtual] |
std::string G4DCIOcatalog::CurrentDCIOmanager | ( | ) |
Definition at line 116 of file G4DCIOcatalog.cc.
Referenced by G4PersistencyCenter::CurrentDCIOmanager().
00117 { 00118 std::string list = ""; 00119 DCIOstore::const_iterator it; 00120 for ( it=theStore.begin(); it != theStore.end(); it++ ) { 00121 list += (*it).first + " "; 00122 } 00123 return list; 00124 }
G4DCIOcatalog * G4DCIOcatalog::GetDCIOcatalog | ( | ) | [static] |
Definition at line 44 of file G4DCIOcatalog.cc.
Referenced by G4PersistencyCenter::AddDCIOmanager(), G4DCIOentryT< T >::CreateDCIOmanager(), G4PersistencyCenter::CurrentDCIOmanager(), G4VDCIOentry::G4VDCIOentry(), G4VPDigitIO::G4VPDigitIO(), G4PersistencyCenter::PrintAll(), and G4PersistencyManager::SetVerboseLevel().
00045 { 00046 if ( f_thePointer == 0 ) f_thePointer = new G4DCIOcatalog; 00047 return f_thePointer; 00048 }
G4VPDigitsCollectionIO * G4DCIOcatalog::GetDCIOmanager | ( | int | n | ) |
Definition at line 139 of file G4DCIOcatalog.cc.
00140 { 00141 int i = 0; 00142 DCIOstore::const_iterator it; 00143 for ( it=theStore.begin(); it != theStore.end(); it++ ) { 00144 if (i++ == n) return (*it).second; 00145 } 00146 return 0; 00147 }
G4VPDigitsCollectionIO * G4DCIOcatalog::GetDCIOmanager | ( | std::string | name | ) |
Definition at line 92 of file G4DCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4VPDigitIO::SetVerboseLevel(), and G4PersistencyManager::SetVerboseLevel().
00093 { 00094 if ( theStore.find(name) == theStore.end() ) { 00095 G4cout << "Digit Collection I/O manager \"" << name 00096 << "\" not found!" << G4endl; 00097 return 0; 00098 } else { 00099 G4VPDigitsCollectionIO* ds = theStore[name]; 00100 return ds; 00101 } 00102 }
G4VDCIOentry * G4DCIOcatalog::GetEntry | ( | std::string | name | ) |
Definition at line 79 of file G4DCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4PersistencyCenter::AddDCIOmanager().
00080 { 00081 if ( theCatalog.find(name) == theCatalog.end() ) { 00082 G4cout << "Digit Collection I/O manager entry \"" << name 00083 << "\" not found!" << G4endl; 00084 return 0; 00085 } else { 00086 G4VDCIOentry* ds = theCatalog[name]; 00087 return ds; 00088 } 00089 }
size_t G4DCIOcatalog::NumberOfDCIOmanager | ( | ) | [inline] |
Definition at line 84 of file G4DCIOcatalog.hh.
Referenced by G4VPDigitIO::SetVerboseLevel(), and G4PersistencyManager::SetVerboseLevel().
void G4DCIOcatalog::PrintDCIOmanager | ( | ) |
Definition at line 127 of file G4DCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4DCIOentryT< T >::CreateDCIOmanager(), and G4PersistencyCenter::PrintAll().
00128 { 00129 G4cout << "I/O managers: "; 00130 G4cout << theStore.size() << G4endl; 00131 DCIOstore::const_iterator it; 00132 for ( it=theStore.begin(); it != theStore.end(); it++ ) { 00133 G4cout << " --- " << (*it).first 00134 << ", " << (*it).second << "." << G4endl; 00135 } 00136 }
void G4DCIOcatalog::PrintEntries | ( | ) |
Definition at line 105 of file G4DCIOcatalog.cc.
References G4cout, and G4endl.
Referenced by G4PersistencyCenter::PrintAll().
00106 { 00107 G4cout << "I/O manager entries: "; 00108 G4cout << theCatalog.size() << G4endl; 00109 DCIOmap::const_iterator it; 00110 for ( it=theCatalog.begin(); it != theCatalog.end(); it++ ) { 00111 G4cout << " --- " << (*it).first << G4endl; 00112 } 00113 }
void G4DCIOcatalog::RegisterDCIOmanager | ( | G4VPDigitsCollectionIO * | d | ) |
Definition at line 65 of file G4DCIOcatalog.cc.
References G4VPDigitsCollectionIO::DMname(), G4cout, and G4endl.
Referenced by G4DCIOentryT< T >::CreateDCIOmanager().
00066 { 00067 if ( m_verbose > 0 ) { 00068 G4cout << "registering I/O manager \"" << d->DMname() 00069 << "\" " << d << "." << G4endl; 00070 } 00071 if ( theStore.find(d->DMname()) != theStore.end() ) { 00072 G4cout << "Redefining I/O Manager " << d->DMname() << G4endl; 00073 } else { 00074 theStore[d->DMname()] = d; 00075 } 00076 }
void G4DCIOcatalog::RegisterEntry | ( | G4VDCIOentry * | d | ) |
Definition at line 51 of file G4DCIOcatalog.cc.
References G4cout, G4endl, and G4VDCIOentry::GetName().
Referenced by G4VDCIOentry::G4VDCIOentry().
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 G4DCIOcatalog::SetVerboseLevel | ( | int | v | ) | [inline] |
Definition at line 60 of file G4DCIOcatalog.hh.
Referenced by G4PersistencyManager::SetVerboseLevel().