38 G4int i = dirName.length();
50 size_t nTree = structure.size();
51 for(
size_t iTree=0;iTree<nTree;iTree++)
52 {
delete structure[iTree]; }
53 size_t nDet = detector.size();
54 for(
size_t iDet=0;iDet<nDet;iDet++)
55 {
delete detector[iDet]; }
60 return (
this==&right);
66 G4String remainingPath = treeStructure;
67 remainingPath.
remove(0,pathName.length());
68 if( ! remainingPath.
isNull() )
71 G4String subD = ExtractDirName( remainingPath );
77 structure.push_back( tgtSDS );
91 detector.push_back( aSD );
98 for(
size_t i=0; i<structure.size(); i++ )
100 if( subD == structure[i]->dirName )
return structure[i];
107 for(
size_t i=0; i<detector.size(); i++ )
110 if( aSDName == tgtSD->
GetName() )
return tgtSD;
119 if( i !=
G4int(std::string::npos) ) subD.
remove(i+1);
126 aPath.
remove(0,pathName.length());
127 if( aPath.
first(
'/') !=
G4int(std::string::npos) )
129 G4String subD = ExtractDirName(aPath);
133 G4cout << subD <<
" is not found in " << pathName <<
G4endl;
137 tgtSDS->
Activate(aName,sensitiveFlag);
142 for(
size_t i=0; i<detector.size(); i++)
144 detector[i]->Activate(sensitiveFlag);
146 for(
size_t j=0;j<structure.size(); j++)
148 structure[j]->Activate(
G4String(
"/"),sensitiveFlag);
156 G4cout << aPath <<
" is not found in " << pathName <<
G4endl;
168 aPath.
remove(0,pathName.length());
169 if( aPath.
first(
'/') !=
G4int(std::string::npos) )
171 G4String subD = ExtractDirName(aPath);
176 G4cout << subD <<
" is not found in " << pathName <<
G4endl;
190 G4cout << aPath <<
" is not found in " << pathName <<
G4endl;
200 for( i=0; i<structure.size(); i++ )
202 structure[i]->Initialize(HCE);
205 for( i=0; i<detector.size(); i++ )
207 if(detector[i]->isActive()) detector[i]->
Initialize(HCE);
215 for( i=0; i<structure.size(); i++ )
217 structure[i]->Terminate(HCE);
220 for( i=0; i<detector.size(); i++ )
222 if(detector[i]->isActive()) detector[i]->EndOfEvent(HCE);
229 for(
size_t i=0; i<detector.size(); i++)
234 {
G4cout <<
" *** Active "; }
236 {
G4cout <<
" XXX Inactive "; }
239 for(
size_t j=0; j<structure.size(); j++)
240 { structure[j]->ListTree(); }