41 if (fSDManager ==
nullptr) {
63 theMessenger =
nullptr;
73 if (pathName[0] !=
'/') pathName.insert(0,
"/");
74 if (pathName.back() !=
'/') pathName +=
"/";
76 if (numberOfCollections < 1)
return;
77 for (
G4int i = 0; i < numberOfCollections; i++) {
82 if (verboseLevel > 0) {
83 G4cout <<
"New sensitive detector <" << aSD->
GetName() <<
"> is registered at " << pathName
91 if (verboseLevel > 0) {
94 G4cout <<
"G4SDManager::AddNewCollection : the collection <" << SDname <<
"/" << DCname
95 <<
"> has already been reginstered." <<
G4endl;
98 G4cout <<
"G4SDManager::AddNewCollection : the collection <" << SDname <<
"/" << DCname
99 <<
"> is registered at " << i <<
G4endl;
116 if (pathName[0] !=
'/') pathName.insert(0,
"/");
117 treeTop->
Activate(pathName, activeFlag);
123 if (pathName[0] !=
'/') pathName.insert(0,
"/");
131 G4cout <<
"<" << colName <<
"> is not found." <<
G4endl;
134 G4cout <<
"<" << colName <<
"> is ambiguous." <<
G4endl;
151 for (
auto f = FilterList.begin(); f != FilterList.end(); f++) {
159void G4SDManager::DestroyFilters()
161 auto f = FilterList.begin();
162 while (f != FilterList.end()) {
163 if (verboseLevel > 0)
G4cout <<
"### deleting " << (*f)->GetName() <<
" " << (*f) <<
G4endl;
165 f = FilterList.begin();
G4GLOB_DLL std::ostream G4cout
G4int Registor(G4String SDname, G4String HCname)
G4int GetCollectionID(G4String HCname) const
void RegisterSDFilter(G4VSDFilter *filter)
static G4SDManager * GetSDMpointer()
void TerminateCurrentEvent(G4HCofThisEvent *HCE)
G4HCofThisEvent * PrepareNewEvent()
void Activate(G4String dName, G4bool activeFlag)
void AddNewDetector(G4VSensitiveDetector *aSD)
void DeRegisterSDFilter(G4VSDFilter *filter)
G4int GetCollectionID(G4String colName)
G4VSensitiveDetector * FindSensitiveDetector(G4String dName, G4bool warning=true)
static G4SDManager * GetSDMpointerIfExist()
void AddNewCollection(G4String SDname, G4String DCname)
void Initialize(G4HCofThisEvent *HCE)
void Activate(const G4String &aName, G4bool sensitiveFlag)
void Terminate(G4HCofThisEvent *HCE)
G4VSensitiveDetector * FindSensitiveDetector(const G4String &aName, G4bool warning=true)
void AddNewDetector(G4VSensitiveDetector *aSD, const G4String &treeStructure)
const G4String & GetSDname() const
const G4String & GetName() const
G4int GetNumberOfCollections() const
G4String GetCollectionName(G4int id) const
G4String GetPathName() const