technial fix to suppress the warning
[u/mrichter/AliRoot.git] / ITS / AliITSInitGeometry.cxx
index ab64f19..effa21f 100644 (file)
@@ -53,21 +53,10 @@ $Id$
 
 ClassImp(AliITSInitGeometry)
 
-const Bool_t AliITSInitGeometry::fgkOldSPDbarrel = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSDDbarrel = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSSDbarrel = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSDDcone   = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSSDcone   = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSPDshield = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSDDshield = kTRUE;
-const Bool_t AliITSInitGeometry::fgkOldSSDshield = kTRUE;
-const Bool_t AliITSInitGeometry::fgkOldServices  = kFALSE;
-const Bool_t AliITSInitGeometry::fgkOldSupports  = kFALSE;
 //______________________________________________________________________
 AliITSInitGeometry::AliITSInitGeometry():
 TObject(),                   // Base Class
 fName(0),                    // Geometry name
-fMinorVersion(-1),           // Minor version number/type
 fMajorVersion(kvDefault),    // Major versin number
 fTiming(kFALSE),             // Flag to start inilization timing
 fSegGeom(kFALSE),            // Flag to switch between the old use of
@@ -86,12 +75,10 @@ fDebug(0){                   // Debug flag
     fName = "Undefined";
 }
 //______________________________________________________________________
-AliITSInitGeometry::AliITSInitGeometry(AliITSVersion_t version,
-                                       Int_t minorversion):
+AliITSInitGeometry::AliITSInitGeometry(AliITSVersion_t version):
 TObject(),                   // Base Class
 fName(0),                    // Geometry name
-fMinorVersion(minorversion), // Minor version number/type
-fMajorVersion(version),      // Major versin number
+fMajorVersion(version),      // Major version number
 fTiming(kFALSE),             // Flag to start inilization timing
 fSegGeom(kFALSE),            // Flag to switch between the old use of
                              // AliITSgeomS?D class, or AliITSsegmentation
@@ -106,14 +93,16 @@ fDebug(0){                   // Debug flag
     // Return:
     //   A default inilized AliITSInitGeometry object
 
-    if(version == kv11Hybrid){
-        fName="AliITSv11Hybrid";
-    }else {
-        AliFatal(Form("Undefined geometry: fMajorVersion=%d, "
-                      "fMinorVersion= %d",(Int_t)fMajorVersion,fMinorVersion));
+  switch (version) {
+    case kv11:
+        fName="AliITSv11";
+       break;
+    case kvDefault:
+    default:
+        AliFatal(Form("Undefined geometry: fMajorVersion=%d, ",(Int_t)fMajorVersion));
         fName = "Undefined";
-    } // end if
-    return;
+       break;
+    } // switch
 }
 //______________________________________________________________________
 AliITSgeom* AliITSInitGeometry::CreateAliITSgeom(){
@@ -131,33 +120,31 @@ AliITSgeom* AliITSInitGeometry::CreateAliITSgeom(){
 
 
   AliITSVersion_t version = kvDefault;
-  Int_t minor = 0;
   TDatime datetime;
   TGeoVolume *itsV = gGeoManager->GetVolume("ITSV");
   if(!itsV){
-    Error("CreateAliITSgeom","Can't find ITS volume ITSV, aborting");
+    AliError("Can't find ITS volume ITSV, exiting - nothing done!");
     return 0;
   }// end if
   const Char_t *title = itsV->GetTitle();
-  if(!ReadVersionString(title,(Int_t)strlen(title),version,minor,
-                       datetime))
+  if(!ReadVersionString(title,version))
     Warning("UpdateInternalGeometry","Can't read title=%s\n",title);
   SetTiming(kFALSE);
   SetSegGeom(kFALSE);
   SetDecoding(kFALSE);
-  AliITSgeom *geom = CreateAliITSgeom(version,minor);
+  AliITSgeom *geom = CreateAliITSgeom(version);
   AliDebug(1,"AliITSgeom object has been initialized from TGeo\n");
   return geom;
 }
 //______________________________________________________________________
-AliITSgeom* AliITSInitGeometry::CreateAliITSgeom(Int_t major,Int_t minor){
+AliITSgeom* AliITSInitGeometry::CreateAliITSgeom(Int_t major){
     // Creates and Initilizes the geometry transformation class AliITSgeom
     // to values appropreate to this specific geometry. Now that
     // the segmentation is part of AliITSgeom, the detector
     // segmentations are also defined here.
     // Inputs:
     //   Int_t major   major version, see AliITSVersion_t
-    //   Int_t minor   minor version
+    //   
     // Outputs:
     //   none.
     // Return:
@@ -167,16 +154,12 @@ AliITSgeom* AliITSInitGeometry::CreateAliITSgeom(Int_t major,Int_t minor){
     switch(major){
     case kv11:
         SetGeometryName("AliITSv11");
-        SetVersion(kv11,minor);
-        break;
-    case kv11Hybrid:
-        SetGeometryName("AliITSv11Hybrid");
-        SetVersion(kv11Hybrid,minor);
+        SetVersion(kv11);
         break;
     case kvDefault:
     default:
         SetGeometryName("Undefined");
-        SetVersion(kvDefault,minor);
+        SetVersion(kvDefault);
         break;
     } // end switch
     AliITSgeom *geom = new AliITSgeom();
@@ -206,9 +189,6 @@ Bool_t AliITSInitGeometry::InitAliITSgeom(AliITSgeom *geom){
         return kFALSE;
     } // end if
     switch(fMajorVersion) {
-    case kv11Hybrid: { 
-        return InitAliITSgeomV11Hybrid(geom);
-    } break; // end case
     case kv11: {
         return InitAliITSgeomV11(geom);
     } break; // end case
@@ -247,17 +227,16 @@ void AliITSInitGeometry::TransposeTGeoHMatrix(TGeoHMatrix *m)const{
 
 
 //______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomV11Hybrid(AliITSgeom *geom){
-    // Initilizes the geometry transformation class AliITSgeom
-    // to values appropreate to this specific geometry. Now that
-    // the segmentation is part of AliITSgeom, the detector
-    // segmentations are also defined here.
-    // Inputs:
-    //   AliITSgeom *geom  A pointer to the AliITSgeom class
-    // Outputs:
-    //   AliITSgeom *geom  This pointer recreated and properly inilized.
-    // Return:
-    //   none.
+Bool_t AliITSInitGeometry::InitAliITSgeomV11(AliITSgeom *geom){
+  // Initilizes the geometry transformation class AliITSgeom
+  // Now that the segmentation is part of AliITSgeom, the detector
+  // segmentations are also defined here.
+  //
+  // Inputs:
+  //   AliITSgeom *geom  A pointer to the AliITSgeom class
+  // Outputs:
+  //   AliITSgeom *geom  This pointer recreated and properly inilized.
+  // LG
 
   const Int_t kItype  = 0; // Type of transformation defined 0=> Geant
   const Int_t klayers = 6; // number of layers in the ITS
@@ -267,31 +246,16 @@ Bool_t AliITSInitGeometry::InitAliITSgeomV11Hybrid(AliITSgeom *geom){
   const TString kPathbase = "/ALIC_1/ITSV_1/";
 
   const char *pathSPDsens1, *pathSPDsens2;
-  if (SPDIsTGeoNative()) {
-    pathSPDsens1="%sITSSPD_1/ITSSPDCarbonFiberSectorV_%d/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay1-Stave_%d/ITSSPDhalf-Stave%d_1/ITSSPDlay1-Ladder_%d/ITSSPDlay1-sensor_1";
-    pathSPDsens2="%sITSSPD_1/ITSSPDCarbonFiberSectorV_%d/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay2-Stave_%d/ITSSPDhalf-Stave%d_1/ITSSPDlay2-Ladder_%d/ITSSPDlay2-sensor_1";
-  } else{
-    pathSPDsens1 = "%sITSD_1/IT12_1/I12B_%d/I10B_%d/L1H-STAVE%d_1/I107_%d/I101_1/ITS1_1";
-    pathSPDsens2 = "%sITSD_1/IT12_1/I12B_%d/I20B_%d/L2H-STAVE%d_1/I1D7_%d/I1D1_1/ITS2_1";
-  }
+  pathSPDsens1="%sITSSPD_1/ITSSPDCarbonFiberSectorV_%d/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay1-Stave_%d/ITSSPDhalf-Stave%d_1/ITSSPDlay1-Ladder_%d/ITSSPDlay1-sensor_1";
+  pathSPDsens2="%sITSSPD_1/ITSSPDCarbonFiberSectorV_%d/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay2-Stave_%d/ITSSPDhalf-Stave%d_1/ITSSPDlay2-Ladder_%d/ITSSPDlay2-sensor_1";
 
   const char *pathSDDsens1, *pathSDDsens2;
-  if (SDDIsTGeoNative()) {
-    pathSDDsens1 = "%sITSsddLayer3_1/ITSsddLadd_%d/ITSsddSensor3_%d/ITSsddWafer3_%d/ITSsddSensitivL3_1";
-    pathSDDsens2 = "%sITSsddLayer4_1/ITSsddLadd_%d/ITSsddSensor4_%d/ITSsddWafer4_%d/ITSsddSensitivL4_1";
-  } else{
-    pathSDDsens1 = "%sITSD_1/IT34_1/I004_%d/I302_%d/ITS3_%d";
-    pathSDDsens2 = "%sITSD_1/IT34_1/I005_%d/I402_%d/ITS4_%d";
-  }
+  pathSDDsens1 = "%sITSsddLayer3_1/ITSsddLadd_%d/ITSsddSensor3_%d/ITSsddWafer3_%d/ITSsddSensitivL3_1";
+  pathSDDsens2 = "%sITSsddLayer4_1/ITSsddLadd_%d/ITSsddSensor4_%d/ITSsddWafer4_%d/ITSsddSensitivL4_1";
 
   const char *pathSSDsens1, *pathSSDsens2;
-  if (SSDIsTGeoNative()) {
-    pathSSDsens1 = "%sITSssdLayer5_1/ITSssdLay5Ladd_%d/ITSssdSensor5_%d/ITSssdSensitivL5_1";
-    pathSSDsens2 = "%sITSssdLayer6_1/ITSssdLay6Ladd_%d/ITSssdSensor6_%d/ITSssdSensitivL6_1";
-  } else{
-    pathSSDsens1 = "%sITSD_1/IT56_1/I565_%d/I562_%d/ITS5_%d";
-    pathSSDsens2 = "%sITSD_1/IT56_1/I569_%d/I566_%d/ITS6_%d";
-  }
+  pathSSDsens1 = "%sITSssdLayer5_1/ITSssdLay5Ladd_%d/ITSssdSensor5_%d/ITSssdSensitivL5_1";
+  pathSSDsens2 = "%sITSssdLayer6_1/ITSssdLay6Ladd_%d/ITSssdSensor6_%d/ITSssdSensitivL6_1";
 
   const TString kNames[klayers] = {
     pathSPDsens1, // lay=1
@@ -318,26 +282,7 @@ Bool_t AliITSInitGeometry::InitAliITSgeomV11Hybrid(AliITSgeom *geom){
 
     DecodeDetectorLayers(mod,lay,lad,det);
     geom->CreateMatrix(mod,lay,lad,det,kIdet[lay-1],tran,rot);
-    RecodeDetectorv11Hybrid(mod,cpn0,cpn1,cpn2);
-
-//     if (SPDIsTGeoNative())
-//       if (kIdet[lay-1]==kSPD) {
-//     cpn0 = lad-1;
-//     cpn1 = det-1;
-//     cpn2 = 1;
-//       }
-//     if (SDDIsTGeoNative())
-//       if (kIdet[lay-1]==kSDD) {
-//     cpn0 = lad-1;
-//     cpn1 = det-1;
-//     cpn2 = 1;
-//       }
-//     if (SSDIsTGeoNative())
-//       if (kIdet[lay-1]==kSSD) {
-//     cpn0 = lad-1;
-//     cpn1 = det-1;
-//     cpn2 = 1;
-//       }
+    RecodeDetector(mod,cpn0,cpn1,cpn2);
 
     if (kIdet[lay-1]==kSPD) { // we need 1 more copy number because of the half-stave
       if (det<3) cpnHS = 0; else cpnHS = 1;
@@ -367,77 +312,6 @@ Bool_t AliITSInitGeometry::InitAliITSgeomV11Hybrid(AliITSgeom *geom){
   } // end if
   return kTRUE;
 }
-//______________________________________________________________________
-Bool_t AliITSInitGeometry::InitAliITSgeomV11(AliITSgeom *geom){
-  // Initilizes the geometry transformation class AliITSgeom
-  // Now that the segmentation is part of AliITSgeom, the detector
-  // segmentations are also defined here.
-  //
-  // Inputs:
-  //   AliITSgeom *geom  A pointer to the AliITSgeom class
-  // Outputs:
-  //   AliITSgeom *geom  This pointer recreated and properly inilized.
-  // LG
-
-
-  const Int_t kItype=0; // Type of transormation defined 0=> Geant
-  const Int_t klayers = 6; // number of layers in the ITS
-  const Int_t kladders[klayers]   = {20,40,14,22,34,38}; // Number of ladders
-  const Int_t kdetectors[klayers] = {4,4,6,8,22,25};// number of detector/lad
-  const AliITSDetector kIdet[6]   = {kSPD,kSPD,kSDD,kSDD,kSSD,kSSD};
-
-  const TString kPathbase = "/ALIC_1/ITSV_1/";
-  const TString kNames[klayers] =
-    {"AliITSInitGeometry:spd missing", // lay=1
-     "AliITSInitGeometry:spd missing", // lay=2
-     "%sITSsddLayer3_1/ITSsddLadd_%d/ITSsddSensor_%d/ITSsddWafer_1/ITSsddSensitiv_1", // lay=3
-     "%sITSsddLayer4_1/ITSsddLadd_%d/ITSsddSensor_%d/ITSsddWafer_1/ITSsddSensitiv_1", // lay=4
-     "AliITSInitGeometry:ssd missing", // lay=5
-     "AliITSInitGeometry:ssd missing"};// lay=6
-  Int_t mod,nmods=0,lay,lad,det,cpn0,cpn1,cpn2;
-  Double_t tran[3]={0.0,0.0,0.0},rot[10]={9*0.0,1.0};
-  TArrayD shapePar;
-  TString path,shapeName;
-  TGeoHMatrix matrix;
-  Bool_t initSeg[3]={kFALSE,kFALSE,kFALSE};
-  TStopwatch *time = 0x0;if(fTiming) time=new TStopwatch();
-  
-  if(fTiming) time->Start();
-  for(mod=0;mod<klayers;mod++) nmods += kladders[mod]*kdetectors[mod];
-  
-  geom->Init(kItype,klayers,kladders,kdetectors,nmods);
-  for(mod=0;mod<nmods;mod++) {
-    
-    DecodeDetectorLayers(mod,lay,lad,det); // Write
-    geom->CreateMatrix(mod,lay,lad,det,kIdet[lay-1],tran,rot);
-    RecodeDetector(mod,cpn0,cpn1,cpn2); // Write reusing lay,lad,det.
-    path.Form(kNames[lay-1].Data(),
-             kPathbase.Data(),cpn0,cpn1,cpn2);
-    geom->GetGeomMatrix(mod)->SetPath(path);
-    if (GetTransformation(path.Data(),matrix)) {
-      geom->SetTrans(mod,matrix.GetTranslation());
-      TransposeTGeoHMatrix(&matrix); //Transpose TGeo's rotation matrixes
-      geom->SetRotMatrix(mod,matrix.GetRotationMatrix());
-    }
-    
-    if(initSeg[kIdet[lay-1]]) continue;
-    GetShape(path,shapeName,shapePar);
-    if(shapeName.CompareTo("BOX")){
-      Error("InitAliITSgeomV11","Geometry changed without proper code update"
-           "or error in reading geometry. Shape is not BOX.");
-      return kFALSE;
-    } // end if
-    
-  } // end for module
-  
-  if(fTiming){
-    time->Stop();
-    time->Print();
-    delete time;
-  } // end if
-  return kTRUE;
-}
 
 //_______________________________________________________________________
 Bool_t AliITSInitGeometry::GetTransformation(const TString &volumePath,
@@ -760,9 +634,6 @@ void AliITSInitGeometry::DecodeDetector(
     case kv11:{
         return DecodeDetectorv11(mod,layer,cpn0,cpn1,cpn2);
     }break;
-    case kv11Hybrid:{
-        return DecodeDetectorv11Hybrid(mod,layer,cpn0,cpn1,cpn2);
-    }break;
     default:{
         Error("DecodeDetector","Major version = %d, not supported",
               (Int_t)fMajorVersion);
@@ -797,9 +668,6 @@ void AliITSInitGeometry::RecodeDetector(Int_t mod,Int_t &cpn0,
     case kv11:{
         return RecodeDetectorv11(mod,cpn0,cpn1,cpn2);
     }break;
-    case kv11Hybrid:{
-        return RecodeDetectorv11Hybrid(mod,cpn0,cpn1,cpn2);
-    }break;
     default:{
         Error("RecodeDetector","Major version = %d, not supported",
               (Int_t)fMajorVersion);
@@ -838,9 +706,6 @@ void AliITSInitGeometry::DecodeDetectorLayers(Int_t mod,Int_t &layer,
     case kv11:{
         return DecodeDetectorLayersv11(mod,layer,lad,det);
     }break;
-    case kv11Hybrid:{
-        return DecodeDetectorLayersv11Hybrid(mod,layer,lad,det);
-    }break;
     default:{
         Error("DecodeDetectorLayers","Major version = %d, not supported",
               (Int_t)fMajorVersion);
@@ -850,9 +715,8 @@ void AliITSInitGeometry::DecodeDetectorLayers(Int_t mod,Int_t &layer,
     return;
 }
 
-
 //______________________________________________________________________
-void AliITSInitGeometry::DecodeDetectorv11Hybrid(Int_t &mod,Int_t layer,
+void AliITSInitGeometry::DecodeDetectorv11(Int_t &mod,Int_t layer,
                                  Int_t cpn0,Int_t cpn1,Int_t cpn2) const {
     // decode geometry into detector module number
     // Inputs:
@@ -872,31 +736,16 @@ void AliITSInitGeometry::DecodeDetectorv11Hybrid(Int_t &mod,Int_t layer,
   
   switch(layer) {
   case 1: case 2:{
-    if (SPDIsTGeoNative()) {
-      lad = cpn1+kDetPerLadderSPD[layer-1]*(cpn0-1);
-      det = cpn2;
-    } else {
-      lad = cpn1+kDetPerLadderSPD[layer-1]*(cpn0-1);
-      det = cpn2;
-    }
+    lad = cpn1+kDetPerLadderSPD[layer-1]*(cpn0-1);
+    det = cpn2;
   } break;
   case 3: case 4:{
-    if (SDDIsTGeoNative()) {
-      lad = cpn0+1;
-      det = cpn1+1;
-    } else {
-      lad = cpn0;
-      det = cpn1;
-    }
+    lad = cpn0+1;
+    det = cpn1+1;
   } break;
   case 5: case 6:{
-    if (SSDIsTGeoNative()) {
-      lad = cpn0+1;
-      det = cpn1+1;
-    } else {
-      lad = cpn0;
-      det = cpn1;
-    }
+    lad = cpn0+1;
+    det = cpn1+1;
   } break;
   default:{
   } break;
@@ -908,13 +757,11 @@ void AliITSInitGeometry::DecodeDetectorv11Hybrid(Int_t &mod,Int_t layer,
 }
 
 
-
 //______________________________________________________________________
-void AliITSInitGeometry::RecodeDetectorv11Hybrid(Int_t mod,Int_t &cpn0,
-                                        Int_t &cpn1,Int_t &cpn2) {
-    // decode geometry into detector module number. There are two decoding
-    // Scheams. Old which does not follow the ALICE coordinate system
-    // requirements, and New which does.
+void AliITSInitGeometry::RecodeDetectorv11(Int_t mod,Int_t &cpn0,
+                                          Int_t &cpn1,Int_t &cpn2) {
+    // decode geometry into detector module number using the new decoding
+    // Scheme.
     // Inputs:
     //    Int_t mod      The module number assoicated with this set
     //                   of copy numbers.
@@ -927,41 +774,32 @@ void AliITSInitGeometry::RecodeDetectorv11Hybrid(Int_t mod,Int_t &cpn0,
     const Int_t kDetPerLadderSPD[2]={2,4};
     Int_t lay,lad,det;
 
-    DecodeDetectorLayersv11Hybrid(mod,lay,lad,det);
+    DecodeDetectorLayersv11(mod,lay,lad,det);
     if (lay<3) { // SPD
         cpn2 = det;     // Detector 1-4
         cpn0 = (lad+kDetPerLadderSPD[lay-1]-1)/kDetPerLadderSPD[lay-1];
         cpn1 = (lad+kDetPerLadderSPD[lay-1]-1)%kDetPerLadderSPD[lay-1] + 1;
-        //if (SPDIsTGeoNative()) {
-        //    cpn2--;
-        //    cpn1--;
-        //}
     } else { // SDD and SSD
         cpn2 = 1;
         cpn1 = det;
         cpn0 = lad;
         if (lay<5) { // SDD
-            if (SDDIsTGeoNative()) {
-                cpn1--;
-                cpn0--;
-            } // end if SDDIsTGeoNative()
+         cpn1--;
+         cpn0--;
         } else { //SSD
-            if (SSDIsTGeoNative()) {
-                cpn1--;
-                cpn0--;
-            }// end if SSDIsTGeoNative()
+         cpn1--;
+         cpn0--;
         } // end if Lay<5/else
     } // end if lay<3/else
-    /*printf("AliITSInitGeometry::RecodeDetectorv11Hybrid:"
-           "mod=%d lay=%d lad=%d det=%d cpn0=%d cpn1=%d cpn2=%d\n",
-           mod,lay,lad,det,cpn0,cpn1,cpn2);*/
+
 }
 
+
 //______________________________________________________________________
-void AliITSInitGeometry::DecodeDetectorLayersv11Hybrid(Int_t mod,Int_t &lay,
-                                              Int_t &lad,Int_t &det) {
+void AliITSInitGeometry::DecodeDetectorLayersv11(Int_t mod,Int_t &lay,
+                                                Int_t &lad,Int_t &det) {
 
-  // decode module number into detector indices for v11Hybrid
+  // decode module number into detector indices for v11
   // mod starts from 0
   // lay, lad, det start from 1
 
@@ -997,134 +835,47 @@ void AliITSInitGeometry::DecodeDetectorLayersv11Hybrid(Int_t mod,Int_t &lay,
 }
 
 //______________________________________________________________________
-Bool_t AliITSInitGeometry::WriteVersionString(Char_t *str,Int_t length,
-                        AliITSVersion_t maj,Int_t min,
-                        const Char_t *cvsDate,const Char_t *cvsRevision)const{
-    // fills the string str with the major and minor version number
+Bool_t AliITSInitGeometry::WriteVersionString(Char_t *str,Int_t length,AliITSVersion_t maj)const{
+    // fills the string str with the major version number
     // Inputs:
-    //   Char_t *str          The character string to hold the major 
-    //                        and minor version numbers in
+    //   Char_t *str          The character string to hold the major version number
     //   Int_t  length        The maximum number of characters which 
-    //                        can be accomidated by this string. 
-    //                        str[length-1] must exist and will be set to zero
+    //                        can be accommodated by this string. 
+    //                        str[length-1] must exist
     //   AliITSVersion_t maj  The major number
-    //   Int_t           min  The minor number
-    //   Char_t *cvsDate      The date string from cvs
-    //   Char_t *cvsRevision  The Revision string from cvs
-    // Outputs:
-    //   Char_t *str          The character string holding the major and minor
-    //                        version numbers. str[length-1] must exist
-    //                        and will be set to zero
-    // Return:
-    //   kTRUE if no errors
-    Char_t cvslikedate[30];
-    Int_t i,n,cvsDateLength,cvsRevisionLength;
 
-    cvsDateLength = (Int_t)strlen(cvsDate);
-    if(cvsDateLength>30){ // svn string, make a cvs like string
-        i=0;n=0;
-        do{
-            cvslikedate[i] = cvsDate[i];
-            if(cvsDate[i]=='+' || cvsDate[i++]=='-'){
-                n++; // count number of -
-                cvslikedate[i-1] = '/'; // replace -'s by /'s.
-            } // end if
-        } while(n<3&&i<30); // once additonal - of time zone reach exit
-        cvslikedate[i-1] = '$'; // put $ at end then zero.
-        for(;i<30;i++) cvslikedate[i]=0;// i starts wher do loop left off.
-    }else{
-        for(i=0;i<cvsDateLength&&i<30;i++) cvslikedate[i]=cvsDate[i];
-    }// end if
-    cvsDateLength = (Int_t)strlen(cvslikedate);
-    cvsRevisionLength = (Int_t)strlen(cvsRevision);
-    i = (Int_t)maj;
-    n = 50+(Int_t)(TMath::Log10(TMath::Abs((Double_t)i)))+1+
-        (Int_t)(TMath::Log10(TMath::Abs((Double_t)min)))+1
-        +cvsDateLength-6+cvsRevisionLength-10;
-    if(GetDebug()>1) printf("AliITSInitGeometry::WriteVersionString:"
-                        "length=%d major=%d minor=%d cvsDate=%s[%d] "
-                        "cvsRevision=%s[%d] n=%d\n",length,i,min,cvslikedate,
-                        cvsDateLength,cvsRevision,cvsRevisionLength,n);
-    if(i<0) n++;
-    if(min<0) n++;
-    if(length<n){// not enough space to write in output string.
-        Warning("WriteVersionString","Output string not long enough "
-                "lenght=%d must be at least %d long\n",length,n);
-        return kFALSE;
-    } // end if length<n
-    char *cvsrevision = new char[cvsRevisionLength-10];
-    char *cvsdate = new char[cvsDateLength-6];
-    for(i=0;i<cvsRevisionLength-10;i++)
-        if(10+i<cvsRevisionLength-1)
-            cvsrevision[i] = cvsRevision[10+i]; else cvsrevision[i] = 0;
-    for(i=0;i<cvsDateLength-6;i++) if(6+i<cvsDateLength-1)
-        cvsdate[i] = cvslikedate[6+i]; else cvsdate[i] = 0;
-    for(i=0;i<length;i++) str[i] = 0; // zero it out for now.
-    i = (Int_t)maj;
-    sprintf(str,"Major Version= %d Minor Version= %d Revision: %s Date: %s",
-            i,min,cvsrevision,cvsdate);
-    /* this gives compilation warnings on some compilers: descriptor zu
-    if(GetDebug()>1)printf("AliITSInitGeometry::WriteVersionString: "
-                       "n=%d str=%s revision[%zu] date[%zu]\n",
-                       n,str,strlen(cvsrevision),strlen(cvsdate));
-    */
-    delete[] cvsrevision;
-    delete[] cvsdate;
+
+    Int_t i = (Int_t)maj;
+    snprintf(str,length-1,"Major Version= %d",i);
     return kTRUE;
 }
 //______________________________________________________________________
-Bool_t AliITSInitGeometry::ReadVersionString(const Char_t *str,Int_t length,
-                                             AliITSVersion_t &maj,Int_t &min,
-                                             TDatime &dt)const{
+Bool_t AliITSInitGeometry::ReadVersionString(const Char_t *str,AliITSVersion_t &maj)const{
     // fills the string str with the major and minor version number
     // Inputs:
-    //   Char_t *str   The character string to holding the major and minor
-    //                 version numbers in
+    //   Char_t *str   The character string to holding the major version number
     //   Int_t  length The maximum number of characters which can be
-    //                 accomidated by this string. str[length-1] must exist
+    //                 accommodated by this string. str[length-1] must exist
     // Outputs:
-    //   Char_t *str   The character string holding the major and minor
-    //                 version numbers unchanged. str[length-1] must exist.
     //   AliITSVersion_t maj  The major number
-    //   Int_t           min  The minor number
-    //   TDatime         dt   The date and time of the cvs commit
+
     // Return:
     //   kTRUE if no errors
-    Bool_t ok;
-    Char_t cvsRevision[10],cvsDate[11],cvsTime[9];
-    Int_t i,m,n=strlen(str),year,month,day,hours,minuits,seconds;
 
-    if(GetDebug()>1)printf("AliITSInitGeometry::ReadVersionString:"
-                       "str=%s length=%d\n",
-                       str,length);
-    if(n<35) return kFALSE; // not enough space for numbers
-    m = sscanf(str,"Major Version= %d  Minor Version= %d Revision: %s "
-               "Date: %s %s",&i,&min,cvsRevision,cvsDate,cvsTime);
-    ok = m==5;
-    if(!ok) return !ok;
-    m = sscanf(cvsDate,"%d/%d/%d",&year,&month,&day);
-    ok = m==3;
-    if(!ok) return !ok;
-    m = sscanf(cvsTime,"%d:%d:%d",&hours,&minuits,&seconds);
-    ok = m==3;
-    if(!ok) return !ok;
-    dt.Set(year,month,day,hours,minuits,seconds);
-    if(GetDebug()>1)printf("AliITSInitGeometry::ReadVersionString: i=%d "
-                     "min=%d cvsRevision=%s cvsDate=%s cvsTime=%s m=%d\n",
-                       i,min,cvsRevision,cvsDate,cvsTime,m);
-    if(GetDebug()>1)printf("AliITSInitGeometry::ReadVersionString: year=%d"
-                       " month=%d day=%d hours=%d minuits=%d seconds=%d\n",
-                       year,month,day,hours,minuits,seconds);
-    switch (i){
-    case kv11:{
-        maj = kv11;
-    } break;
-    case kv11Hybrid:{
-        maj = kv11Hybrid;
-    } break;
-    default:{
-        maj = kvDefault;
-    } break;
-    } // end switch
-    return ok;
+  Bool_t retcode=kFALSE;
+  Int_t n=strlen(str);
+  if(n<15) return retcode; // not enough space for numbers
+  Int_t m,i;
+  m = sscanf(str,"Major Version= %2d",&i);
+  maj = kvDefault;
+  if(m>0){
+    retcode = kTRUE;
+    if(i==11){
+      maj = kv11;
+    }
+  }
+  return retcode;
 }
+
+