]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFv3.cxx
Added protections against using the wrong version of FRAME
[u/mrichter/AliRoot.git] / TOF / AliTOFv3.cxx
index d32bfa009957e1cafdf00c5cfc1a023bd5bcbeec..49b26faad59b85ecd35dadc22b07a662bd6db4a9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.11  1999/10/22 08:04:14  fca
+Correct improper use of negative parameters
+
 Revision 1.10  1999/10/16 19:30:06  fca
 Corrected Rotation Matrix and CVS log
 
@@ -479,12 +482,36 @@ void AliTOFv3::Init()
   //
   // Initialise the detector after the geometry has been defined
   //
+  printf("**************************************"
+        "  TOF  "
+        "**************************************\n");
+  printf("\n     Version 3 of TOF initialing, "
+        "symmetric TOF\n\n");
+
   AliTOF::Init();
+
+  //
+  // Check that FRAME is there otherwise we have no place where to
+  // put TOF
+  AliModule* FRAME=gAlice->GetModule("FRAME");
+  if(!FRAME) {
+    Error("Ctor","TOF needs FRAME to be present\n");
+    exit(1);
+  } else 
+    if(FRAME->IsVersion()!=1) {
+      Error("Ctor","FRAME version 1 needed with this version of TOF\n");
+      exit(1);
+    }
+
   fIdFTO2=gMC->VolId("FTO2");
   fIdFTO3=gMC->VolId("FTO3");
   fIdFLT1=gMC->VolId("FLT1");
   fIdFLT2=gMC->VolId("FLT2");
   fIdFLT3=gMC->VolId("FLT3");
+
+  printf("**************************************"
+        "  TOF  "
+        "**************************************\n");
 }
  
 //_____________________________________________________________________________