]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added printMatrials, generateXML commands
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Nov 2000 21:21:48 +0000 (21:21 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 Nov 2000 21:21:48 +0000 (21:21 +0000)
AliGeant4/AliModulesCompositionMessenger.cxx
AliGeant4/AliModulesCompositionMessenger.h

index 5dc5153f9a32d6527df69acc8747d8a5a10506f1..06548342602ca9212169c022ca00b089d3433159 100644 (file)
@@ -87,6 +87,17 @@ AliModulesCompositionMessenger::AliModulesCompositionMessenger(
   fSetWriteGeometryCmd->SetParameterName("writeGeometry", false);
   fSetWriteGeometryCmd->AvailableForStates(PreInit);   
 
+  fPrintMaterialsCmd 
+    = new G4UIcmdWithoutParameter("/aliDet/printMaterials", this);
+  fPrintMaterialsCmd->SetGuidance("Prints all materials.");
+  fPrintMaterialsCmd->AvailableForStates(PreInit, Init, Idle);   
+
+  fGenerateXMLCmd 
+    = new G4UIcmdWithoutParameter("/aliDet/generateXML", this);
+  fGenerateXMLCmd->SetGuidance("Generate geometry XML file.");
+  fGenerateXMLCmd->AvailableForStates(Idle);   
+
+
   // set candidates list
   SetCandidates();
 
@@ -117,6 +128,8 @@ AliModulesCompositionMessenger::~AliModulesCompositionMessenger() {
   delete fSetAllSensitiveCmd;
   delete fSetReadGeometryCmd;
   delete fSetWriteGeometryCmd;
+  delete fPrintMaterialsCmd;
+  delete fGenerateXMLCmd;
 }
 
 // operators
@@ -169,6 +182,12 @@ void AliModulesCompositionMessenger::SetNewValue(G4UIcommand* command, G4String
     fModulesComposition->SetWriteGeometry(
                          fSetWriteGeometryCmd->GetNewBoolValue(newValues));
   }    
+  else if (command == fPrintMaterialsCmd) {
+    fModulesComposition->PrintMaterials();
+  }    
+  else if (command == fGenerateXMLCmd) {
+    fModulesComposition->GenerateXMLGeometry();
+  }    
 }
 
 void AliModulesCompositionMessenger::SetCandidates() 
index 576525a95735dc8ac1de7b82c2056c353c096f40..b001146197cbc7de204bc76af728bc81f7fe8a3c 100644 (file)
@@ -54,6 +54,8 @@ class AliModulesCompositionMessenger: public G4UImessenger
     G4UIcmdWithABool*           fSetAllSensitiveCmd;  //command: setAllSensitive   
     G4UIcmdWithABool*           fSetReadGeometryCmd;  //command: readGeometry   
     G4UIcmdWithABool*           fSetWriteGeometryCmd; //command: writeGeometry    
+    G4UIcmdWithoutParameter*    fPrintMaterialsCmd;   //command: printMatrials     
+    G4UIcmdWithoutParameter*    fGenerateXMLCmd;      //command: generateXML
 };
 
 #endif //ALI_MODULES_COMPOSITION_MESSENGER_H