MCPcopy Create free account
hub / github.com/Geant4/geant4 / AddNewModule

Method AddNewModule

source/readout/src/G4DigiManager.cc:72–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void G4DigiManager::AddNewModule(G4VDigitizerModule* DM)
73{
74 G4String DMname = DM->GetName();
75 for(G4int j=0;j<G4int(DMtable.size());++j)
76 {
77 if(DMtable[j]==DM)
78 {
79 G4cout << "<" << DMname << "> has already been registered." << G4endl;
80 return;
81 }
82 }
83 if( verboseLevel > 0 )
84 {
85 G4cout << "New DigitizerModule <" << DMname
86 << "> is registered." << G4endl;
87 }
88 DMtable.push_back(DM);
89
90 G4int numberOfCollections = DM->GetNumberOfCollections();
91 for(G4int i=0;i<numberOfCollections;++i)
92 {
93 G4String DCname = DM->GetCollectionName(i);
94 if( DCtable->Registor(DMname,DCname) < 0 )
95 {
96 G4cout << "DigiCollection <" << DCname
97 << "> has already been registered with "
98 << DMname << " DigitizerModule." << G4endl;
99 }
100 else if( verboseLevel > 0 )
101 {
102 G4cout << "DigiCollection " << DCname
103 << " is registered. " << G4endl;
104 }
105 }
106
107 runManager->SetDCtable(DCtable);
108}
109
110void G4DigiManager::Digitize(const G4String& mName)
111{

Callers 2

CexmcEventActionMethod · 0.80

Calls 6

GetNameMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
RegistorMethod · 0.45
SetDCtableMethod · 0.45

Tested by

no test coverage detected