51 for(
size_t iTree=0;iTree<nTree;iTree++)
54 for(
size_t iDet=0;iDet<nDet;iDet++)
60 return (
this==&right);
66 G4String remainingPath = treeStructure;
68 if( ! remainingPath.
isNull() )
86 else if( tgtSD != aSD )
90 ed << aSD->
GetName() <<
" had already been stored in "
91 <<
pathName <<
". Object pointer is overwitten.\n";
92 ed <<
"It's users' responsibility to delete the old sensitive detector object.";
103 for(
size_t i=0; i<
structure.size(); i++ )
112 for(
size_t i=0; i<
detector.size(); i++ )
115 if( aSDName == tgtSD->
GetName() )
return tgtSD;
122 std::vector<G4VSensitiveDetector*>::iterator itr =
detector.begin();
136 if( i !=
G4int(std::string::npos) ) subD.
remove(i+1);
144 if( aPath.
first(
'/') !=
G4int(std::string::npos) )
154 tgtSDS->
Activate(aName,sensitiveFlag);
159 for(
size_t i=0; i<
detector.size(); i++)
161 detector[i]->Activate(sensitiveFlag);
186 if( aPath.
first(
'/') !=
G4int(std::string::npos) )
246 for(
size_t i=0; i<
detector.size(); i++)
251 {
G4cout <<
" *** Active "; }
253 {
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)