]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFv6.cxx
Added protections against using the wrong version of FRAME
[u/mrichter/AliRoot.git] / TOF / AliTOFv6.cxx
index fb06b9e771f0d784b514bb0be21052c1e1ddd45b..0fd4a38047c0164623b9291377f194a1fecf816f 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  1999/10/16 19:21:57  fca
+Corrected Rotation Matrix and CVS logAliTOFv4.cxx
+
 Revision 1.1  1999/10/15 15:35:20  fca
 New version for frame1099 with and without holes
 
@@ -47,6 +50,8 @@ New version for frame1099 with and without holes
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <stdlib.h>
+
 #include "AliTOFv6.h"
 #include "AliRun.h"
 #include "AliConst.h"
@@ -381,12 +386,36 @@ void AliTOFv6::Init()
   //
   // Initialise the detector after the geometry has been defined
   //
+  printf("**************************************"
+        "  TOF  "
+        "**************************************\n");
+  printf("\n     Version 6 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");
 }
  
 //_____________________________________________________________________________