]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - AliGeant4/AliDetConstruction.cxx
Some additional changes related to the previous changes. AliL3Transform
[u/mrichter/AliRoot.git] / AliGeant4 / AliDetConstruction.cxx
index f7f82ef98f502f3791bc117831f9e026b6275ec7..a82484b51071d6ca2cac10f7039865c86f82e5a6 100644 (file)
@@ -28,11 +28,11 @@ AliDetConstruction::AliDetConstruction()
   // moduleName nofVersions defaultVersion [type]
         // det switch objects are deleted in fDetSwitchVector destructor
 
+  fDetSwitchVector.Add(new AliDetSwitch("MAG",    1, 0, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("ABSO",   1, 0, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("DIPO",   3, 2, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("FRAME",  3, 2, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("HALL",   1, 0, kStructure));
-  fDetSwitchVector.Add(new AliDetSwitch("MAG",    1, 0, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("PIPE",   5, 0, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("SHIL",   2, 1, kStructure));
   fDetSwitchVector.Add(new AliDetSwitch("CASTOR", 2, 1));
@@ -48,6 +48,9 @@ AliDetConstruction::AliDetConstruction()
   fDetSwitchVector.Add(new AliDetSwitch("TRD",    2, 1));
   fDetSwitchVector.Add(new AliDetSwitch("ZDC",    3, 2));
 
+  // update messenger
+  fDetSwitchVector.UpdateMessenger();
+
   // instantiate LVtree browser
   AliLVTree::Instance();
 }
@@ -118,10 +121,12 @@ void AliDetConstruction::BuildDetectors()
       fDetSwitchVector.SwitchDetOn(modName, modVersion);
  
     // all modules will be processed alltogether
-    AddModule(modName, modVersion);
+    AddModule(modName, modVersion, fDetSwitchVector.GetDetSwitch(modName)->GetType());
 
-    G4cout << "Created module construction for " 
-           << modName << "v" << modVersion << "." << G4endl;   
+    if (VerboseLevel() > 0) {
+      G4cout << "Created module construction for " 
+             << modName << "v" << modVersion << "." << G4endl;   
+    }       
   }
   
   // do not process Config.C 
@@ -262,8 +267,9 @@ void AliDetConstruction::GenerateXMLGeometry() const
                       topName, world->GetLogicalVolume());
   xml.CloseFile();
   
-  // set verbose
-  G4cout << "File " << detName << "v" << version << ".xml has been generated." 
-         << G4endl;
+  if (VerboseLevel() > 0) {
+    G4cout << "File " << detName << "v" << version << ".xml has been generated." 
+           << G4endl;
+  }       
 }