]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- All mapping enums within namespace (AliMp).
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Jan 2007 16:59:41 +0000 (16:59 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Jan 2007 16:59:41 +0000 (16:59 +0000)
- Cathod types now defined via AliMpCathodType.

56 files changed:
MUON/mapping/AliMpConstants.cxx
MUON/mapping/AliMpConstants.h
MUON/mapping/AliMpFiles.cxx
MUON/mapping/AliMpFiles.h
MUON/mapping/AliMpManuList.cxx
MUON/mapping/AliMpMotifReader.cxx
MUON/mapping/AliMpMotifReader.h
MUON/mapping/AliMpPadRow.cxx
MUON/mapping/AliMpPadRow.h
MUON/mapping/AliMpRow.cxx
MUON/mapping/AliMpRow.h
MUON/mapping/AliMpSector.cxx
MUON/mapping/AliMpSector.h
MUON/mapping/AliMpSectorReader.cxx
MUON/mapping/AliMpSectorReader.h
MUON/mapping/AliMpSectorSegmentation.cxx
MUON/mapping/AliMpSectorSegmentation.h
MUON/mapping/AliMpSegmentation.cxx
MUON/mapping/AliMpSegmentation.h
MUON/mapping/AliMpSlat.cxx
MUON/mapping/AliMpSlat.h
MUON/mapping/AliMpSlatSegmentation.cxx
MUON/mapping/AliMpSlatSegmentation.h
MUON/mapping/AliMpSt345Reader.cxx
MUON/mapping/AliMpSt345Reader.h
MUON/mapping/AliMpTrigger.cxx
MUON/mapping/AliMpTrigger.h
MUON/mapping/AliMpTriggerReader.cxx
MUON/mapping/AliMpTriggerReader.h
MUON/mapping/AliMpTriggerSegmentation.cxx
MUON/mapping/AliMpTriggerSegmentation.h
MUON/mapping/AliMpVSegmentation.h
MUON/mapping/macros/testAllIndices.C
MUON/mapping/macros/testAnyPadIterators.C
MUON/mapping/macros/testDE.C
MUON/mapping/macros/testExistingPads.C
MUON/mapping/macros/testExistingPads2.C
MUON/mapping/macros/testGraphics.C
MUON/mapping/macros/testGraphicsSlat.C
MUON/mapping/macros/testIndicesLimits.C
MUON/mapping/macros/testManuListSt345.C
MUON/mapping/macros/testMotifTypeIterators.C
MUON/mapping/macros/testNeighboursPadIterator.C
MUON/mapping/macros/testPadDimensions.C
MUON/mapping/macros/testPadsUpEtc.C
MUON/mapping/macros/testPrintLimits.C
MUON/mapping/macros/testReadMotifType.C
MUON/mapping/macros/testReadMotifTypeSlat.C
MUON/mapping/macros/testReadSector.C
MUON/mapping/macros/testReadSlat.C
MUON/mapping/macros/testSectorAreaIterator.C
MUON/mapping/macros/testSectorFind.C
MUON/mapping/macros/testSectorPadIterators.C
MUON/mapping/macros/testSegmentation.C
MUON/mapping/macros/testSlatPads.C
MUON/mapping/macros/testUpdateGlobalIndices.C

index 3702a2ea6f3c8b5cb93e9480ae2a59839d9204aa..37db106330e029a5347255f9a9156e7f6ae7c70b 100755 (executable)
@@ -73,10 +73,10 @@ Bool_t  AliMpConstants::IsEqual(const TVector2& v1, const TVector2& v2)
 
 //_____________________________________________________________________________
 Int_t
-AliMpConstants::ManuMask(AliMpPlaneType planeType)
+AliMpConstants::ManuMask(AliMp::PlaneType planeType)
 {
   //
   // The manuIDs get an offset if they are in the non-bending plane
   //
-  return ( planeType == kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
+  return ( planeType == AliMp::kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
 }
index 4f4ecddc786cde9532520ee0c13033cc6c3beb22..8449f171738ef32a1c27ac304898008f01e2676f 100755 (executable)
@@ -34,7 +34,7 @@ class AliMpConstants : public TObject
   static Int_t    StartPadIndex();
   static Int_t    NofChambers();
   static Int_t    NofGeomModules();
-  static Int_t    ManuMask(AliMpPlaneType planeType);
+  static Int_t    ManuMask(AliMp::PlaneType planeType);
   
  private:
   // unused derived functions
index 3b50c213d0d42f91e07cff5e04098d791f6a992e..d0700f3e260e685206adee158585d4bb747fcc51 100755 (executable)
@@ -94,55 +94,55 @@ TString AliMpFiles::GetTop()
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::PlaneDataDir(AliMpStationType station, 
-                                 AliMpPlaneType plane)
+TString AliMpFiles::PlaneDataDir(AliMp::StationType station, 
+                                 AliMp::PlaneType plane)
 {
 /// Returns path to data files with sector description
 /// for a specified plane.
 
   switch (station) {
-  case kStation1:
-  case kStation2:
+  case AliMp::kStation1:
+  case AliMp::kStation2:
     switch (plane) {
-    case kBendingPlane:
+    case AliMp::kBendingPlane:
       return GetTop() + fgkDataDir + StationDataDir(station) + fgkBendingDir;
       ;;
-    case kNonBendingPlane:   
+    case AliMp::kNonBendingPlane:   
       return GetTop() + fgkDataDir + StationDataDir(station) + fgkNonBendingDir;
       ;;
     }   
     break;
-  case kStation345:
-  case kStationTrigger:  
+  case AliMp::kStation345:
+  case AliMp::kStationTrigger:  
     return GetTop() + fgkDataDir + StationDataDir(station) + "/";
     break;
   default:  
-    AliFatalClass("Incomplete switch on AliMpPlaneType");
+    AliFatalClass("Incomplete switch on AliMp::PlaneType");
     break;
   }
   return TString();
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::StationDataDir(AliMpStationType station)
+TString AliMpFiles::StationDataDir(AliMp::StationType station)
 {
 /// Returns the station directory name for the specified station number.
 
   TString stationDataDir(fgkStationDir);
   switch (station) {
-  case kStation1: 
+  case AliMp::kStation1: 
     stationDataDir += "1/";
     break;
     ;;
-  case kStation2: 
+  case AliMp::kStation2: 
     stationDataDir += "2/";
     break;
     ;;
-  case kStation345: 
+  case AliMp::kStation345: 
     stationDataDir += "345/";
     break;
     ;;      
-  case kStationTrigger:
+  case AliMp::kStationTrigger:
     stationDataDir += "Trigger/";
     break;
     ;;
@@ -166,7 +166,7 @@ TString AliMpFiles::BusPatchFilePath()
 }  
 
 //______________________________________________________________________________
-TString AliMpFiles::DENamesFilePath(AliMpStationType station)
+TString AliMpFiles::DENamesFilePath(AliMp::StationType station)
 {
 /// Return path to data file with DE names for given station.
  
@@ -178,36 +178,36 @@ TString AliMpFiles::LocalTriggerBoardMapping()
 {
 /// Return path to data file with local trigger board mapping.
 
-  return GetTop() + fgkDataDir + StationDataDir(kStationTrigger) 
+  return GetTop() + fgkDataDir + StationDataDir(AliMp::kStationTrigger) 
           + fgkTriggerLocalBoards + fgkDataExt;;
 }
 
 //_____________________________________________________________________________
-TString AliMpFiles::SlatFilePath(AliMpStationType stationType,
+TString AliMpFiles::SlatFilePath(AliMp::StationType stationType,
                                  const char* slatType,
-                                 AliMpPlaneType plane)
+                                 AliMp::PlaneType plane)
 {
 /// \todo add ..
 
   return TString(PlaneDataDir(stationType,plane) + slatType + "." +
-                ( plane == kNonBendingPlane ? "NonBending":"Bending" ) + ".slat");
+                ( plane == AliMp::kNonBendingPlane ? "NonBending":"Bending" ) + ".slat");
 }
 
 //_____________________________________________________________________________
-TString AliMpFiles::SlatPCBFilePath(AliMpStationType stationType,
+TString AliMpFiles::SlatPCBFilePath(AliMp::StationType stationType,
                                     const char* pcbType)
 {
 /// Get the full path for a given PCB (only relevant to stations 3,
 /// 4, 5 and trigger). The bending parameter below is of no use in this case, but
 /// we use it to re-use the PlaneDataDir() method untouched.
 
-  return TString(PlaneDataDir(stationType,kNonBendingPlane) + pcbType +
+  return TString(PlaneDataDir(stationType,AliMp::kNonBendingPlane) + pcbType +
                  ".pcb");
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::SectorFilePath(AliMpStationType station, 
-                                   AliMpPlaneType plane)
+TString AliMpFiles::SectorFilePath(AliMp::StationType station, 
+                                   AliMp::PlaneType plane)
 {
 /// Return path to data file with sector description.
  
@@ -215,8 +215,8 @@ TString AliMpFiles::SectorFilePath(AliMpStationType station,
 }
     
 //______________________________________________________________________________
-TString AliMpFiles::SectorSpecialFilePath(AliMpStationType station, 
-                                          AliMpPlaneType plane)
+TString AliMpFiles::SectorSpecialFilePath(AliMp::StationType station, 
+                                          AliMp::PlaneType plane)
 {
 /// Return path to data file with sector special description (irregular motifs).
 
@@ -224,8 +224,8 @@ TString AliMpFiles::SectorSpecialFilePath(AliMpStationType station,
 }
     
 //______________________________________________________________________________
-TString AliMpFiles::SectorSpecialFilePath2(AliMpStationType station, 
-                                           AliMpPlaneType plane)
+TString AliMpFiles::SectorSpecialFilePath2(AliMp::StationType station, 
+                                           AliMp::PlaneType plane)
 {
 /// Returns path to data file with sector special description (irregular motifs).
 
@@ -241,8 +241,8 @@ TString AliMpFiles::MotifFileName(const TString& motifTypeID)
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::MotifFilePath(AliMpStationType station, 
-                                  AliMpPlaneType plane, 
+TString AliMpFiles::MotifFilePath(AliMp::StationType station, 
+                                  AliMp::PlaneType plane, 
                                   const TString& motifTypeID)
 {
 /// Returns path to data file for a given motif type.
@@ -259,8 +259,8 @@ TString AliMpFiles::PadPosFileName(const TString& motifTypeID)
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::PadPosFilePath(AliMpStationType station, 
-                                   AliMpPlaneType plane, 
+TString AliMpFiles::PadPosFilePath(AliMp::StationType station, 
+                                   AliMp::PlaneType plane, 
                                    const TString& motifTypeID)
 {
 /// Returns path to data file with pad positions for a given motif type.
@@ -278,8 +278,8 @@ TString AliMpFiles::MotifSpecialFileName(const TString& motifID)
 }
 
 //______________________________________________________________________________ 
-TString AliMpFiles::MotifSpecialFilePath(AliMpStationType station, 
-                                         AliMpPlaneType plane,
+TString AliMpFiles::MotifSpecialFilePath(AliMp::StationType station, 
+                                         AliMp::PlaneType plane,
                                          const TString& motifID)
 {
 /// Returns path to data file with pad dimensions for a given motif ID.
@@ -288,7 +288,7 @@ TString AliMpFiles::MotifSpecialFilePath(AliMpStationType station,
 }
 
 //______________________________________________________________________________ 
-TString AliMpFiles::BergToGCFilePath(AliMpStationType station)
+TString AliMpFiles::BergToGCFilePath(AliMp::StationType station)
 {
 /// Returns the path of the file which describes the correspondance between
 /// the berg number and the gassiplex channel.
@@ -298,7 +298,7 @@ TString AliMpFiles::BergToGCFilePath(AliMpStationType station)
 }
 
 //______________________________________________________________________________ 
-TString AliMpFiles::ManuToSerialPath(const TString& deName, AliMpStationType station)
+TString AliMpFiles::ManuToSerialPath(const TString& deName, AliMp::StationType station)
 {
 /// Returns the path of the file for the manu id to their serial number
 
index ace4cd22acd30c8f2472a503fa56daeca474f797..304d01a28084dbd59da5e16894cceb564e2c62e5 100755 (executable)
@@ -43,7 +43,7 @@ class AliMpFiles : public TObject
 
     // de names
     //
-    static TString DENamesFilePath(AliMpStationType stationType);
+    static TString DENamesFilePath(AliMp::StationType stationType);
 
     // trigger
     //
@@ -51,34 +51,34 @@ class AliMpFiles : public TObject
   
     // slats
     //
-    static TString SlatFilePath(AliMpStationType stationType, 
-                                const char* slatType, AliMpPlaneType plane);
-    static TString SlatPCBFilePath(AliMpStationType stationType, 
+    static TString SlatFilePath(AliMp::StationType stationType, 
+                                const char* slatType, AliMp::PlaneType plane);
+    static TString SlatPCBFilePath(AliMp::StationType stationType, 
                                 const char* pcbType);
     // sectors
     //
-    static TString SectorFilePath(AliMpStationType station, 
-                                  AliMpPlaneType plane);
-    static TString SectorSpecialFilePath(AliMpStationType station, 
-                                  AliMpPlaneType plane);
-    static TString SectorSpecialFilePath2(AliMpStationType station, 
-                                  AliMpPlaneType plane);
+    static TString SectorFilePath(AliMp::StationType station, 
+                                  AliMp::PlaneType plane);
+    static TString SectorSpecialFilePath(AliMp::StationType station, 
+                                  AliMp::PlaneType plane);
+    static TString SectorSpecialFilePath2(AliMp::StationType station, 
+                                  AliMp::PlaneType plane);
     // motifs
     //
-    static TString MotifFilePath(AliMpStationType station, 
-                                 AliMpPlaneType plane, 
+    static TString MotifFilePath(AliMp::StationType station, 
+                                 AliMp::PlaneType plane, 
                                  const TString& motifTypeID);
     static TString MotifFileName(const TString& motifTypeID);
-    static TString MotifSpecialFilePath(AliMpStationType station,
-                                 AliMpPlaneType plane, const TString& motifID);
+    static TString MotifSpecialFilePath(AliMp::StationType station,
+                                 AliMp::PlaneType plane, const TString& motifID);
     static TString MotifSpecialFileName(const TString& motifID);
-    static TString PadPosFilePath(AliMpStationType station, 
-                                 AliMpPlaneType plane, const TString& motifTypeID);
+    static TString PadPosFilePath(AliMp::StationType station, 
+                                 AliMp::PlaneType plane, const TString& motifTypeID);
     static TString PadPosFileName(const TString& motifTypeID);
 
-    static TString BergToGCFilePath(AliMpStationType station);
+    static TString BergToGCFilePath(AliMp::StationType station);
 
-    static TString ManuToSerialPath(const TString& deName, AliMpStationType station);
+    static TString ManuToSerialPath(const TString& deName, AliMp::StationType station);
 
   
     // set methods
@@ -92,8 +92,8 @@ class AliMpFiles : public TObject
     AliMpFiles& operator=(const AliMpFiles& right);    
     // methods
     static TString GetTop();
-    static TString PlaneDataDir(AliMpStationType station, AliMpPlaneType plane); 
-    static TString StationDataDir(AliMpStationType station); 
+    static TString PlaneDataDir(AliMp::StationType station, AliMp::PlaneType plane); 
+    static TString StationDataDir(AliMp::StationType station); 
   
     // static data members  
     static const TString fgkDataDir;       ///< data directory
index 489b401340e0bb191b73c4a8a52cc3752a263fce..f702a58214fa7a0b9fc0a122c51c4ccef23f3eeb 100644 (file)
@@ -21,6 +21,7 @@
 #include "AliMpDEManager.h"
 #include "AliMpSegmentation.h"
 #include "AliMpStationType.h"
+#include "AliMpCathodType.h"
 #include "AliMpVSegmentation.h"
 #include "TArrayI.h"
 #include "TList.h"
@@ -87,14 +88,15 @@ AliMpManuList::ManuList()
   
   while ( !it.IsDone() )
   {
-    Int_t detElemId = it.CurrentDE();
-    AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId);
-    if ( stationType != kStationTrigger ) 
+    Int_t detElemId = it.CurrentDEId();
+    AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
+    if ( stationType != AliMp::kStationTrigger ) 
     {
-      for ( Int_t cath = 0; cath <=1 ; ++cath )
+      for ( Int_t cath = AliMp::kCath0; cath <=AliMp::kCath1 ; ++cath )
       {
         const AliMpVSegmentation* seg 
-         = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath);
+         = AliMpSegmentation::Instance()
+            ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cath));
         
         TArrayI manus;
         
@@ -136,10 +138,12 @@ AliMpManuList::NumberOfManus(Int_t detElemId)
 {
   /// Returns the number of manus contained in the given detection element.
   Int_t n(0);
-  for ( Int_t i = 0; i < 2; ++i )
+  for ( Int_t i = AliMp::kCath0; i <= AliMp::kCath1; ++i )
   {
     const AliMpVSegmentation* seg 
-      = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,i);
+      = AliMpSegmentation::Instance()
+        ->GetMpSegmentation(detElemId,AliMp::GetCathodType(i));
+        
     TArrayI manus;
     seg->GetAllElectronicCardIDs(manus);
     n += manus.GetSize();
index 87f51f2020bc645aa83d80b4c816c93a1b90bf4d..5c895f57af4629ba0b1e92e045e9fa757f8805d7 100644 (file)
@@ -31,7 +31,6 @@
 #include "AliMpMotifType.h"
 #include "AliMpConnection.h"
 #include "AliMpIntPair.h"
-#include "AliMpDirection.h"
 
 #include "AliLog.h"
 
@@ -49,8 +48,8 @@ ClassImp(AliMpMotifReader)
 /// \endcond
 
 //_____________________________________________________________________________
-AliMpMotifReader::AliMpMotifReader(AliMpStationType station, 
-                                   AliMpPlaneType plane) 
+AliMpMotifReader::AliMpMotifReader(AliMp::StationType station, 
+                                   AliMp::PlaneType plane) 
   : TObject(),
     fStationType(station),
     fPlaneType(plane)
@@ -61,8 +60,8 @@ AliMpMotifReader::AliMpMotifReader(AliMpStationType station,
 //_____________________________________________________________________________
 AliMpMotifReader::AliMpMotifReader() 
   : TObject(),
-    fStationType(kStation1),
-    fPlaneType(kBendingPlane)
+    fStationType(AliMp::kStation1),
+    fPlaneType(AliMp::kBendingPlane)
 {
 /// Default constructor
 }
@@ -130,7 +129,7 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
 
   ifstream bergToGCFile(bergToGCFileName);
   const Int_t knbergpins = 
-    (fStationType == kStation1 || fStationType == kStation2 ) ? 80 : 100;
+    (fStationType == AliMp::kStation1 || fStationType == AliMp::kStation2 ) ? 80 : 100;
   // Station1 & 2 Bergstak connectors have 80 pins, while for stations
   // 3, 4 and 5 they have 100 pins.
   Int_t gassiChannel[100];
index c1d354b72db8bbc7543a250a19d3f479e40e0d97..5e80049d650bb2f1e570b8b62be195fe218f38c3 100644 (file)
@@ -51,7 +51,7 @@ class AliMpMotifReader : public TObject
 #endif    
 
   public:
-    AliMpMotifReader(AliMpStationType station, AliMpPlaneType plane);
+    AliMpMotifReader(AliMp::StationType station, AliMp::PlaneType plane);
     AliMpMotifReader();
     virtual ~AliMpMotifReader();
   
@@ -67,8 +67,8 @@ class AliMpMotifReader : public TObject
     AliMpMotifReader&  operator = (const AliMpMotifReader& right);
 
     // data members  
-    AliMpStationType  fStationType; ///< station type 
-    AliMpPlaneType    fPlaneType;   ///< plane type 
+    AliMp::StationType  fStationType; ///< station type 
+    AliMp::PlaneType    fPlaneType;   ///< plane type 
 
   ClassDef(AliMpMotifReader,1)  // Data reader
 };
index 3ed934d0966b5397d75f8959c2bf5f1ca214ae4b..a2335d29ce01f6e4e314df50bf73a7610e76055e 100755 (executable)
@@ -36,7 +36,7 @@ ClassImp(AliMpPadRow)
 /// \endcond
 
 //_____________________________________________________________________________
-AliMpPadRow::AliMpPadRow(AliMpXDirection direction) 
+AliMpPadRow::AliMpPadRow(AliMp::XDirection direction) 
   : TObject(),
     fDirection(direction), 
     fID(0),
@@ -49,7 +49,7 @@ AliMpPadRow::AliMpPadRow(AliMpXDirection direction)
 //_____________________________________________________________________________
 AliMpPadRow::AliMpPadRow() 
   : TObject(),
-    fDirection(kLeft), 
+    fDirection(AliMp::kLeft), 
     fID(0),
     fOffsetX(0),
     fSegments() 
@@ -79,7 +79,7 @@ Double_t AliMpPadRow::CurrentBorderX() const
   if (GetNofPadRowSegments() == 0)
       return fOffsetX;
   else 
-    if (fDirection == kLeft)
+    if (fDirection == AliMp::kLeft)
       return GetPadRowSegment(GetNofPadRowSegments()-1)->LeftBorderX();
     else  
       return GetPadRowSegment(GetNofPadRowSegments()-1)->RightBorderX();
@@ -98,7 +98,7 @@ AliMpPadRow::AddPadRowSegment(AliMpMotif* motif, Int_t motifPositionId,
 
   AliMpVPadRowSegment* padRowSegment = 0;
 
-  if (fDirection == kLeft) {
+  if (fDirection == AliMp::kLeft) {
     padRowSegment 
       = new AliMpPadRowLSegment(this, motif, motifPositionId, nofPads);
   }    
index 4e1d91a31d0a226a9cc49dd2a46908e2545de442..19c50a81c48d5a131001435ff0fcb13bf047579a 100755 (executable)
@@ -41,7 +41,7 @@ class AliMpPadRow : public TObject
 #endif
 
   public:
-    AliMpPadRow(AliMpXDirection direction);
+    AliMpPadRow(AliMp::XDirection direction);
     AliMpPadRow();
     virtual ~AliMpPadRow();
   
@@ -67,7 +67,7 @@ class AliMpPadRow : public TObject
     Double_t CurrentBorderX() const;
 
     // data members
-    AliMpXDirection     fDirection; ///< the pad row x direction
+    AliMp::XDirection   fDirection; ///< the pad row x direction
     Int_t               fID;        ///< the pad row ID
     Double_t            fOffsetX;   ///< the x position of the border
     PadRowSegmentVector fSegments;  ///< the pad row segments
index 8848d4ddc5bb34e6e908a5cafa1b5d59f5e84c91..87592f70802ff9a049c56b089d66972c8ad95894 100755 (executable)
@@ -33,6 +33,8 @@
 #include "AliMpMotifMap.h"
 #include "AliMpConstants.h"
 
+#include "AliLog.h"
+
 #include <TMath.h>
 #include <Riostream.h>
 
@@ -283,7 +285,7 @@ void AliMpRow::SetMotifPositions()
 }    
 
 //_____________________________________________________________________________
-void AliMpRow::SetGlobalIndices(AliMpDirection constPadSizeDirection, 
+void AliMpRow::SetGlobalIndices(AliMp::Direction constPadSizeDirection, 
                                 AliMpRow* rowBefore)
 {
 /// Set the global indices limits to its row segments, motif positions
@@ -301,7 +303,7 @@ void AliMpRow::SetGlobalIndices(AliMpDirection constPadSizeDirection,
      
        // Find the y index value of the low edge
        if (rowBefore) {
-         if (constPadSizeDirection == kY) {
+         if (constPadSizeDirection == AliMp::kY) {
            iy = rowBefore->GetHighIndicesLimit().GetSecond()+1;
          } 
         else {
index c1a208c557435f5d7019d14901e671d4f987d2dd..7ccf27db5653f2529554df78d3eec300605fce4e 100755 (executable)
@@ -58,7 +58,7 @@ class AliMpRow : public AliMpVIndexed
     void      SetRowSegmentOffsets(const TVector2& offset);
     Double_t  SetOffsetY(Double_t offsetY);
     void      SetMotifPositions();
-    void      SetGlobalIndices(AliMpDirection constPadSizeDirection, 
+    void      SetGlobalIndices(AliMp::Direction constPadSizeDirection, 
                                AliMpRow* rowBefore);
 
     // geometry
index 94c942b066fc61e42f2ba5904f8992042c894dbc..7477ea345c2b910629f4eccb75a3a3d22b2c0dcf 100755 (executable)
@@ -33,6 +33,8 @@
 #include "AliMpIntPair.h"
 #include "AliMpConstants.h"
 
+#include "AliLog.h"
+
 #include <Riostream.h>
 
 /// \cond CLASSIMP
@@ -41,7 +43,7 @@ ClassImp(AliMpSector)
 
 //_____________________________________________________________________________
 AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows, 
-                         AliMpDirection direction, const TVector2& offset) 
+                         AliMp::Direction direction, const TVector2& offset) 
   : TNamed("Sector", ""),
     fID(id),
     fOffset(offset),
@@ -85,7 +87,7 @@ AliMpSector::AliMpSector()
     fZones(),
     fRows(),
     fMotifMap(0),
-    fDirection(kX),
+    fDirection(AliMp::kX),
     fMinPadDimensions(TVector2(0., 0.)),
     fMaxPadIndices(AliMpIntPair::Invalid()),
     fNofPads(0)
@@ -185,9 +187,9 @@ void  AliMpSector::SetMinPadDimensions()
   for (Int_t i=1; i<GetNofZones()+1; i++) {
     TVector2 padDimensions = GetZone(i)->GetPadDimensions();
     
-    if ( fDirection == kX &&  
+    if ( fDirection == AliMp::kX &&  
          padDimensions.Y() > 0. && padDimensions.Y() < fMinPadDimensions.Y() ||
-         fDirection == kY && 
+         fDirection == AliMp::kY && 
         padDimensions.X() > 0. && padDimensions.X() < fMinPadDimensions.X())
       
       fMinPadDimensions = padDimensions;
@@ -507,12 +509,12 @@ AliMpRow* AliMpSector::GetRow(Int_t rowID) const
 }
 
 //_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
 AliMpSector::GetPlaneType() const
 {
 /// Return the plane type
 
-  return GetDirection()==kY ? kBendingPlane : kNonBendingPlane;
+  return GetDirection()==AliMp::kY ? AliMp::kBendingPlane : AliMp::kNonBendingPlane;
 }
 
 //_____________________________________________________________________________
index 20345cad538d80d099dab3b0554caa8709825352..b9c47b13eba23b0ed89d3858567cebd7778c48dd 100755 (executable)
@@ -54,7 +54,7 @@ class AliMpSector : public TNamed
 
   public:
     AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
-                AliMpDirection direction, const TVector2& offset);
+                AliMp::Direction direction, const TVector2& offset);
     AliMpSector();
     virtual ~AliMpSector();
   
@@ -88,8 +88,8 @@ class AliMpSector : public TNamed
     Int_t       GetNofRows() const;
     AliMpRow*   GetRow(Int_t i) const;
 
-    AliMpDirection  GetDirection() const;  
-    AliMpPlaneType  GetPlaneType() const;  
+    AliMp::Direction  GetDirection() const;  
+    AliMp::PlaneType  GetPlaneType() const;  
 
     TVector2        GetMinPadDimensions() const;
     AliMpIntPair    GetMaxPadIndices() const;
@@ -119,11 +119,11 @@ class AliMpSector : public TNamed
     TVector2   fOffset;   ///< sector position
     ZoneVector fZones;    ///< zones
     RowVector  fRows;     ///< rows
-    AliMpMotifMap* fMotifMap; ///< motif map
-    AliMpDirection fDirection;///< the direction of constant pad size
-    TVector2       fMinPadDimensions; ///< minimal pad dimensions
-    AliMpIntPair   fMaxPadIndices;    ///< maximum pad indices    
-    Int_t          fNofPads;          ///<  total number of pads
+    AliMpMotifMap*   fMotifMap; ///< motif map
+    AliMp::Direction fDirection;///< the direction of constant pad size
+    TVector2         fMinPadDimensions; ///< minimal pad dimensions
+    AliMpIntPair     fMaxPadIndices;    ///< maximum pad indices    
+    Int_t            fNofPads;          ///<  total number of pads
 
 
   ClassDef(AliMpSector,1)  // Sector
@@ -131,7 +131,7 @@ class AliMpSector : public TNamed
 
 // inline functions
 
-inline AliMpDirection AliMpSector::GetDirection() const 
+inline AliMp::Direction AliMpSector::GetDirection() const 
 { return fDirection; }    
 
 inline TVector2   AliMpSector::GetMinPadDimensions() const
index 20699be08bba36edfb96027072516c2514057492..3d5ab3bbabcfcd0fbaacf576cc6e4203f4c9d48a 100755 (executable)
@@ -71,8 +71,8 @@ const TString  AliMpSectorReader::fgkPadRowsKeyword        = "PAD_ROWS";
 const TString  AliMpSectorReader::fgkPadRowSegmentKeyword  = "PAD_ROW_SEGMENT";
 
 //_____________________________________________________________________________
-AliMpSectorReader::AliMpSectorReader(AliMpStationType station, 
-                                     AliMpPlaneType plane) 
+AliMpSectorReader::AliMpSectorReader(AliMp::StationType station, 
+                                     AliMp::PlaneType plane) 
   : TObject(),
     fStationType(station),
     fPlaneType(plane),
@@ -85,8 +85,8 @@ AliMpSectorReader::AliMpSectorReader(AliMpStationType station,
 //_____________________________________________________________________________
 AliMpSectorReader::AliMpSectorReader() 
   : TObject(),
-    fStationType(kStation1),
-    fPlaneType(kBendingPlane),
+    fStationType(AliMp::kStation1),
+    fPlaneType(AliMp::kBendingPlane),
     fSector(0),
     fMotifReader(0)
 {
@@ -130,8 +130,8 @@ void  AliMpSectorReader::ReadSectorData(ifstream& in)
   in >> offsetX;
   in >> offsetY;
   
-  AliMpDirection direction;
-  direction = (directionStr == "Y") ? kY  :  kX;
+  AliMp::Direction direction;
+  direction = (directionStr == "Y") ? AliMp::kY  :  AliMp::kX;
 
   AliDebugStream(2) << nofZones << " " <<  nofRows << endl;
 
@@ -299,7 +299,7 @@ void AliMpSectorReader::ReadRowSegmentsData(ifstream& in,
 }   
 
 //_____________________________________________________________________________
-void AliMpSectorReader::ReadSectorSpecialData(ifstream& in, AliMpXDirection direction)
+void AliMpSectorReader::ReadSectorSpecialData(ifstream& in, AliMp::XDirection direction)
 {
 /// Read sector input data
 /// with a special (irregular) motifs.
@@ -356,7 +356,7 @@ void AliMpSectorReader::ReadMotifsSpecialData(ifstream& in)
 }  
 
 //_____________________________________________________________________________
-void AliMpSectorReader::ReadRowSpecialData(ifstream& in, AliMpXDirection direction)
+void AliMpSectorReader::ReadRowSpecialData(ifstream& in, AliMp::XDirection direction)
 {
 /// Read row input data
 /// with a special (irregular) motifs.
@@ -370,7 +370,7 @@ void AliMpSectorReader::ReadRowSpecialData(ifstream& in, AliMpXDirection directi
   AliMpRow* row = fSector->GetRow(id);
 
   AliMpVRowSegmentSpecial* segment = 0;
-  if (direction == kLeft) {
+  if (direction == AliMp::kLeft) {
     AliMpVRowSegment* firstNormalSeg = row->GetRowSegment(0);
     Double_t offsetX = firstNormalSeg->LeftBorderX();
   
@@ -419,7 +419,7 @@ void AliMpSectorReader::ReadRowSpecialData(ifstream& in, AliMpXDirection directi
 //_____________________________________________________________________________
 void AliMpSectorReader::ReadRowSegmentSpecialData(ifstream& in, 
                                             AliMpVRowSegmentSpecial* segment,
-                                           AliMpXDirection direction)
+                                           AliMp::XDirection direction)
 {
 /// Read row segment input data
 /// with a special (irregular) motifs.
@@ -556,7 +556,7 @@ AliMpSector* AliMpSectorReader::BuildSector()
        return 0;
     }
     
-    ReadSectorSpecialData(in2, kLeft);
+    ReadSectorSpecialData(in2, AliMp::kLeft);
   }   
 
   // Open input file for special outer zone
@@ -571,7 +571,7 @@ AliMpSector* AliMpSectorReader::BuildSector()
        return 0;
     }
     
-    ReadSectorSpecialData(in3, kRight);
+    ReadSectorSpecialData(in3, AliMp::kRight);
   }   
 
   fSector->Initialize();
index 613ba740bc691d2a92f3a1d8234cfbbbe9655ac1..1c33f85560d529900dd0d9e2d08bb5c46a2daadc 100755 (executable)
@@ -37,7 +37,7 @@ class AliMpMotifType;
 class AliMpSectorReader : public TObject
 {
   public:
-    AliMpSectorReader(AliMpStationType station, AliMpPlaneType plane);
+    AliMpSectorReader(AliMp::StationType station, AliMp::PlaneType plane);
     AliMpSectorReader();
     virtual ~AliMpSectorReader();
   
@@ -55,12 +55,12 @@ class AliMpSectorReader : public TObject
     void  ReadRowSegmentsData(ifstream& in,
                           AliMpZone* zone, AliMpSubZone* subZone);
     AliMpVMotif*  ReadMotifData(ifstream& in, AliMpZone* zone);
-    void  ReadSectorSpecialData(ifstream& in, AliMpXDirection direction);
+    void  ReadSectorSpecialData(ifstream& in, AliMp::XDirection direction);
     void  ReadMotifsSpecialData(ifstream& in);
-    void  ReadRowSpecialData(ifstream& in, AliMpXDirection direction);
+    void  ReadRowSpecialData(ifstream& in, AliMp::XDirection direction);
     void  ReadRowSegmentSpecialData(ifstream& in,
                           AliMpVRowSegmentSpecial* segment,
-                         AliMpXDirection direction);
+                         AliMp::XDirection direction);
     
     // static data members
     static const TString  fgkSectorKeyword;        ///< sector keyword
@@ -75,10 +75,10 @@ class AliMpSectorReader : public TObject
     static const TString  fgkPadRowSegmentKeyword; ///< pad row segment keyword
   
     // data members  
-    AliMpStationType  fStationType; ///< station type 
-    AliMpPlaneType    fPlaneType;   ///< plane type 
-    AliMpSector*      fSector;      ///< sector
-    AliMpMotifReader* fMotifReader; ///< motif reader
+    AliMp::StationType  fStationType; ///< station type 
+    AliMp::PlaneType    fPlaneType;   ///< plane type 
+    AliMpSector*        fSector;      ///< sector
+    AliMpMotifReader*   fMotifReader; ///< motif reader
 
   ClassDef(AliMpSectorReader,1)  // Data reader
 };
index 9b5c8b84db18e44052f1e7b3cc84333b5647ea1d..1aa48fb14481d10c9a9c970867539ba4747b011f 100755 (executable)
@@ -196,7 +196,7 @@ AliMpSectorSegmentation::FindMotifPosition(const AliMpIntPair& indices) const
 /// return 0 if not found
 
   switch (fkSector->GetDirection()) {
-    case kX : {
+    case AliMp::kX : {
     // Case where all the pads have the same size along X direction
 
       for (Int_t irow=0; irow<fkSector->GetNofRows(); ++irow) {
@@ -224,7 +224,7 @@ AliMpSectorSegmentation::FindMotifPosition(const AliMpIntPair& indices) const
     }
     break;
     ////////////////////////////////////////////////////////////////////////////////
-    case kY : {
+    case AliMp::kY : {
       // Case where all the pads have the same size along Y direction   
       // look for the row which contains the indices
       AliMpRow* row=0;
@@ -330,9 +330,9 @@ AliMpSectorSegmentation::CreateIterator(const AliMpArea& area) const
 
   switch (fkSector->GetDirection()) {
   
-    case kX: return new AliMpSectorAreaVPadIterator(this, area);
+    case AliMp::kX: return new AliMpSectorAreaVPadIterator(this, area);
              ;;
-    case kY: return new AliMpSectorAreaHPadIterator(this, area);
+    case AliMp::kY: return new AliMpSectorAreaHPadIterator(this, area);
              ;;
   }
   
@@ -358,7 +358,7 @@ AliMpSectorSegmentation::Dimensions() const
 }
 
 //______________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
 AliMpSectorSegmentation::PlaneType() const
 {
   return GetSector()->GetPlaneType();
@@ -483,9 +483,9 @@ AliMpSectorSegmentation::PadByDirection(const TVector2& startPosition,
 
   switch (fkSector->GetDirection()) {
   
-    case kX: return PadByYDirection(startPosition, distance);
+    case AliMp::kX: return PadByYDirection(startPosition, distance);
              ;;
-    case kY: return PadByXDirection(startPosition, distance);
+    case AliMp::kY: return PadByXDirection(startPosition, distance);
              ;;
   }
   
index a3c800e2012ff0769f0594fe5e1c356447c0e4ec..46dbfb9d9e1054719eff6fef4c5a80f2428142f6 100755 (executable)
@@ -88,7 +88,7 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
     
     virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
 
-    AliMpPlaneType PlaneType() const;
+    AliMp::PlaneType PlaneType() const;
     
     TVector2 Dimensions() const;
     
index f7c7770b85b2e0816542a1459e44fe4555960a3d..9ad3e81b6a37a0005b38924979def0f23ef705d8 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "AliMpSegmentation.h"
 
+#include "AliMpDetElement.h"
 #include "AliMpDEManager.h"
 #include "AliMpDEIterator.h"
 #include "AliMpExMap.h"
@@ -38,6 +39,7 @@
 #include "AliMpTrigger.h"
 #include "AliMpTriggerReader.h"
 #include "AliMpTriggerSegmentation.h"
+#include "AliMpCathodType.h"
 
 #include "AliLog.h"
 
@@ -85,23 +87,19 @@ AliMpSegmentation::AliMpSegmentation()
   fElCardsMap.SetOwner(true);
 
   // Create mapping segmentations for all detection elements
-  for ( Int_t cath = 0; cath < 2; cath ++ ) 
-  { 
+  for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; cath ++ ) { 
     AliMpDEIterator it;
-    for ( it.First(); ! it.IsDone(); it.Next() ) 
-    {
-        CreateMpSegmentation(it.CurrentDE(), cath);
+    for ( it.First(); ! it.IsDone(); it.Next() ) {
+      CreateMpSegmentation(it.CurrentDEId(), AliMp::GetCathodType(cath));
     } 
   }  
 
   // Fill el cards map for all detection elements
   // of tracking chambers
   AliMpDEIterator it;
-  for ( it.First(); ! it.IsDone(); it.Next() ) 
-  { 
-    if ( AliMpDEManager::GetStationType(it.CurrentDE()) != kStationTrigger )
-    {
-      FillElCardsMap(it.CurrentDE());
+  for ( it.First(); ! it.IsDone(); it.Next() ) { 
+    if ( AliMpDEManager::GetStationType(it.CurrentDEId()) != AliMp::kStationTrigger ) {
+      FillElCardsMap(it.CurrentDEId());
     }
   }  
 }
@@ -115,6 +113,8 @@ AliMpSegmentation::AliMpSegmentation(TRootIOCtor* /*ioCtor*/)
 {  
 /// Constructor for IO
 
+  AliDebug(1,"");
+
   fgInstance = this;
 }
 
@@ -137,18 +137,19 @@ AliMpSegmentation::~AliMpSegmentation()
 
 //______________________________________________________________________________
 AliMpVSegmentation* 
-AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, Int_t cath)
+AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, AliMp::CathodType cath)
 {
 /// Create mapping segmentation for given detElemId and cath
 /// or return it if it was already built
 
   // Check detElemId & cath  
-  if ( ! AliMpDEManager::IsValid(detElemId, cath, true) ) return 0;
+  if ( ! AliMpDEManager::IsValidDetElemId(detElemId, true) ) return 0;
 
   // If segmentation is already built, just return it
   //
-  TString deName = AliMpDEManager::GetDESegName(detElemId, cath);
-  TObject* object = fMpSegmentations.Get(deName);
+  AliMpDetElement* detElement = AliMpDEManager::GetDetElement(detElemId);
+  TString deSegName = detElement->GetSegName(cath);
+  TObject* object = fMpSegmentations.Get(deSegName);
   if ( object ) return (AliMpVSegmentation*)object;
 
   AliDebugStream(3)
@@ -157,23 +158,23 @@ AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, Int_t cath)
   
   // Read mapping data and create segmentation
   //
-  AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId);
-  AliMpPlaneType planeType = AliMpDEManager::GetPlaneType(detElemId, cath);
-  TString deTypeName = AliMpDEManager::GetDETypeName(detElemId, cath);
+  AliMp::StationType stationType = detElement->GetStationType();
+  AliMp::PlaneType planeType = detElement->GetPlaneType(cath);
+  TString deTypeName = detElement->GetSegType();
 
   AliMpVSegmentation* mpSegmentation = 0;
 
-  if ( stationType == kStation1 || stationType == kStation2 ) {
+  if ( stationType == AliMp::kStation1 || stationType == AliMp::kStation2 ) {
     AliMpSectorReader reader(stationType, planeType);
     AliMpSector* sector = reader.BuildSector();
     mpSegmentation = new AliMpSectorSegmentation(sector, true);
   }
-  else if ( stationType == kStation345 ) { 
+  else if ( stationType == AliMp::kStation345 ) { 
     AliMpSt345Reader reader(fSlatMotifMap);
     AliMpSlat* slat = reader.ReadSlat(deTypeName, planeType);
     mpSegmentation =  new AliMpSlatSegmentation(slat, true);
   }
-  else if ( stationType == kStationTrigger ) {
+  else if ( stationType == AliMp::kStationTrigger ) {
     AliMpTriggerReader reader(fSlatMotifMap);
     AliMpTrigger* trigger = reader.ReadSlat(deTypeName, planeType);
     mpSegmentation = new AliMpTriggerSegmentation(trigger, true);
@@ -181,9 +182,9 @@ AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, Int_t cath)
   else   
     AliErrorStream() << "Unknown station type" << endl;
 
-  fMpSegmentations.Add(deName, mpSegmentation); 
+  fMpSegmentations.Add(deSegName, mpSegmentation); 
   
-  StdoutToAliDebug(3,fSlatMotifMap.Print(););
+  StdoutToAliDebug(3, fSlatMotifMap.Print(););
   
   return mpSegmentation;
 } 
@@ -207,15 +208,15 @@ AliMpSegmentation::FillElCardsMap(Int_t detElemId)
   // Do it in 2 steps to be able to set the AliMpExMap size once for all,
   // to avoid annoying warning message in case of dynamical resizing.
   // (not critical).
-  for ( Int_t cathode = 0; cathode < 2; ++cathode )
+  for ( Int_t cathode = AliMp::kCath0; cathode <= AliMp::kCath1; ++cathode )
   {
-    seg[cathode] = GetMpSegmentation(detElemId,cathode);
+    seg[cathode] = GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode));
     seg[cathode]->GetAllElectronicCardIDs(ecn[cathode]);
   }
   
   mde->SetSize(ecn[0].GetSize()+ecn[1].GetSize());
   
-  for ( Int_t cathode = 0; cathode < 2; ++ cathode )
+  for ( Int_t cathode = AliMp::kCath0; cathode <= AliMp::kCath1; ++ cathode )
   {
     for ( Int_t i = 0; i < ecn[cathode].GetSize(); ++i )
     {
@@ -233,23 +234,25 @@ AliMpSegmentation::FillElCardsMap(Int_t detElemId)
 //______________________________________________________________________________
 const AliMpVSegmentation* 
 AliMpSegmentation::GetMpSegmentation(
-                      Int_t detElemId, Int_t cath, Bool_t warn) const
+                      Int_t detElemId, AliMp::CathodType cath, Bool_t warn) const
 {
 /// Return mapping segmentation for given detElemId and cath
 
   // Check detElemId & cath  
-  if ( ! AliMpDEManager::IsValid(detElemId, cath, false) ) {
+  if ( ! AliMpDEManager::IsValidDetElemId(detElemId, false) ) {
     
     if ( warn ) {
       AliWarningStream() 
-        << "Invalid detElemId/cathod (" 
-       << detElemId << ", " << cath << ")" << endl;
+        << "Invalid detElemId " << detElemId << endl;
     }  
     return 0;
   }  
 
-  TString deName = AliMpDEManager::GetDESegName(detElemId, cath);
-  TObject* object = fMpSegmentations.Get(deName);
+  // If segmentation is already built, just return it
+  //
+  AliMpDetElement* detElement = AliMpDEManager::GetDetElement(detElemId);
+  TString deSegName = detElement->GetSegName(cath);
+  TObject* object = fMpSegmentations.Get(deSegName);
   if ( ! object ) {
     // Should never happen
     AliErrorStream() 
index caed95d588b817546c270a49465ffcb5b6c70f6e..2ccd3fee7ab2be5e6c072c72bf633d5aa18fbcc0 100644 (file)
 #  include "AliMpExMap.h"
 #endif
 
+#ifndef ALI_MP_CATHOD_TYPE_H
+#  include "AliMpCathodType.h"
+#endif
+
 #ifndef ALIMPSLATMOTIFMAP_H
 #  include "AliMpSlatMotifMap.h"
 #endif
@@ -51,7 +55,7 @@ class AliMpSegmentation : public  TObject {
 
     // methods
     const AliMpVSegmentation* GetMpSegmentation(
-                                 Int_t detElemId, Int_t cath, 
+                                 Int_t detElemId, AliMp::CathodType cath, 
                                 Bool_t warn = true) const;
 
     const AliMpVSegmentation* GetMpSegmentationByElectronics(
@@ -64,7 +68,7 @@ class AliMpSegmentation : public  TObject {
     AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
 
     AliMpVSegmentation* CreateMpSegmentation(
-                              Int_t detElemId, Int_t cath);
+                              Int_t detElemId, AliMp::CathodType cath);
 
     AliMpExMap* FillElCardsMap(Int_t detElemId);
 
index 895558acb0f985d3b36619c98304e5c7e273b833..1cfc47465fdf2c9b316fa692a5cb95c4bde927f8 100644 (file)
@@ -46,7 +46,7 @@ ClassImp(AliMpSlat)
 AliMpSlat::AliMpSlat() 
 : TObject(), 
   fId(""), 
-  fPlaneType(kNonBendingPlane),
+  fPlaneType(AliMp::kNonBendingPlane),
   fDX(0), 
   fDY(0),
   fNofPadsX(0), 
@@ -67,7 +67,7 @@ AliMpSlat::AliMpSlat()
 }
 
 //_____________________________________________________________________________
-AliMpSlat::AliMpSlat(const char* id, AliMpPlaneType bendingOrNonBending)
+AliMpSlat::AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending)
 : TObject(), 
   fId(id), 
   fPlaneType(bendingOrNonBending),
@@ -403,11 +403,11 @@ AliMpSlat::GetName() const
   // the plane type as a suffix.
   //
   TString name(GetID());
-  if ( fPlaneType == kBendingPlane )
+  if ( fPlaneType == AliMp::kBendingPlane )
   {
     name += ".Bending";
   }
-  else if ( fPlaneType == kNonBendingPlane )
+  else if ( fPlaneType == AliMp::kNonBendingPlane )
   {
     name += ".NonBending";
   }
index 3f6dec078476c936dfbef415dc6126dd85ac7169..254dd98cfbd4b2faf663f5d4bce414bc456d5907 100644 (file)
@@ -58,7 +58,7 @@ class AliMpSlat : public TObject
 #endif  
   
   AliMpSlat();
-  AliMpSlat(const char* id, AliMpPlaneType bendingOrNonBending);
+  AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending);
   virtual ~AliMpSlat();
 
   TVector2 Dimensions() const;
@@ -135,7 +135,7 @@ class AliMpSlat : public TObject
     */
   void ForcePosition(const TVector2& pos);
   
-  AliMpPlaneType PlaneType() const { return fPlaneType; }
+  AliMp::PlaneType PlaneType() const { return fPlaneType; }
   
   Int_t NofPads() const { return fNofPads; }
  
@@ -144,7 +144,7 @@ class AliMpSlat : public TObject
   AliMpSlat& operator=(const AliMpSlat& rhs);
 
   TString fId; ///< The name of this slat, e.g. 112233N
-  AliMpPlaneType fPlaneType; ///< Whether it's bending or non-bending plane
+  AliMp::PlaneType fPlaneType; ///< Whether it's bending or non-bending plane
   Double_t fDX; ///< Half-size in X (cm)
   Double_t fDY; ///< Half-size in Y (cm)
   Int_t fNofPadsX; ///< Actual number of pads in x direction
index 3354afc0aa8dc86a85e5bb7b5122a7439986f85d..63f216d8c8a15d229c3974eec13e63a170391e6f 100644 (file)
@@ -322,7 +322,7 @@ AliMpSlatSegmentation::PadByPosition(const TVector2& position,
 }
 
 //_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
 AliMpSlatSegmentation::PlaneType() const
 {
   return Slat()->PlaneType();
index b0c7bd0fd69fa443afccc6776e92962e4e3acc4e..d92382d0e89ed196f8f0bb4e56774592a1b77b59 100644 (file)
@@ -66,7 +66,7 @@ class AliMpSlatSegmentation : public AliMpVSegmentation
   
   void GetAllElectronicCardIDs(TArrayI& ecn) const;
   
-  AliMpPlaneType PlaneType() const;
+  AliMp::PlaneType PlaneType() const;
   
   TVector2 Dimensions() const;
   
index 9d37ce8ab46a5ba59459ed096a0c8ea4bb2610b9..cc5e36bc0b9ba2a710e6467e1cfeeed0a39525ed 100644 (file)
@@ -80,14 +80,14 @@ AliMpSt345Reader::ReadPCB(const char* pcbType)
   /// Create a new AliMpPCB object, by reading it from file.
   /// The returned object must be deleted by the client
   
-  std::ifstream in(AliMpFiles::SlatPCBFilePath(kStation345,pcbType).Data());
+  std::ifstream in(AliMpFiles::SlatPCBFilePath(AliMp::kStation345,pcbType).Data());
   if (!in.good()) 
   {
     AliErrorClass(Form("Cannot open file for PCB %s",pcbType));
     return 0;
   }
  
-  AliMpMotifReader reader(kStation345,kNonBendingPlane); 
+  AliMpMotifReader reader(AliMp::kStation345,AliMp::kNonBendingPlane); 
   // note that the nonbending
   // parameter is of no use for station345, as far as reading motif is 
   // concerned, as all motifs are supposed to be in the same directory
@@ -152,18 +152,18 @@ AliMpSt345Reader::ReadPCB(const char* pcbType)
 
 //_____________________________________________________________________________
 AliMpSlat*
-AliMpSt345Reader::ReadSlat(const char* slatType, AliMpPlaneType planeType)
+AliMpSt345Reader::ReadSlat(const char* slatType, AliMp::PlaneType planeType)
 {
   ///
   /// Create a new AliMpSlat object, by reading it from file.
   /// The returned object must be deleted by the client.
   
-  std::ifstream in(AliMpFiles::SlatFilePath(kStation345,slatType,
+  std::ifstream in(AliMpFiles::SlatFilePath(AliMp::kStation345,slatType,
                                             planeType).Data());
   if (!in.good()) 
   {
     AliErrorClass(Form("Cannot read slat from %s",
-                       AliMpFiles::SlatFilePath(kStation345,slatType,planeType).Data()));
+                       AliMpFiles::SlatFilePath(AliMp::kStation345,slatType,planeType).Data()));
     return 0;
   }
   
index 1f430d152ca4fb7adf4ed531890c705c9010b751..2a7f6a37ce6d652961c4be1c6705d7aca2096bc7 100644 (file)
@@ -40,7 +40,7 @@ class AliMpSt345Reader : public TObject
   AliMpSt345Reader(AliMpSlatMotifMap&);
   virtual ~AliMpSt345Reader();
 
-  AliMpSlat* ReadSlat(const char* slatType, AliMpPlaneType planeType);
+  AliMpSlat* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
 
   AliMpPCB* ReadPCB(const char* pcbType);
 
index 390bea9bca57f75aa484e5de20e0604ddf992d00..40473a990d271c40ff424ab20d1162c8ac85bafc 100644 (file)
@@ -66,7 +66,7 @@ namespace
 AliMpTrigger::AliMpTrigger()
 : TObject(), 
   fId(""), 
-  fPlaneType(kNonBendingPlane), 
+  fPlaneType(AliMp::kNonBendingPlane), 
   fSlats(0),
   fSlatSegmentations(0),
   fMaxNofPadsY(0),
@@ -82,7 +82,7 @@ AliMpTrigger::AliMpTrigger()
 }
 
 //_____________________________________________________________________________
-AliMpTrigger::AliMpTrigger(const char* slatType, AliMpPlaneType bendingOrNot)
+AliMpTrigger::AliMpTrigger(const char* slatType, AliMp::PlaneType bendingOrNot)
     :  TObject(), 
        fId(slatType), 
        fPlaneType(bendingOrNot), 
@@ -208,11 +208,11 @@ AliMpTrigger::GetName() const
 {
   // returns the name (=id+bending/non-bending) of this slat
   TString name(GetID());
-  if ( fPlaneType == kBendingPlane )
+  if ( fPlaneType == AliMp::kBendingPlane )
   {
     name += ".Bending";
   }
-  else if ( fPlaneType == kNonBendingPlane )
+  else if ( fPlaneType == AliMp::kNonBendingPlane )
   {
     name += ".NonBending";
   }
@@ -289,7 +289,7 @@ AliMpTrigger::IsLayerValid(int layer) const
 }
 
 //_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
 AliMpTrigger::PlaneType() const
 {
   // Bending or not
index deb0c41ad26ccd34de578d77a1c040fac79fb39f..4f8d6622e2926eae05611e54e23b1c4b12ef745b 100644 (file)
@@ -42,7 +42,7 @@ class AliMpTrigger : public TObject
 {
 public:
   AliMpTrigger();
-  AliMpTrigger(const char* slatType, AliMpPlaneType bendingOrNonBending);
+  AliMpTrigger(const char* slatType, AliMp::PlaneType bendingOrNonBending);
   virtual ~AliMpTrigger();
   
   Bool_t AdoptLayer(AliMpSlat* slat);
@@ -70,7 +70,7 @@ public:
   
   void Print(Option_t* option="") const;
 
-  AliMpPlaneType PlaneType() const;
+  AliMp::PlaneType PlaneType() const;
   
   TVector2 Dimensions() const;
   
@@ -79,7 +79,7 @@ private:
   Bool_t IsLayerValid(int layer) const;
   
   TString fId; ///< name of that slat
-  AliMpPlaneType fPlaneType; ///< bending or non-bending
+  AliMp::PlaneType fPlaneType; ///< bending or non-bending
   TObjArray fSlats; ///< virtual slat composing this trigger slat
   TObjArray fSlatSegmentations; ///< segmentations for virtual slats
   Int_t fMaxNofPadsY; ///< max number of pads in y direction
index afa679762cd58b98970239cd9036ee3d1b86f228..622709b12527ee7bd274eed95f16d724e91506f8 100644 (file)
@@ -84,7 +84,7 @@ AliMpTriggerReader::~AliMpTriggerReader()
 //_____________________________________________________________________________
 AliMpSlat*
 AliMpTriggerReader::BuildSlat(const char* slatName,
-                              AliMpPlaneType planeType,
+                              AliMp::PlaneType planeType,
                               const TList& lines,
                               Double_t scale)
 {
@@ -448,7 +448,7 @@ AliMpTriggerReader::LocalBoardNumber(const char* localBoardName)
 //_____________________________________________________________________________
 void 
 AliMpTriggerReader::ReadLines(const char* slatType,
-                              AliMpPlaneType planeType,
+                              AliMp::PlaneType planeType,
                               TList& lines,
                               Double_t& scale,
                               Bool_t& flipX, Bool_t& flipY,
@@ -463,7 +463,7 @@ AliMpTriggerReader::ReadLines(const char* slatType,
                        " destLine %d\n",slatType,scale,flipX,flipY,
                        srcLine,destLine));
   
-  TString filename(AliMpFiles::SlatFilePath(kStationTrigger,slatType,
+  TString filename(AliMpFiles::SlatFilePath(AliMp::kStationTrigger,slatType,
                                             planeType).Data());
   std::ifstream in(filename.Data());
   if (!in.good()) 
@@ -598,14 +598,14 @@ AliMpTriggerReader::ReadPCB(const char* pcbType)
     pcbName = pcbName(0,pos);
   }
   
-  std::ifstream in(AliMpFiles::SlatPCBFilePath(kStationTrigger,pcbName).Data());
+  std::ifstream in(AliMpFiles::SlatPCBFilePath(AliMp::kStationTrigger,pcbName).Data());
   if (!in.good()) 
   {
     AliErrorClass(Form("Cannot open file for PCB %s",pcbName.Data()));
     return 0;
   }
  
-  AliMpMotifReader reader(kStationTrigger,kNonBendingPlane); 
+  AliMpMotifReader reader(AliMp::kStationTrigger,AliMp::kNonBendingPlane); 
   // note that the nonbending
   // parameter is of no use for trigger, as far as reading motif is 
   // concerned, as all motifs are supposed to be in the same directory
@@ -713,7 +713,7 @@ AliMpTriggerReader::ReadPCB(const char* pcbType)
 
 //_____________________________________________________________________________
 AliMpTrigger*
-AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType)
+AliMpTriggerReader::ReadSlat(const char* slatType, AliMp::PlaneType planeType)
 {
   ///
   /// Create a new AliMpTrigger object, by reading it from file.
index fc43d52c0ccfbc7da67c64ff5d1c7377029dd9e7..fe9ebe21e0b06b121eba5dd58db08eefc3cbde2f 100644 (file)
 #  include "AliMpPlaneType.h"
 #endif
 
-#ifndef ALI_MP_STATION_TYPE_H
-#  include "AliMpStationType.h"
-#endif
-
 class AliMpSlatMotifMap;
 class AliMpSlat;
 class AliMpTrigger;
@@ -45,14 +41,14 @@ class AliMpTriggerReader : public TObject
   AliMpTriggerReader(AliMpSlatMotifMap& motifMap);
   virtual ~AliMpTriggerReader();
 
-  AliMpTrigger* ReadSlat(const char* slatType, AliMpPlaneType planeType);
+  AliMpTrigger* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
 
   AliMpPCB* ReadPCB(const char* pcbType);
   
 private:
     
   AliMpSlat* BuildSlat(const char* slatName, 
-                              AliMpPlaneType planeType,
+                              AliMp::PlaneType planeType,
                               const TList& descriptionLines,
                               Double_t scale=1.0);
   
@@ -77,7 +73,7 @@ private:
   AliMpPCB* PCB(const char* pcbType); 
   
   void ReadLines(const char* slatType,
-                        AliMpPlaneType planeType,
+                        AliMp::PlaneType planeType,
                         TList& lines,
                         Double_t& scale, Bool_t& flipX, Bool_t& flipY,
                         Int_t& srcLine, Int_t& destLine);
index e2aefb7bd7963508bd7c43f7ed4ed6e32b2e0cfa..697a584bf2392ad2954175cdedd1c4980815acd7 100644 (file)
@@ -295,7 +295,7 @@ AliMpTriggerSegmentation::PadByPosition(const TVector2& position,
 }
 
 //_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
 AliMpTriggerSegmentation::PlaneType() const
 {
   return Slat()->PlaneType();
index d369f2545d47c30daa37625ab4a1e45ef2960c37..31f6edc00e54c0133f2412ac5c69a9dcf86f1bd2 100644 (file)
@@ -59,7 +59,7 @@ public:
    
   virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
   
-  AliMpPlaneType PlaneType() const;
+  AliMp::PlaneType PlaneType() const;
   
   TVector2 Dimensions() const;
   
index fe35b1b4f6a5b2f76187d04fd13eb1f56c327087..f51b0780d03507a0632feedfc03718aebbf34160 100644 (file)
@@ -60,7 +60,7 @@ class AliMpVSegmentation : public TObject
     
     virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
 
-    virtual AliMpPlaneType PlaneType() const = 0;
+    virtual AliMp::PlaneType PlaneType() const = 0;
     
     /// Gives the half-sizes (in cm) of the underlying detection element.
     virtual TVector2 Dimensions() const = 0;
index e21c580097820b7d97de806809b64f630a30b6d0..215ded1ff06e5939c80cf783eea38b58f136ced7 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for testing which pad is seen as "existing" by AliMpSector.
 
-void testAllIndices(AliMpStationType station = kStation1,
-                    AliMpPlaneType plane = kBendingPlane) 
+void testAllIndices(AliMp::StationType station = AliMp::kStation1,
+                    AliMp::PlaneType plane = AliMp::kBendingPlane) 
 {
   AliMpSectorReader r(station, plane);
 
@@ -28,7 +28,7 @@ void testAllIndices(AliMpStationType station = kStation1,
 
   Int_t nx2 = 950/2;
   Int_t ny2 = 950/2;
-  if (station == kStation2) {
+  if (station == AliMp::kStation2) {
     nx2 = 1200/2;
     ny2 = 1200/2;
   }
index 1b9564c1c9b53dc76aa95c7f2a6650ddad9fb14e..8b8042efd047b593af8df6d5f3e2e102843e162f 100644 (file)
@@ -24,8 +24,8 @@ void MarkPads(AliMpVPadIterator& it,Int_t xmax,Int_t ymax,Bool_t print=kTRUE)
   }
 }
 
-void testAnyPadIterators(AliMpStationType station = kStation1,
-                         AliMpPlaneType plane = kBendingPlane, 
+void testAnyPadIterators(AliMp::StationType station = AliMp::kStation1,
+                         AliMp::PlaneType plane = AliMp::kBendingPlane, 
                         Bool_t rootInput = false,
                          Int_t i=50, Int_t j=50)
 {
index 29472e4777377a56956ede6590c1bb94febb2f54..cd0e75463c19d426bdbadfac50cfc08134dbbafc 100644 (file)
@@ -5,15 +5,14 @@
 
 void testDE() 
 {
-  AliMpSegFactory factory; 
-
   AliMpDEIterator it;
   for ( it.First(); ! it.IsDone(); it.Next() ) {
-    cout << "In detection element: " << it.CurrentDE() << endl;
+    cout << "In detection element: " << it.CurrentDEId() << endl;
 
     // Create/get segmentation via factory
     AliMpVSegmentation* segmentation 
-      = factory.CreateMpSegmentation(it.CurrentDE(), 0);
+      = AliMpSegmentation::Instance()
+          ->GetMpSegmentation(it.CurrentDEId(), kCath0);
       
     // Print number of pads
    cout << "   number of pads: " << segmentation->NofPads() << endl;   
@@ -25,7 +24,4 @@ void testDE()
     
     cout << "   found pad: " << pad << endl << endl;
   }
-
-  // Delete all created segmentations
-  factory.DeleteSegmentations();
 }
index d07bf0da7955eb8bf1dc0d82788aa47e52af0046..5b0336815e7ee0d3e30c4dd740139b2513e122d8 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for testing which pad is seen as "existing" by AliMpSector.
 
-void testExistingPads(AliMpStationType station = kStation1,
-                      AliMpPlaneType plane = kBendingPlane, 
+void testExistingPads(AliMp::StationType station = AliMp::kStation1,
+                      AliMp::PlaneType plane = AliMp::kBendingPlane, 
                      Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
index 0bb2454f4497dd9441855c26a8e431214594e849..6ecdd471ce7df4992198120d2640e38b0a211b5c 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <iomanip>
 
-void testExistingPads2(AliMpStationType station = kStation1,
-                       AliMpPlaneType plane = kBendingPlane) 
+void testExistingPads2(AliMp::StationType station = AliMp::kStation1,
+                       AliMp::PlaneType plane = AliMp::kBendingPlane) 
 {
   AliMpSectorReader r(station, plane);
   AliMpSector* sector = r.BuildSector();
@@ -22,7 +22,7 @@ void testExistingPads2(AliMpStationType station = kStation1,
   // First loop over indices
   cout << "Iterating via indices ..." << endl;
   Int_t counter1 = 0;
-  if ( sector->GetDirection() == kX )
+  if ( sector->GetDirection() == AliMp::kX )
     for (Int_t i=1; i<segmentation.MaxPadIndexX()+1; i++) {
       for (Int_t j=1; j<segmentation.MaxPadIndexY()+1; j++) {
         AliMpIntPair indices(i,j);
@@ -32,7 +32,7 @@ void testExistingPads2(AliMpStationType station = kStation1,
       }
     }
 
-  if ( sector->GetDirection() == kY )
+  if ( sector->GetDirection() == AliMp::kY )
     for (Int_t j=1; j<segmentation.MaxPadIndexY()+1; j++) {
       for (Int_t i=1; i<segmentation.MaxPadIndexX()+1; i++) {
         AliMpIntPair indices(i,j);
index f1b1184f1632e0a538138417d18d82a256b90107..ed4f319e4db99ad6459828420e488e61ca7f26b7 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for drawing sector data.
 
-void testGraphics(AliMpStationType station = kStation1,
-                  AliMpPlaneType plane = kBendingPlane,
+void testGraphics(AliMp::StationType station = AliMp::kStation1,
+                  AliMp::PlaneType plane = AliMp::kBendingPlane,
                  Bool_t rootInput = false) 
 {
   AliMpSector *sector = 0;
index 5e0703d95760af396fdd679cf493c236f88bdd4f..82e0545f10a48bb995c6f3580a2d4026c46f56f8 100644 (file)
@@ -39,7 +39,7 @@ void testGraphicsMotif(Option_t* motifType = "R43", const TVector2& padSizes = T
   // Warning : this function leaks memory. But should be fine as only used 
   // interactively to check a few motifs at once...
   //
-  AliMpMotifReader reader(kStation345,kBendingPlane);
+  AliMpMotifReader reader(AliMp::kStation345,AliMp::kBendingPlane);
   AliMpMotifType* type = reader.BuildMotifType(motifType);
   if (!type)
   {
@@ -63,7 +63,7 @@ void testGraphicsMotif(Option_t* motifType = "R43", const TVector2& padSizes = T
 //220000N
 //122000NR1
 //112200NR2
-void testGraphicsSlat(AliMpPlaneType planeType = kBendingPlane, 
+void testGraphicsSlat(AliMpPlaneType planeType = AliMp::kBendingPlane, 
                      Option_t* option = "PMCI",
                      Bool_t saveJPG = false)
 {
index db421dedb4b0b89ee8fcee76b9bd32a84cf47d65..20e666a80cdbd8258474c9ae2213774eda93dd2b 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for indices limits.
 
-void testIndicesLimits(AliMpStationType station = kStation1,
-                       AliMpPlaneType plane = kBendingPlane, 
+void testIndicesLimits(AliMp::StationType station = AliMp::kStation1,
+                       AliMp::PlaneType plane = AliMp::kBendingPlane, 
                       Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
index 18dc5aad9a411e8e7b366aa1dfa36a5659c2371f..c167748b63d98f13462b3e6c5303ffd0d4cbdb3a 100644 (file)
@@ -22,7 +22,6 @@
 
 #if !defined(__CINT__) || defined(__MAKECINT__)
 
-#include "AliMpStationType.h"
 #include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
 #include "AliMpDEManager.h"
index 2c2d998d1e54882fd5f5bd6212730f78343f6ae0..65a188a92d13d5be0951b94d22f5c59d20cec3f3 100644 (file)
@@ -3,20 +3,20 @@
 //
 // Test macro for reading motif type data and iterate over them.
 
-void testMotifTypeIterators(AliMpStationType station = kStation1,
-                            AliMpPlaneType plane = kBendingPlane,
+void testMotifTypeIterators(AliMp::StationType station = AliMp::kStation1,
+                            AliMp::PlaneType plane = AliMp::kBendingPlane,
                            Bool_t rootInput = false)
 {
   TString names;
   TString names2;
   Int_t nv =0;
-  if ( station == kStation1 )
-    if ( plane == kBendingPlane ) 
+  if ( station == AliMp::kStation1 )
+    if ( plane == AliMp::kBendingPlane ) 
       names ="ABCDEFGHI";
     else
       names = "ABCDEFGHIJKLMN";
-  else if ( station == kStation2 ) 
-    if ( plane == kBendingPlane ) {
+  else if ( station == AliMp::kStation2 ) 
+    if ( plane == AliMp::kBendingPlane ) {
       names ="ABCDEFGHIJKLMNOPQRSTUVWXY";
       names2 ="abcdefghimnptuvvvvv";
       nv = 5;
index 340e6158f0af908eaeb0278d5ba13fe493f787e6..c8238938f152516f94fe1df95961fda8341761dd 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for reading  sector, and iterate over it
 
-void testNeighboursPadIterator(AliMpStationType station = kStation1,
-                               AliMpPlaneType plane = kBendingPlane, 
+void testNeighboursPadIterator(AliMp::StationType station = AliMp::kStation1,
+                               AliMp::PlaneType plane = AliMp::kBendingPlane, 
                               Bool_t rootInput = false,
                                Int_t i=50, Int_t j=50)
 {
index 371b4631605a7ba91e92db3a86140f16cf5d7b26..a4fc70e81d8c9d8f31d607d7987b2c16d04a44ab 100644 (file)
@@ -4,8 +4,8 @@
 // Test macro for testing retrieving of pad dimensions from
 // the map in AliMpSectorSegmentation.
 
-void testPadDimensions(AliMpStationType station = kStation1,
-                       AliMpPlaneType plane = kBendingPlane,
+void testPadDimensions(AliMp::StationType station = AliMp::kStation1,
+                       AliMp::PlaneType plane = AliMp::kBendingPlane,
                       Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
index 1c22f91819154b279167b045c6ff563091e29233..2f369a156e2417dc9af2ee344064cd666d8e9cf7 100644 (file)
@@ -5,8 +5,8 @@
 // all pads up, down, right, left from this pad
 // (up to the plane border).
 
-void testPadsUpEtc(AliMpStationType station = kStation1,
-                   AliMpPlaneType  plane = kBendingPlane,
+void testPadsUpEtc(AliMp::StationType station = AliMp::kStation1,
+                   AliMp::PlaneType  plane = AliMp::kBendingPlane,
                   Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
index 65bd8287a9347545d7e7262842a05ff38b3c7bfb..d239530151d9ad8afcba143a2f366987902ed5b1 100644 (file)
@@ -4,10 +4,10 @@
 // Test macro for making an output file, where all mapping elements
 // indices & positions are written.
 
-void testPrintLimits(AliMpStationType station = kStation1,
-                    AliMpPlaneType plane = kBendingPlane, 
-                   Bool_t rootInput = false,
-                   ostream& out=cout)
+void testPrintLimits(AliMp::StationType station = AliMp::kStation1,
+                     AliMp::PlaneType plane = AliMp::kBendingPlane, 
+                    Bool_t rootInput = false,
+                    ostream& out=cout)
 {
   AliMpSector *sector = 0;
   if (!rootInput) {
index bdf743f28e72e10f512911f4971f2ca228a5d0fa..4c01df5c04ae71b8fc28ab31e091043da7a75c30 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for reading motif type data.
 
-void testReadMotifType(AliMpStationType station = kStation1,
-                       AliMpPlaneType plane = kBendingPlane,
+void testReadMotifType(AliMp::StationType station = AliMp::kStation1,
+                       AliMp::PlaneType plane = AliMp::kBendingPlane,
                       Bool_t rootInput = false)
 {
   AliMpMotifReader r(station, plane);
@@ -13,13 +13,13 @@ void testReadMotifType(AliMpStationType station = kStation1,
   TString names;
   TString names2;
   Int_t nv =0;
-  if ( station == kStation1 )
-    if ( plane == kBendingPlane ) 
+  if ( station == AliMp::kStation1 )
+    if ( plane == AliMp::kBendingPlane ) 
       names ="ABCDEFGHI";
     else
       names = "ABCDEFGHIJKLMN";
-  else if ( station == kStation2 ) 
-    if ( plane == kBendingPlane ) {
+  else if ( station == AliMp::kStation2 ) 
+    if ( plane == AliMp::kBendingPlane ) {
       names ="ABCDEFGHIJKLMNOPQRSTUVWXY";
       names2 ="abcdefghimnptuv";
       nv = 5;
index 28448d44440ddfbf19eeed85f3e84b76f213ae71..f436e935c5f4f42eb30b3ebdabfec137890e00ae 100644 (file)
@@ -30,7 +30,7 @@ Int_t test(AliMpMotifReader& r, const char letter, Int_t from, Int_t to)
 
 void testReadMotifTypeSlat()
 {
-  AliMpMotifReader r(kStation345,kNonBendingPlane); 
+  AliMpMotifReader r(AliMp::kStation345,AliMp::kNonBendingPlane); 
   // note that second parameter is not used for station345.
 
   Int_t n = 0;
index 4e05b8500b5ea5496d542c99a39e6a76a076fde9..248083c75689eedb7f898af5610b570cd8afe900 100644 (file)
@@ -5,8 +5,8 @@
 
 #include <iomanip>
 
-void testReadSector(AliMpStationType station = kStation1,
-                    AliMpPlaneType plane = kBendingPlane, 
+void testReadSector(AliMp::StationType station = AliMp::kStation1,
+                    AliMp::PlaneType plane = AliMp::kBendingPlane, 
                    Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
@@ -39,16 +39,16 @@ void testReadSector(AliMpStationType station = kStation1,
   cout << endl;
 
   // Find row test
-  if (plane == kBendingPlane)
+  if (plane == AliMp::kBendingPlane)
     cout << "0th row low border " << sector->FindRow(TVector2(0., 0.))->GetID() << endl;
-  if (plane == kNonBendingPlane)
+  if (plane == AliMp::kNonBendingPlane)
     cout << "0th row low border " << sector->FindRow(TVector2(0., 0.215))->GetID() << endl;
   cout << "in 0th row         " << sector->FindRow(TVector2(0., 2.5))->GetID() << endl;
   cout << "0th row up border  " << sector->FindRow(TVector2(0., 6.72))->GetID() << endl;
   cout << "in 4th row         " << sector->FindRow(TVector2(0., 30.))->GetID() << endl;
-  if (plane == kBendingPlane)
+  if (plane == AliMp::kBendingPlane)
     cout << "12th row up border " << sector->FindRow(TVector2(0., 89.46))->GetID() << endl;
-  if (plane == kNonBendingPlane)
+  if (plane == AliMp::kNonBendingPlane)
     cout << "12th row up border " << sector->FindRow(TVector2(0., 84.84))->GetID() << endl;
   cout << endl;
   
@@ -84,7 +84,7 @@ void testReadSector(AliMpStationType station = kStation1,
   }
 
   // Find special motif test
-  if (plane == kNonBendingPlane) {
+  if (plane == AliMp::kNonBendingPlane) {
   
     Int_t ids[6] = { 20, 46, 47, 74, 75, 76 };
     for (Int_t i=0; i<6 ; i++) {
index fa8aaf789585891a031e0aa7d92fba414334bc5c..dc3056360bc2b517f7f36cddc014a66565768c43 100644 (file)
@@ -27,8 +27,8 @@ void testReadSlat()
     TString slat( ((TObjString*)slatsToTest[i])->String());
     
     cout << "Trying to read " << slat << endl;
-    AliMpSlat* b = AliMpSt345Reader::ReadSlat(slat.Data(),kBendingPlane);
-    AliMpSlat* nb = AliMpSt345Reader::ReadSlat(slat.Data(),kNonBendingPlane);
+    AliMpSlat* b = AliMpSt345Reader::ReadSlat(slat.Data(),AliMp::kBendingPlane);
+    AliMpSlat* nb = AliMpSt345Reader::ReadSlat(slat.Data(),AliMp::kNonBendingPlane);
     if ( !b ) cout << " Missing BENDING !" << endl;
     if ( !nb ) cout << " Missing NONBENDING !" << endl;
     if ( b && nb )
index 9e5eaddc7be29d72754d39007052952e6badf8af..4e9fbe98727833f9e42dbde435d9c8d8bd928dca 100644 (file)
@@ -47,8 +47,8 @@ void MarkPads(AliMpVPadIterator& it, Double_t xmax, Double_t ymax,
   //timer.Print();
 }
 
-void testSectorAreaIterator(AliMpStationType station = kStation1,
-                            AliMpPlaneType plane = kBendingPlane,
+void testSectorAreaIterator(AliMp::StationType station = AliMp::kStation1,
+                            AliMp::PlaneType plane = AliMp::kBendingPlane,
                            Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
index 1c1cb4120ff6f30db83c0549400e6a5f87565ebb..d03ac2c1a59a8a68a653db9a9327371f8561e4f6 100644 (file)
@@ -4,8 +4,8 @@
 // Test macro for which verify that all FindPosition, FindIndices
 // and FindLocation methods are consistents between them.
 
-void testSectorFind(AliMpStationType station = kStation1,
-                    AliMpPlaneType plane = kBendingPlane,
+void testSectorFind(AliMp::StationType station = AliMp::kStation1,
+                    AliMp::PlaneType plane = AliMp::kBendingPlane,
                    Bool_t rootInput = false) 
 {
   AliMpSector *sector = 0;
index c5147eeada8ce8fdac07791b297a4861d1d94da2..affa16542783d462fbaed771a40af3563f69984c 100644 (file)
@@ -3,8 +3,8 @@
 //
 // Test macro for reading  sector, and iterate over it
 
-void testSectorPadIterators(AliMpStationType station = kStation1,
-                            AliMpPlaneType plane = kBendingPlane,
+void testSectorPadIterators(AliMp::StationType station = AliMp::kStation1,
+                            AliMp::PlaneType plane = AliMp::kBendingPlane,
                            Bool_t rootInput = false)
 {
   AliMpSector *sector = 0;
index 801a60f00dbc3c51610fbe751be75958d52bc1e4..12dbb878837149ca0365b5d1a15e33d0c8e93d63 100644 (file)
@@ -101,9 +101,9 @@ bool testAllDetelem()
       slattypes.insert(it->second);
       std::cout << it->first << " : " << it->second <<  " ";
       AliMpSlat* b = static_cast<AliMpSlat*>
-       (AliMpSegmentationManager::Segmentation(it->first,kBendingPlane));
+       (AliMpSegmentationManager::Segmentation(it->first,AliMp::kBendingPlane));
       AliMpSlat* nb = static_cast<AliMpSlat*>
-       (AliMpSegmentationManager::Segmentation(it->first,kNonBendingPlane));
+       (AliMpSegmentationManager::Segmentation(it->first,AliMp::kNonBendingPlane));
       std::cout << " B : " << b << " NB : " << nb;
       Double_t bx = 0.0;
       Double_t nbx = 0.0;
@@ -193,7 +193,7 @@ bool getSegmentation(int detElemId,
   AliMUONChamber& chamber = muon->Chamber(ichamber);
 
   int icathode = 1;
-  if ( bendingornot == kNonBendingPlane ) icathode = 2;
+  if ( bendingornot == AliMp::kNonBendingPlane ) icathode = 2;
 
   AliMUONGeometrySegmentation* gs = chamber.SegmentationModel2(icathode);
   if (!gs) return error(Form("Cannot get cathode %d",icathode));
@@ -298,11 +298,11 @@ void countPads(Int_t d1, Int_t d2)
   AliMUONVGeometryDESegmentation* o;
   AliMUONVGeometryDESegmentation* n;
 
-  AliMpPlaneType pt[] = { kNonBendingPlane, kBendingPlane };
+  AliMpPlaneType pt[] = { AliMp::kNonBendingPlane, AliMp::kBendingPlane };
 
   for ( int ipt = 0; ipt < 2; ++ipt )
     {
-      std::cout << ( (pt[ipt] == kNonBendingPlane )?"NonBending"
+      std::cout << ( (pt[ipt] == AliMp::kNonBendingPlane )?"NonBending"
                     : "Bending" )
                << std::endl;
       Int_t p_nnpads = 0;
index 473733770aae000ee8b0185214c350d04d9c0e88..81ca9de434892b13404d3092ea4027a35e453d19 100644 (file)
@@ -228,8 +228,8 @@ void testSlatPads(const char* slatlist)
   {
     TString slatName( ((TObjString*)slatsToTest[i])->String());
     
-    AliMpSlat* bending = reader.ReadSlat(slatName.Data(),kBendingPlane);
-    AliMpSlat* nonbending = reader.ReadSlat(slatName.Data(),kNonBendingPlane);
+    AliMpSlat* bending = reader.ReadSlat(slatName.Data(),AliMp::kBendingPlane);
+    AliMpSlat* nonbending = reader.ReadSlat(slatName.Data(),AliMp::kNonBendingPlane);
   
     timerCount.Start(false);
     Int_t NumberOfBendingPads = Count(*bending);
index fa34e483477de9052977d988ca951143d86caef6..32a85e0c0a72c95992a5931b37b8fa72ef6c2f01 100644 (file)
@@ -5,7 +5,7 @@
 
 void testUpdateGlobalIndices()
 {
-  AliMpSectorReader reader(kStation1, kNonBendingPlane);  
+  AliMpSectorReader reader(AliMp::kStation1, AliMp::kNonBendingPlane);  
   //reader.SetVerboseLevel(1);
   
   // Read data