00001 #include "MySD.hh"
00002
00003 MySD::MySD(G4String name, MyVGeometryParameter* pointer)
00004 :G4VSensitiveDetector(name), m_GeometryParameter(pointer)
00005 {
00006 fVerboseLevel = 0;
00007 G4String HCName = name.c_str();
00008 char* c = const_cast<char*> (HCName.c_str());
00009 for ( int i = 0; i < HCName.length(); i++ ){
00010 if ( c[i] == '/' ) c[i] = '_';
00011 }
00012 collectionName.insert(c);
00013 m_VolumeName = GetPathName();
00014 char *pFast, *pSlow, *pC;
00015 pC = pFast = pSlow = const_cast<char*> (m_VolumeName.c_str());
00016 while( '\0' != *pFast ){
00017 if ( *pFast == '/' ) pFast++;
00018 else{
00019 *pSlow = *pFast;
00020 pSlow++;
00021 pFast++;
00022 }
00023 }
00024 *pSlow = '\0';
00025 m_VolumeName = pC;
00026 }
00027
00028 MySD::~MySD(){}