58 return (
this==&right);
64 G4String remainingPath = treeStructure;
66 if( ! remainingPath.
isNull() )
71 if( tgtSDS ==
nullptr )
84 else if( tgtSD != aSD )
88 ed << aSD->
GetName() <<
" had already been stored in "
89 <<
pathName <<
". Object pointer is overwitten.\n";
90 ed <<
"It's users' responsibility to delete the old sensitive detector object.";
102 {
if( subD == st->dirName )
return st; }
109 {
if(aSDName == det->GetName())
return det; }
123 if( i !=
G4int(std::string::npos) ) subD.
remove(i+1);
131 if( aPath.
first(
'/') !=
G4int(std::string::npos) )
135 if( tgtSDS ==
nullptr )
141 tgtSDS->
Activate(aName,sensitiveFlag);
146 for(
auto det :
detector) det->Activate(sensitiveFlag);
152 if( tgtSD ==
nullptr )
167 if( aPath.
first(
'/') !=
G4int(std::string::npos) )
171 if( tgtSDS ==
nullptr )
185 if( tgtSD ==
nullptr )
198 { st->Initialize(HCE); }
201 {
if(dt->isActive()) dt->Initialize(HCE); }
208 { st->Terminate(HCE); }
211 {
if(dt->isActive()) dt->EndOfEvent(HCE); }
221 {
G4cout <<
" *** Active "; }
223 {
G4cout <<
" XXX Inactive "; }
void AddNewDetector(G4VSensitiveDetector *aSD, G4String treeStructure)
void Activate(G4bool activeFlag)
std::ostringstream G4ExceptionDescription
G4String & remove(str_size)
void RemoveSD(G4VSensitiveDetector *)
void Initialize(G4HCofThisEvent *HCE)
std::vector< G4VSensitiveDetector * > detector
void Activate(G4String aName, G4bool sensitiveFlag)
G4String & prepend(const char *)
G4GLOB_DLL std::ostream G4cout
void Terminate(G4HCofThisEvent *HCE)
G4int operator==(const G4SDStructure &right) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4SDStructure * FindSubDirectory(G4String subD)
G4VSensitiveDetector * GetSD(G4String aName)
G4SDStructure(G4String aPath)
G4String ExtractDirName(G4String aPath)
std::vector< G4SDStructure * > structure
G4VSensitiveDetector * FindSensitiveDetector(G4String aName, G4bool warning=true)