]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliModule.cxx
Introducing Riostream.h
[u/mrichter/AliRoot.git] / STEER / AliModule.cxx
index 0aba0a506f3745d78b763220123603aa08605157..03fc5069567fa3fdcaaa0380aa016e3f495ddae2 100644 (file)
 
 /*
 $Log$
+Revision 1.17  2001/08/29 14:28:33  morsch
+Use visibility flags -1 and 3 instead of 0 and 1.
+
+Revision 1.16  2001/05/16 14:57:22  alibrary
+New files for folders and Stack
+
+Revision 1.15  2001/03/20 06:36:28  alibrary
+100 parameters now allowed for geant shapes
+
 Revision 1.14  2001/01/26 19:58:48  hristov
 Major upgrade of AliRoot code
 
@@ -66,6 +75,7 @@ Introduction of the Copyright and cvs Log
 #include "AliRun.h"
 #include "AliMagF.h"
 #include "AliMC.h"
+#include "AliConfig.h"
 
 ClassImp(AliModule)
  
@@ -79,6 +89,8 @@ AliModule::AliModule()
   fNodes      = 0;
   fIdtmed     = 0;
   fIdmate     = 0;
+  fDebug      = 0;
+  fEnable     = 1;
 }
  
 //_____________________________________________________________________________
@@ -118,7 +130,12 @@ AliModule::AliModule(const char* name,const char *title):TNamed(name,title)
   // Prepare to find the tracking media range
   fLoMedium = 65536;
   fHiMedium = 0;
+
+  AliConfig::Instance()->Add(this);    
+    
   SetDebug(gAlice->GetDebug());
+
+  fEnable     = 1;
 }
  
 //_____________________________________________________________________________
@@ -171,7 +188,7 @@ void AliModule::Disable()
   // Loop through geometry to disable all
   // nodes for this Module
   while((node = (TNode*)next())) {
-    node->SetVisibility(0);
+    node->SetVisibility(-1);
   }   
 }
 
@@ -198,7 +215,7 @@ void AliModule::Enable()
   // Loop through geometry to enable all
   // nodes for this Module
   while((node = (TNode*)next())) {
-    node->SetVisibility(1);
+    node->SetVisibility(3);
   }   
 }
 
@@ -525,7 +542,7 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
     }
     if (istop[i] && !flag) {
       strcpy(topvol,volst[i]);
-      printf(" *** GREUCL *** volume %s taken as a top volume\n",topvol);
+      if(fDebug) printf("%s::ReadEuclid: volume %s taken as a top volume\n",ClassName(),topvol);
       flag=1;
     }
   }
@@ -535,7 +552,7 @@ void AliModule::ReadEuclid(const char* filnam, char* topvol)
   fclose (lun);
   //*
   //*     commented out only for the not cernlib version
-  printf(" *** GREUCL *** file: %s is now read in\n",filnam);
+  if(fDebug) printf("%s::ReadEuclid: file: %s is now read in\n",ClassName(),filnam);
   //
   return;
   //*
@@ -573,7 +590,7 @@ void AliModule::ReadEuclidMedia(const char* filnam)
   }
   //
   // *** The input filnam name will be with extension '.euc'
-  printf("The file name is %s\n",filnam); //Debug
+  if(fDebug) printf("%s::ReadEuclid: The file name is %s\n",ClassName(),filnam); //Debug
   filtmp=gSystem->ExpandPathName(filnam);
   lun=fopen(filtmp,"r");
   delete [] filtmp;
@@ -628,7 +645,8 @@ void AliModule::ReadEuclidMedia(const char* filnam)
   fclose (lun);
   //*
   //*     commented out only for the not cernlib version
-  Warning("ReadEuclidMedia","file: %s is now read in\n",filnam);
+  if(fDebug) printf("%s::ReadEuclidMedia: file %s is now read in\n",
+       ClassName(),filnam);
   //*
   return;
   //*