Created
September 14, 2016 20:47
-
-
Save JeremyMcCormick/ea9e5cc1684add04275be84b94d922db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_aux(const G4GDMLAuxListType* auxInfoList, G4String prepend="|") | |
{ | |
for(std::vector<G4GDMLAuxStructType>::const_iterator iaux = auxInfoList->begin(); | |
iaux != auxInfoList->end(); iaux++ ) | |
{ | |
G4String str=iaux->type; | |
G4String val=iaux->value; | |
G4String unit=iaux->unit; | |
G4cout << prepend << str << " : " << val << " " << unit << G4endl; | |
if (iaux->auxList) print_aux(iaux->auxList, prepend + "|"); | |
} | |
return; | |
} | |
void printAuxInfo() { | |
const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance(); | |
std::vector<G4LogicalVolume*>::const_iterator lvciter; | |
for( lvciter = lvs->begin(); lvciter != lvs->end(); lvciter++ ) | |
{ | |
G4GDMLAuxListType auxInfo = parser.GetVolumeAuxiliaryInformation(*lvciter); | |
if (auxInfo.size()>0) | |
G4cout << "Auxiliary Information is found for Logical Volume : " | |
<< (*lvciter)->GetName() << G4endl; | |
print_aux(&auxInfo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment