Geant4  10.02.p03
G4DCIOcatalog Class Reference

#include <G4DCIOcatalog.hh>

Collaboration diagram for G4DCIOcatalog:

Public Member Functions

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

Static Public Member Functions

static G4DCIOcatalogGetDCIOcatalog ()
 

Private Attributes

int m_verbose
 
DCIOmap theCatalog
 
DCIOstore theStore
 

Static Private Attributes

static G4ThreadLocal G4DCIOcatalogf_thePointer = 0
 

Detailed Description

Definition at line 47 of file G4DCIOcatalog.hh.

Constructor & Destructor Documentation

◆ G4DCIOcatalog()

G4DCIOcatalog::G4DCIOcatalog ( )

Definition at line 39 of file G4DCIOcatalog.cc.

40  : m_verbose(0)
41 {}
Here is the caller graph for this function:

◆ ~G4DCIOcatalog()

virtual G4DCIOcatalog::~G4DCIOcatalog ( )
inlinevirtual

Definition at line 53 of file G4DCIOcatalog.hh.

53 {};
Here is the call graph for this function:

Member Function Documentation

◆ CurrentDCIOmanager()

std::string G4DCIOcatalog::CurrentDCIOmanager ( )

Definition at line 116 of file G4DCIOcatalog.cc.

117 {
118  std::string list = "";
119  DCIOstore::const_iterator it;
120  for ( it=theStore.begin(); it != theStore.end(); it++ ) {
121  list += (*it).first + " ";
122  }
123  return list;
124 }
DCIOstore theStore
Here is the caller graph for this function:

◆ GetDCIOcatalog()

G4DCIOcatalog * G4DCIOcatalog::GetDCIOcatalog ( )
static

Definition at line 44 of file G4DCIOcatalog.cc.

45 {
46  if ( f_thePointer == 0 ) f_thePointer = new G4DCIOcatalog;
47  return f_thePointer;
48 }
static G4ThreadLocal G4DCIOcatalog * f_thePointer
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDCIOmanager() [1/2]

G4VPDigitsCollectionIO * G4DCIOcatalog::GetDCIOmanager ( std::string  name)

Definition at line 92 of file G4DCIOcatalog.cc.

93 {
94  if ( theStore.find(name) == theStore.end() ) {
95  G4cout << "Digit Collection I/O manager \"" << name
96  << "\" not found!" << G4endl;
97  return 0;
98  } else {
100  return ds;
101  }
102 }
G4String name
Definition: TRTMaterials.hh:40
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
DCIOstore theStore
Here is the caller graph for this function:

◆ GetDCIOmanager() [2/2]

G4VPDigitsCollectionIO * G4DCIOcatalog::GetDCIOmanager ( int  n)

Definition at line 139 of file G4DCIOcatalog.cc.

140 {
141  int i = 0;
142  DCIOstore::const_iterator it;
143  for ( it=theStore.begin(); it != theStore.end(); it++ ) {
144  if (i++ == n) return (*it).second;
145  }
146  return 0;
147 }
Char_t n[5]
DCIOstore theStore

◆ GetEntry()

G4VDCIOentry * G4DCIOcatalog::GetEntry ( std::string  name)

Definition at line 79 of file G4DCIOcatalog.cc.

80 {
81  if ( theCatalog.find(name) == theCatalog.end() ) {
82  G4cout << "Digit Collection I/O manager entry \"" << name
83  << "\" not found!" << G4endl;
84  return 0;
85  } else {
87  return ds;
88  }
89 }
G4String name
Definition: TRTMaterials.hh:40
DCIOmap theCatalog
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ NumberOfDCIOmanager()

size_t G4DCIOcatalog::NumberOfDCIOmanager ( )
inline

Definition at line 84 of file G4DCIOcatalog.hh.

84 { return theStore.size(); };
DCIOstore theStore
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintDCIOmanager()

void G4DCIOcatalog::PrintDCIOmanager ( )

Definition at line 127 of file G4DCIOcatalog.cc.

128 {
129  G4cout << "I/O managers: ";
130  G4cout << theStore.size() << G4endl;
131  DCIOstore::const_iterator it;
132  for ( it=theStore.begin(); it != theStore.end(); it++ ) {
133  G4cout << " --- " << (*it).first
134  << ", " << (*it).second << "." << G4endl;
135  }
136 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
DCIOstore theStore
Here is the caller graph for this function:

◆ PrintEntries()

void G4DCIOcatalog::PrintEntries ( )

Definition at line 105 of file G4DCIOcatalog.cc.

106 {
107  G4cout << "I/O manager entries: ";
108  G4cout << theCatalog.size() << G4endl;
109  DCIOmap::const_iterator it;
110  for ( it=theCatalog.begin(); it != theCatalog.end(); it++ ) {
111  G4cout << " --- " << (*it).first << G4endl;
112  }
113 }
DCIOmap theCatalog
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ RegisterDCIOmanager()

void G4DCIOcatalog::RegisterDCIOmanager ( G4VPDigitsCollectionIO d)

Definition at line 65 of file G4DCIOcatalog.cc.

66 {
67  if ( m_verbose > 0 ) {
68  G4cout << "registering I/O manager \"" << d->DMname()
69  << "\" " << d << "." << G4endl;
70  }
71  if ( theStore.find(d->DMname()) != theStore.end() ) {
72  G4cout << "Redefining I/O Manager " << d->DMname() << G4endl;
73  } else {
74  theStore[d->DMname()] = d;
75  }
76 }
Float_t d
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
DCIOstore theStore
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterEntry()

void G4DCIOcatalog::RegisterEntry ( G4VDCIOentry d)

Definition at line 51 of file G4DCIOcatalog.cc.

52 {
53  if ( m_verbose > 0 ) {
54  G4cout << "registering I/O manager entry \"" << d->GetName()
55  << "\" " << d << "." << G4endl;
56  }
57  if ( theCatalog.find(d->GetName()) != theCatalog.end() ) {
58  G4cout << "Redefining I/O Managers list " << d->GetName() << G4endl;
59  } else {
60  theCatalog[d->GetName()] = d;
61  }
62 }
Float_t d
DCIOmap theCatalog
std::string GetName()
Definition: G4VDCIOentry.hh:54
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVerboseLevel()

void G4DCIOcatalog::SetVerboseLevel ( int  v)
inline

Definition at line 60 of file G4DCIOcatalog.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ f_thePointer

G4ThreadLocal G4DCIOcatalog * G4DCIOcatalog::f_thePointer = 0
staticprivate

Definition at line 92 of file G4DCIOcatalog.hh.

◆ m_verbose

int G4DCIOcatalog::m_verbose
private

Definition at line 91 of file G4DCIOcatalog.hh.

◆ theCatalog

DCIOmap G4DCIOcatalog::theCatalog
private

Definition at line 93 of file G4DCIOcatalog.hh.

◆ theStore

DCIOstore G4DCIOcatalog::theStore
private

Definition at line 94 of file G4DCIOcatalog.hh.


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