| 70 | } |
| 71 | |
| 72 | void 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 | |
| 110 | void G4DigiManager::Digitize(const G4String& mName) |
| 111 | { |
no test coverage detected