Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DCIOcatalog Class Reference

#include <G4DCIOcatalog.hh>

Public Member Functions

 G4DCIOcatalog ()
 
virtual ~G4DCIOcatalog ()
 
void SetVerboseLevel (int v)
 
void RegisterEntry (G4VDCIOentry *d)
 
void RegisterDCIOmanager (G4VPDigitsCollectionIO *d)
 
G4VDCIOentryGetEntry (const G4String &name)
 
G4VPDigitsCollectionIOGetDCIOmanager (const G4String &name)
 
void PrintEntries ()
 
G4String CurrentDCIOmanager ()
 
void PrintDCIOmanager ()
 
std::size_t NumberOfDCIOmanager ()
 
G4VPDigitsCollectionIOGetDCIOmanager (G4int n)
 

Static Public Member Functions

static G4DCIOcatalogGetDCIOcatalog ()
 

Detailed Description

Definition at line 48 of file G4DCIOcatalog.hh.

Constructor & Destructor Documentation

◆ G4DCIOcatalog()

G4DCIOcatalog::G4DCIOcatalog ( )

Definition at line 37 of file G4DCIOcatalog.cc.

38{
39}

Referenced by GetDCIOcatalog().

◆ ~G4DCIOcatalog()

virtual G4DCIOcatalog::~G4DCIOcatalog ( )
inlinevirtual

Definition at line 55 of file G4DCIOcatalog.hh.

55{}

Member Function Documentation

◆ CurrentDCIOmanager()

G4String G4DCIOcatalog::CurrentDCIOmanager ( )

Definition at line 129 of file G4DCIOcatalog.cc.

130{
131 G4String list = "";
132 for(auto it = theStore.cbegin(); it != theStore.cend(); ++it)
133 {
134 list += (*it).first + " ";
135 }
136 return list;
137}
std::size_t first(char) const

Referenced by G4PersistencyCenter::CurrentDCIOmanager().

◆ GetDCIOcatalog()

G4DCIOcatalog * G4DCIOcatalog::GetDCIOcatalog ( )
static

◆ GetDCIOmanager() [1/2]

G4VPDigitsCollectionIO * G4DCIOcatalog::GetDCIOmanager ( const G4String name)

Definition at line 102 of file G4DCIOcatalog.cc.

103{
104 if(theStore.find(name) == theStore.cend())
105 {
106 G4cout << "Digit Collection I/O manager \"" << name << "\" not found!"
107 << G4endl;
108 return nullptr;
109 }
110 else
111 {
112 G4VPDigitsCollectionIO* ds = theStore[name];
113 return ds;
114 }
115}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const char * name(G4int ptype)

Referenced by G4PersistencyManager::SetVerboseLevel(), and G4VPDigitIO::SetVerboseLevel().

◆ GetDCIOmanager() [2/2]

G4VPDigitsCollectionIO * G4DCIOcatalog::GetDCIOmanager ( G4int  n)

Definition at line 151 of file G4DCIOcatalog.cc.

152{
153 G4int i = 0;
154 for(auto it = theStore.cbegin(); it != theStore.cend(); ++it)
155 {
156 if(i++ == n)
157 return (*it).second;
158 }
159 return nullptr;
160}
int G4int
Definition: G4Types.hh:85

◆ GetEntry()

G4VDCIOentry * G4DCIOcatalog::GetEntry ( const G4String name)

Definition at line 86 of file G4DCIOcatalog.cc.

87{
88 if(theCatalog.find(name) == theCatalog.cend())
89 {
90 G4cout << "Digit Collection I/O manager entry \"" << name << "\" not found!"
91 << G4endl;
92 return nullptr;
93 }
94 else
95 {
96 G4VDCIOentry* ds = theCatalog[name];
97 return ds;
98 }
99}

Referenced by G4PersistencyCenter::AddDCIOmanager().

◆ NumberOfDCIOmanager()

std::size_t G4DCIOcatalog::NumberOfDCIOmanager ( )
inline

Definition at line 85 of file G4DCIOcatalog.hh.

85{ return theStore.size(); }

Referenced by G4PersistencyManager::SetVerboseLevel(), and G4VPDigitIO::SetVerboseLevel().

◆ PrintDCIOmanager()

void G4DCIOcatalog::PrintDCIOmanager ( )

Definition at line 140 of file G4DCIOcatalog.cc.

141{
142 G4cout << "I/O managers: ";
143 G4cout << theStore.size() << G4endl;
144 for(auto it = theStore.cbegin(); it != theStore.cend(); ++it)
145 {
146 G4cout << " --- " << (*it).first << ", " << (*it).second << "." << G4endl;
147 }
148}

Referenced by G4DCIOentryT< T >::CreateDCIOmanager(), and G4PersistencyCenter::PrintAll().

◆ PrintEntries()

void G4DCIOcatalog::PrintEntries ( )

Definition at line 118 of file G4DCIOcatalog.cc.

119{
120 G4cout << "I/O manager entries: ";
121 G4cout << theCatalog.size() << G4endl;
122 for(auto it = theCatalog.cbegin(); it != theCatalog.cend(); ++it)
123 {
124 G4cout << " --- " << (*it).first << G4endl;
125 }
126}

Referenced by G4PersistencyCenter::PrintAll().

◆ RegisterDCIOmanager()

void G4DCIOcatalog::RegisterDCIOmanager ( G4VPDigitsCollectionIO d)

Definition at line 68 of file G4DCIOcatalog.cc.

69{
70 if(m_verbose > 0)
71 {
72 G4cout << "registering I/O manager \"" << d->DMname() << "\" " << d << "."
73 << G4endl;
74 }
75 if(theStore.find(d->DMname()) != theStore.cend())
76 {
77 G4cout << "Redefining I/O Manager " << d->DMname() << G4endl;
78 }
79 else
80 {
81 theStore[d->DMname()] = d;
82 }
83}

Referenced by G4DCIOentryT< T >::CreateDCIOmanager().

◆ RegisterEntry()

void G4DCIOcatalog::RegisterEntry ( G4VDCIOentry d)

Definition at line 50 of file G4DCIOcatalog.cc.

51{
52 if(m_verbose > 0)
53 {
54 G4cout << "registering I/O manager entry \"" << d->GetName() << "\" " << d
55 << "." << G4endl;
56 }
57 if(theCatalog.find(d->GetName()) != theCatalog.cend())
58 {
59 G4cout << "Redefining I/O Managers list " << d->GetName() << G4endl;
60 }
61 else
62 {
63 theCatalog[d->GetName()] = d;
64 }
65}
const G4String & GetName()
Definition: G4VDCIOentry.hh:53

Referenced by G4VDCIOentry::G4VDCIOentry().

◆ SetVerboseLevel()

void G4DCIOcatalog::SetVerboseLevel ( int  v)
inline

Definition at line 61 of file G4DCIOcatalog.hh.

61{ m_verbose = v; }

Referenced by G4PersistencyManager::SetVerboseLevel().


The documentation for this class was generated from the following files: