]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In mapping:
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Feb 2009 12:10:48 +0000 (12:10 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Feb 2009 12:10:48 +0000 (12:10 +0000)
Moving kStation1 and kStation2 from AliMp::StationType;
(there is kept only one value for stations 1 and 2:
kStation12) into a new enum, AliMq::Station12Type.
This should prevent from eventual mixing of these
values with the new value kStation12, representing sector
stations type (analogue to kStation345).

33 files changed:
MUON/AliMUONClusterFinderPeakFit.cxx
MUON/AliMUONClusterFinderSimpleFit.cxx
MUON/AliMUONClusterSplitterMLEM.cxx
MUON/AliMUONGeometryTransformer.cxx
MUON/AliMUONHVSubprocessor.cxx
MUON/AliMUONPadStatusMaker.cxx
MUON/AliMUONPainterHelper.cxx
MUON/MUONmappingLinkDef.h
MUON/libMUONmapping.pkg
MUON/mapping/AliMpBusPatch.cxx
MUON/mapping/AliMpDCSNamer.cxx
MUON/mapping/AliMpDDLStore.cxx
MUON/mapping/AliMpDEManager.cxx
MUON/mapping/AliMpDEManager.h
MUON/mapping/AliMpDEStore.cxx
MUON/mapping/AliMpDEStore.h
MUON/mapping/AliMpDEVisu.cxx
MUON/mapping/AliMpDetElement.cxx
MUON/mapping/AliMpDetElement.h
MUON/mapping/AliMpFiles.cxx
MUON/mapping/AliMpFiles.h
MUON/mapping/AliMpManuStore.cxx
MUON/mapping/AliMpMotifReader.cxx
MUON/mapping/AliMpMotifReader.h
MUON/mapping/AliMpSectorReader.cxx
MUON/mapping/AliMpSectorReader.h
MUON/mapping/AliMpSegmentation.cxx
MUON/mapping/AliMpSt345Reader.cxx
MUON/mapping/AliMpStation12Type.cxx [new file with mode: 0644]
MUON/mapping/AliMpStation12Type.h [new file with mode: 0644]
MUON/mapping/AliMpStationType.cxx
MUON/mapping/AliMpStationType.h
MUON/mapping/AliMpTriggerReader.cxx

index 9dcfced9981bcf4a70a9e97fb24125e587fa7461..be4ab0ba6482bfaaa603e827ccd76e7cd89eb456 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "AliMpDEManager.h"
 #include "AliMpPad.h"
-#include "AliMpStationType.h"
 #include "AliMpVSegmentation.h"
 
 #include "AliLog.h"
@@ -192,13 +191,13 @@ AliMUONClusterFinderPeakFit::Prepare(Int_t detElemId, TClonesArray* pads[2],
   
   AliDebug(3,Form("EVT %d DE %d",fEventNumber,fDetElemId));
   
-  AliMp::StationType stationType = AliMpDEManager::GetStationType(fDetElemId);
+  AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(fDetElemId);
   
   Float_t kx3 = AliMUONConstants::SqrtKx3();
   Float_t ky3 = AliMUONConstants::SqrtKy3();
   Float_t pitch = AliMUONConstants::Pitch();
   
-  if ( stationType == AliMp::kStation1 )
+  if ( stationType == AliMq::kStation1 )
   {
     kx3 = AliMUONConstants::SqrtKx3St1();
     ky3 = AliMUONConstants::SqrtKy3St1();
index b2b126cdf06458b77d1a0ba5804a88196b837006..314f27d37a8e07d43bd53cc84083e2c0d60181ec 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "AliLog.h"
 #include "AliMpDEManager.h"
-#include "AliMpStationType.h"
 #include "AliMUONCluster.h"
 #include "AliMUONConstants.h"
 #include "AliMUONVDigit.h"
@@ -119,13 +118,13 @@ AliMUONClusterFinderSimpleFit::Prepare(Int_t detElemId,
   // FIXME: should we get the Mathieson from elsewhere ?
   
   // Find out the DetElemId
-  AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
+  AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(detElemId);
   
   Float_t kx3 = AliMUONConstants::SqrtKx3();
   Float_t ky3 = AliMUONConstants::SqrtKy3();
   Float_t pitch = AliMUONConstants::Pitch();
   
-  if ( stationType == AliMp::kStation1 )
+  if ( stationType == AliMq::kStation1 )
   {
     kx3 = AliMUONConstants::SqrtKx3St1();
     ky3 = AliMUONConstants::SqrtKy3St1();
index da1f0ff6bdc34f67ccf0b3c4c5ef5b5a58594d31..589b91db195c67a090378b7fe2dda041474cf755 100644 (file)
@@ -32,7 +32,6 @@
 #include "AliMUONCluster.h"
 #include "AliMUONPad.h"
 #include "AliMUONPad.h"
-#include "AliMpStationType.h"
 #include "AliMUONConstants.h"
 #include "AliMpDEManager.h"
 #include "AliMUONMathieson.h"
@@ -68,13 +67,13 @@ fDebug(0)
 {
   /// Constructor
   
-  AliMp::StationType stationType = AliMpDEManager::GetStationType(fDetElemId);
+  AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(fDetElemId);
   
   Float_t kx3 = AliMUONConstants::SqrtKx3();
   Float_t ky3 = AliMUONConstants::SqrtKy3();
   Float_t pitch = AliMUONConstants::Pitch();
   
-  if ( stationType == AliMp::kStation1 )
+  if ( stationType == AliMq::kStation1 )
   {
     kx3 = AliMUONConstants::SqrtKx3St1();
     ky3 = AliMUONConstants::SqrtKy3St1();
index 1c6dca5f8a1acfa6b8155a6a5a1691b7991d5526..03eaa3b3d78aef8d87efa5c1687975246a69a6f3 100644 (file)
@@ -144,7 +144,7 @@ AliMUONGeometryTransformer::CreateDEAreas() const
     Double_t dx(seg->Dimensions().X());
     Double_t dy(seg->Dimensions().Y());
     
-    if ( stationType == AliMp::kStation1 || stationType == AliMp::kStation2 ) 
+    if ( stationType == AliMp::kStation12 ) 
     {
       Double_t xmin(FLT_MAX);
       Double_t xmax(-FLT_MAX);
index 0f14525ea99ffd0bf09491bc095483c1ff80e249..c4529d6a7f65b2617826a994e8aad267ef606c27 100644 (file)
@@ -85,8 +85,7 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap)
     
     switch ( AliMpDEManager::GetStationType(detElemId) )
     {
-      case AliMp::kStation1:
-      case AliMp::kStation2:
+      case AliMp::kStation12:
       {
         for ( int i = 0; i <3; ++i)
         {
index 6ebb8db7de87f3abe224bc47d9180fb13450c95c..ce668260a9f5a3b221d461b568ec39dad210cae2 100644 (file)
@@ -450,8 +450,7 @@ AliMUONPadStatusMaker::HVStatus(Int_t detElemId, Int_t manuId) const
   
   switch ( AliMpDEManager::GetStationType(detElemId) )
   {
-    case AliMp::kStation1:
-    case AliMp::kStation2:
+    case AliMp::kStation12:
     {
       int sector = hvNamer.ManuId2Sector(detElemId,manuId);
       if ( sector >= 0 ) 
index aa589f08e3897d49769bb5b6568263a0df7fa7db..89edf7918f76a14fe882fcb2664c20c572d2e204 100644 (file)
@@ -450,7 +450,7 @@ AliMUONPainterHelper::GetSector(Int_t detElemId, AliMp::PlaneType planeType) con
 {
   /// Get a given sector
   AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
-  if ( stationType != AliMp::kStation1 && stationType != AliMp::kStation2 ) return 0x0;
+  if ( stationType != AliMp::kStation12 ) return 0x0;
   
   AliMp::CathodType cathodeType = AliMpDEManager::GetCathod(detElemId,planeType);
   
index 39bf64b6fa930bb18ca52f27a62c8d706cf40e88..f07889a93b0343def988249c87bb4f99e6b3b756 100644 (file)
@@ -27,8 +27,9 @@
 #pragma link C++ enum   AliMp::Direction;
 #pragma link C++ enum   AliMp::XDirection;
 #pragma link C++ enum   AliMp::PlaneType;
-#pragma link C++ enum   AliMp::StationType;
 #pragma link C++ enum   AliMp::CathodType;
+#pragma link C++ enum   AliMp::StationType;
+#pragma link C++ enum   AliMq::Station12Type;
 
 #pragma link C++ function operator<<(ostream& ,const AliMpPad& );
 #pragma link C++ function operator<<(ostream& ,const AliMpArea& );
index 725135f6bcdc534f30d7be4eca343c23e2a764e2..304714bdeda7c6d123811eea356b784b5191e8d8 100644 (file)
@@ -9,8 +9,9 @@
 #
 SRCS +=  \
          mapping/AliMpPlaneType.cxx \
-         mapping/AliMpStationType.cxx \
          mapping/AliMpCathodType.cxx \
+         mapping/AliMpStationType.cxx \
+         mapping/AliMpStation12Type.cxx \
         mapping/AliMpArea.cxx  \
         mapping/AliMpConstants.cxx  \
         mapping/AliMpFiles.cxx  \
index e001cff4fb54c4461058607ae788b486f201ef8d..b8e603fbed9af1c05f0d61b4e637dd2198ea59d0 100644 (file)
@@ -130,7 +130,7 @@ Bool_t AliMpBusPatch::SetNofManusPerModule(Int_t manuNumber)
 /// - for stations 2 there maximum two PCBs per buspatch,
 /// - for slat stations there are maximum three PCBs per buspatch
 
-  if ( AliMpDEManager::GetStationType(fDEId) == AliMp::kStation1) {
+  if ( AliMpDEManager::GetStation12Type(fDEId) == AliMq::kStation1) {
 
     // simply fill the number of manus, no bridge for station 1
        
@@ -138,7 +138,7 @@ Bool_t AliMpBusPatch::SetNofManusPerModule(Int_t manuNumber)
     return true;
   }
 
- if ( AliMpDEManager::GetStationType(fDEId) == AliMp::kStation2) {
+ if ( AliMpDEManager::GetStation12Type(fDEId) == AliMq::kStation2) {
 
     // there is max two patch modules per buspatch
        
index b2b22acde92a434b46e0171340a041f590f6f1b0..c8c00d14394360d96442e1cdde27fa1c4f621de7 100644 (file)
@@ -292,8 +292,7 @@ AliMpDCSNamer::DetElemId2DCS(Int_t detElemId, Int_t& side, Int_t &chId) const
 
   switch ( AliMpDEManager::GetStationType(detElemId) )
   {
-    case AliMp::kStation1:
-    case AliMp::kStation2:
+    case AliMp::kStation12:
     {
       switch (dcsNumber)
       {
@@ -388,8 +387,7 @@ const char*
 
   switch (AliMpDEManager::GetStationType(detElemId))
   {
-    case AliMp::kStation1:
-    case AliMp::kStation2:
+    case AliMp::kStation12:
       return Form(fgkDCSChannelSt12Pattern[side],chamberId,dcsNumber,sector);
       break;
     case AliMp::kStation345:
@@ -598,8 +596,7 @@ AliMpDCSNamer::GenerateAliases() const
       {
        switch ( AliMpDEManager::GetStationType(detElemId) )
        {
-       case AliMp::kStation1:
-       case AliMp::kStation2:
+       case AliMp::kStation12:
          for ( int sector = 0; sector < 3; ++sector)
          {
            aliases->Add(new TObjString(DCSChannelName(detElemId,sector)));
@@ -649,7 +646,7 @@ AliMpDCSNamer::ManuId2Index(Int_t detElemId, Int_t manuId) const
   {
     return ManuId2PCBIndex(detElemId,manuId);
   }
-  else if ( stationType == AliMp::kStation1 || stationType == AliMp::kStation2 ) 
+  else if ( stationType == AliMp::kStation12 ) 
   {
     return ManuId2Sector(detElemId,manuId);
   }
@@ -692,9 +689,9 @@ AliMpDCSNamer::ManuId2Sector(Int_t detElemId, Int_t manuId) const
   Double_t x = lowerLeft.X()*10.0; // cm -> mm
   Int_t isector(-1);
 
-  AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
+  AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(detElemId);
   
-  if ( stationType == AliMp::kStation1 ) 
+  if ( stationType == AliMq::kStation1 ) 
   {
     if ( x < -10 ) AliFatal("");
     
@@ -746,8 +743,7 @@ Bool_t AliMpDCSNamer::CheckConsistency(Int_t detElemId) const
   TString requestInfo;
   switch(AliMpDEManager::GetStationType(detElemId))
   {
-  case AliMp::kStation1:
-  case AliMp::kStation2:
+  case AliMp::kStation12:
   case AliMp::kStation345:
     if (fDetector == kTrackerDet) isConsistent = kTRUE;
     requestInfo = "TRACKER";
index a71e94147e4be9eceba646f4f626d97abfca78f2..0828d001eed831d0d3eff79127e358b00dbf3589 100644 (file)
@@ -252,7 +252,7 @@ Bool_t AliMpDDLStore::ReadDDLs()
             TString sManu = ((TObjString*)stringList->At(3))->GetString();
             AliMpHelper::DecodeName(sManu,',',fManuList12[GetManuListIndex(idDE)]);
 
-            if(AliMpDEManager::GetStationType(idDE) == AliMp::kStation2) {
+            if(AliMpDEManager::GetStation12Type(idDE) == AliMq::kStation2) {
                 TString sManuBridge = ((TObjString*)stringList->At(4))->GetString();
                 AliMpHelper::DecodeName(sManuBridge,',',fManuBridge2[GetManuListIndex(idDE)]);
             }
@@ -568,7 +568,7 @@ Bool_t AliMpDDLStore::SetPatchModules()
             Bool_t newResult = false;
             Int_t idDE = busPatch->GetDEId();
 
-            if (AliMpDEManager::GetStationType(idDE) == AliMp::kStation2 )
+            if (AliMpDEManager::GetStation12Type(idDE) == AliMq::kStation2 )
                 newResult = busPatch->SetNofManusPerModule(fManuBridge2[GetManuListIndex(idDE)].At(i));
             else
                 newResult = busPatch->SetNofManusPerModule();
index de6871c0cb7cde9c71f1f490881adc11ffb56bf5..e85b8491ad48492740f7731859c88316a58468c4 100644 (file)
@@ -186,12 +186,27 @@ AliMp::StationType AliMpDEManager::GetStationType(Int_t detElemId)
 
   if ( ! IsValidDetElemId(detElemId, true) ) {
     AliFatalClass("Cannot return AliMp::StationType value.");
-    return AliMp::kStation1;
+    return AliMp::kStation12;
   }  
   
   return GetDetElement(detElemId)->GetStationType();
 }
 
+//______________________________________________________________________________
+AliMq::Station12Type AliMpDEManager::GetStation12Type(Int_t detElemId)
+{
+/// Return station12 type                                                    \n
+/// Failure causes Fatal error - as AliMp::StationNumber has no possibility
+/// to return undefined value
+
+  if ( ! IsValidDetElemId(detElemId, true) ) {
+    AliFatalClass("Cannot return AliMp::Station12Type value.");
+    return AliMq::kNotSt12;
+  }  
+  
+  return GetDetElement(detElemId)->GetStation12Type();
+}
+
 //______________________________________________________________________________
 AliMp::CathodType 
 AliMpDEManager::GetCathod(Int_t detElemId, AliMp::PlaneType planeType)
index 4953c91e4b74b24bc3353b8ad679768fd9b01fe2..0849742d94c14f0d3a722051664448fa499f47ec 100644 (file)
@@ -25,8 +25,9 @@
 
 #include "AliMpExMap.h"
 #include "AliMpPlaneType.h"
-#include "AliMpStationType.h"
 #include "AliMpCathodType.h"
+#include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
 #include "AliMpDEIterator.h"
 
 class AliMpDetElement;
@@ -44,9 +45,10 @@ class AliMpDEManager : public  TObject {
 
     static Int_t   GetChamberId(Int_t detElemId, Bool_t warn = true);    
     static Int_t   GetGeomModuleId(Int_t detElemId, Bool_t warn = true);    
-    static AliMp::PlaneType   GetPlaneType(Int_t detElemId, AliMp::CathodType cath);
-    static AliMp::StationType GetStationType(Int_t detElemId);
-    static AliMp::CathodType  GetCathod(Int_t detElemId, AliMp::PlaneType planeType);
+    static AliMp::PlaneType     GetPlaneType(Int_t detElemId, AliMp::CathodType cath);
+    static AliMp::CathodType    GetCathod(Int_t detElemId, AliMp::PlaneType planeType);
+    static AliMp::StationType   GetStationType(Int_t detElemId);
+    static AliMq::Station12Type GetStation12Type(Int_t detElemId);
 
     static AliMpDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true);
     static AliMpDetElement* GetDetElement(const TString& deName, Bool_t warn = true);
index df2ac552ca44574026246fb1430ed1d22255f51b..eefadb3246c50195a7a0cf501648dfc9520ae334 100644 (file)
@@ -152,49 +152,10 @@ Bool_t AliMpDEStore::IsPlaneType(const TString& planeTypeName)
   return false;
 }  
 
-//______________________________________________________________________________
-AliMp::PlaneType AliMpDEStore::PlaneType(const TString& planeTypeName)
-{
-/// Return plane type for the given planeTypeName                            \n
-/// Fatal error if planeTypeName is wrong 
-
-  if ( planeTypeName == PlaneTypeName(AliMp::kBendingPlane) ) 
-    return AliMp::kBendingPlane;
-
-  if ( planeTypeName == PlaneTypeName(AliMp::kNonBendingPlane) ) 
-    return AliMp::kNonBendingPlane;
-
-  // Should never reach this line
-  AliFatalClass(Form("No plane type defined for %s", planeTypeName.Data()));
-  return AliMp::kBendingPlane;
-}       
-
-//______________________________________________________________________________
-AliMp::StationType AliMpDEStore::StationType(const TString& stationTypeName)
-{
-/// Return station type for the given stationTypeName                        \n
-/// Fatal error if stationTypeName is wrong 
-
-  if ( stationTypeName == StationTypeName(AliMp::kStation1) )
-    return AliMp::kStation1;
-
-  if ( stationTypeName == StationTypeName(AliMp::kStation2) )
-    return AliMp::kStation2;
-
-  if ( stationTypeName == StationTypeName(AliMp::kStation345) )
-    return AliMp::kStation345;
-
-  if ( stationTypeName == StationTypeName(AliMp::kStationTrigger) ) 
-    return AliMp::kStationTrigger;
-
-  // Should never reach this line
-  AliFatalClass(Form("No station type defined for ", stationTypeName.Data()));
-  return AliMp::kStation1;
-}
-
 //______________________________________________________________________________
 Bool_t
-AliMpDEStore::ReadDENames(AliMp::StationType station)
+AliMpDEStore::ReadDENames(AliMp::StationType station, 
+                          AliMq::Station12Type station12)
 { 
 /// Read det element names for cath = 0 from the file specified by name
 /// and fill the map 
@@ -202,7 +163,7 @@ AliMpDEStore::ReadDENames(AliMp::StationType station)
   // Open stream
   istream& in 
     = fDataStreams.
-        CreateDataStream(AliMpFiles::DENamesFilePath(station));
+        CreateDataStream(AliMpFiles::DENamesFilePath(station, station12));
   
   // Read plane types per cathods
   //
@@ -309,8 +270,8 @@ void AliMpDEStore::FillDEs()
 {
 /// Fill DE names from files
   AliDebugClass(2,"");
-  Bool_t result1 = ReadDENames(AliMp::kStation1);
-  Bool_t result2 = ReadDENames(AliMp::kStation2);
+  Bool_t result1 = ReadDENames(AliMp::kStation12, AliMq::kStation1);
+  Bool_t result2 = ReadDENames(AliMp::kStation12, AliMq::kStation2);
   Bool_t result3 = ReadDENames(AliMp::kStation345);
   Bool_t result4 = ReadDENames(AliMp::kStationTrigger);
   
index 3a5eaaf798233486004f43eefcf5395fff7c182a..9a989969c73421287cd7fa98a75f464f46f98036 100644 (file)
@@ -20,6 +20,7 @@
 #include "AliMpExMap.h"
 #include "AliMpPlaneType.h"
 #include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
 #include "AliMpIntPair.h"
 
 class AliMpDetElement;
@@ -54,10 +55,9 @@ class AliMpDEStore : public  TObject {
 
     // methods
     Bool_t IsPlaneType(const TString& planeTypeName);
-    AliMp::PlaneType   PlaneType(const TString& planeTypeName);
-    AliMp::StationType StationType(const TString& stationTypeName);
-
-    Bool_t ReadDENames(AliMp::StationType stationType);
+    Bool_t ReadDENames(AliMp::StationType stationType, 
+                       AliMq::Station12Type station12Type = AliMq::kNotSt12);
     void   FillDEs();
 
     // static data members     
index d5a7d31db5195a8efc00f690fe35a17a33a0168a..e779a7e24f1a53d36fd8c4c726b517f72eac985f 100644 (file)
@@ -476,7 +476,7 @@ void AliMpDEVisu::DrawQuadrant(Option_t* option, Bool_t popup)
   canvas->Clear();
   
   AliMpDetElement* detElem = AliMpDEManager::GetDetElement(fCurrentDetElem);
-  AliMp::StationType  station = detElem->GetStationType();
+  AliMq::Station12Type  station = detElem->GetStation12Type();
 
   AliMpDataStreams dataStreams;
   
index dc7001168fab3904d63c77e5a99fc2f2a34d0910..69cb7a07c0530a96b7f0ad975b64c5c4476cfcb8 100644 (file)
@@ -160,17 +160,38 @@ AliMp::StationType AliMpDetElement::GetStationType() const
   Int_t chamberId = AliMpDEManager::GetChamberId(fId, false);
   if ( ! AliMpDEManager::IsValidChamberId(chamberId, true) ) {
     AliFatal("Cannot return AliMp::StationType value.");
-    return AliMp::kStation1;
+    return AliMp::kStation12;
   }  
   
-  if ( chamberId ==  0 || chamberId ==  1 )  return AliMp::kStation1;
-  if ( chamberId ==  2 || chamberId ==  3 )  return AliMp::kStation2;
+  if ( chamberId >=  0 && chamberId <=  3 )  return AliMp::kStation12;
   if ( chamberId >=  4 && chamberId <=  9 )  return AliMp::kStation345;
   if ( chamberId >= 10 && chamberId <= 13 )  return AliMp::kStationTrigger;
 
   // Should never get to this line
   AliFatal("Cannot return AliMp::StationType value.");
-  return AliMp::kStation1;
+  return AliMp::kStation12;
+}
+
+//______________________________________________________________________________
+AliMq::Station12Type AliMpDetElement::GetStation12Type() const
+{
+/// Return station12 type                                                      \n
+/// Failure causes Fatal error - as AliMp::Station12Type has no possibility
+/// to return undefined value
+
+  Int_t chamberId = AliMpDEManager::GetChamberId(fId, false);
+  if ( ! AliMpDEManager::IsValidChamberId(chamberId, true) ) {
+    AliFatal("Cannot return AliMp::StationType value.");
+    return AliMq::kNotSt12;
+  }  
+  
+  if ( chamberId ==  0 || chamberId ==  1 )  return AliMq::kStation1;
+  if ( chamberId ==  2 || chamberId ==  3 )  return AliMq::kStation2;
+  if ( chamberId >=  4 || chamberId <= 13 )  return AliMq::kNotSt12;
+
+  // Should never get to this line
+  AliFatal("Cannot return AliMp::StationType value.");
+  return AliMq::kNotSt12;
 }
 
 //______________________________________________________________________________
index 4f9b573ae5e5ea5d3b8169195ea8b303291b9c51..23341236503e371d0aab7e818364b49576ac2cba 100644 (file)
 #include <TExMap.h>
 
 #include "AliMpArrayI.h"
-#include "AliMpStationType.h"
 #include "AliMpPlaneType.h"
 #include "AliMpCathodType.h"
+#include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
 
 #ifndef ALI_MP_EX_MAP_H
 #  include "AliMpExMap.h"
@@ -53,10 +54,11 @@ class AliMpDetElement : public  TObject {
     TString GetSegType() const;
     TString GetSegName(AliMp::CathodType cath) const;
 
-    AliMp::PlaneType   GetPlaneType(AliMp::CathodType cath) const;
-    AliMp::CathodType  GetCathodType(AliMp::PlaneType planeType) const;
-    AliMp::CathodType  GetCathodTypeFromManuId(Int_t manuId) const;
-    AliMp::StationType GetStationType() const;
+    AliMp::PlaneType     GetPlaneType(AliMp::CathodType cath) const;
+    AliMp::CathodType    GetCathodType(AliMp::PlaneType planeType) const;
+    AliMp::CathodType    GetCathodTypeFromManuId(Int_t manuId) const;
+    AliMp::StationType   GetStationType() const;
+    AliMq::Station12Type GetStation12Type() const;
     
     Int_t  GetNofBusPatches() const;
     Int_t  GetBusPatchId(Int_t index) const;
index c4890da18689c5bce6acb86b5a63dc757a245aff..f53ffbea505a07ae4a3a52173e5b8721e2041a71 100755 (executable)
@@ -77,31 +77,31 @@ AliMpFiles::~AliMpFiles()
 }
 
 //
-// private methods
+// public methods
 //
 
 //______________________________________________________________________________
 TString AliMpFiles::PlaneDataDir(AliMp::StationType station, 
+                                 AliMq::Station12Type station12Type,
                                  AliMp::PlaneType plane)
 {
 /// Returns path to data files with sector description
 /// for a specified plane.
 
   switch (station) {
-  case AliMp::kStation1:
-  case AliMp::kStation2:
+  case AliMp::kStation12:
     switch (plane) {
     case AliMp::kBendingPlane:
-      return GetTop() + fgkDataDir + StationDataDir(station) + fgkBendingDir;
+      return GetTop() + fgkDataDir + StationDataDir(station, station12Type) + fgkBendingDir;
       ;;
     case AliMp::kNonBendingPlane:   
-      return GetTop() + fgkDataDir + StationDataDir(station) + fgkNonBendingDir;
+      return GetTop() + fgkDataDir + StationDataDir(station, station12Type) + fgkNonBendingDir;
       ;;
     }   
     break;
   case AliMp::kStation345:
   case AliMp::kStationTrigger:  
-    return GetTop() + fgkDataDir + StationDataDir(station);
+    return GetTop() + fgkDataDir + StationDataDir(station, AliMq::kNotSt12);
     break;
   default:  
     AliFatalClass("Incomplete switch on AliMp::PlaneType");
@@ -111,18 +111,27 @@ TString AliMpFiles::PlaneDataDir(AliMp::StationType station,
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::StationDataDir(AliMp::StationType station)
+TString AliMpFiles::StationDataDir(AliMp::StationType station,
+                                   AliMq::Station12Type station12Type)
 {
 /// Returns the station directory name for the specified station number.
 
   TString stationDataDir(fgkStationDir);
   switch (station) {
-  case AliMp::kStation1: 
-    stationDataDir += "1/";
-    break;
-    ;;
-  case AliMp::kStation2: 
-    stationDataDir += "2/";
+  case AliMp::kStation12: 
+    switch (station12Type) {
+    case AliMq::kStation1:
+      stationDataDir += "1/";
+      break;
+      ;;
+    case AliMq::kStation2:   
+      stationDataDir += "2/";
+      break;
+      ;;
+    case AliMq::kNotSt12:   
+      AliFatalClass("Incorrect switch on AliMq::Station12Type");
+      break;
+    }   
     break;
     ;;
   case AliMp::kStation345: 
@@ -140,10 +149,6 @@ TString AliMpFiles::StationDataDir(AliMp::StationType station)
   return stationDataDir;
 }
 
-//
-// public methods
-//
-
 //______________________________________________________________________________
 TString AliMpFiles::BusPatchFilePath()
 {
@@ -178,11 +183,13 @@ TString AliMpFiles::SerialToBinFilePath()
 
 
 //______________________________________________________________________________
-TString AliMpFiles::DENamesFilePath(AliMp::StationType station)
+TString AliMpFiles::DENamesFilePath(AliMp::StationType station,
+                                    AliMq::Station12Type station12Type)
 {
 /// Return path to data file with DE names for given station.
  
-  return GetTop() + fgkDataDir + StationDataDir(station) + fgkDENames + fgkDataExt;
+  return GetTop() + fgkDataDir + StationDataDir(station, station12Type) 
+           + fgkDENames + fgkDataExt;
 }
 
 //______________________________________________________________________________
@@ -190,7 +197,8 @@ TString AliMpFiles::LocalTriggerBoardMapping()
 {
 /// Return path to data file with local trigger board mapping.
 
-  return GetTop() + fgkDataDir + StationDataDir(AliMp::kStationTrigger) 
+  return GetTop() + fgkDataDir 
+          + StationDataDir(AliMp::kStationTrigger, AliMq::kNotSt12) 
           + fgkTriggerLocalBoards + fgkDataExt;;
 }
 
@@ -199,7 +207,8 @@ TString AliMpFiles::GlobalTriggerBoardMapping()
 {
 /// Return path to data file with local trigger board mapping.
 
-  return GetTop() + fgkDataDir + StationDataDir(AliMp::kStationTrigger) 
+  return GetTop() + fgkDataDir 
+      + StationDataDir(AliMp::kStationTrigger, AliMq::kNotSt12) 
       + fgkTriggerGlobalBoards + fgkDataExt;;
 }
 
@@ -210,7 +219,8 @@ TString AliMpFiles::SlatFilePath(AliMp::StationType stationType,
 {
 /// \todo add ..
 
-  return TString(PlaneDataDir(stationType,plane) + slatType + "." +
+  return TString(PlaneDataDir(stationType, AliMq::kNotSt12, plane) 
+                 + slatType + "." +
                 ( plane == AliMp::kNonBendingPlane ? "NonBending":"Bending" ) + ".slat");
 }
 
@@ -222,35 +232,38 @@ TString AliMpFiles::SlatPCBFilePath(AliMp::StationType stationType,
 /// 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,AliMp::kNonBendingPlane) + pcbType +
-                 ".pcb");
+  return TString(PlaneDataDir(stationType, AliMq::kNotSt12, AliMp::kNonBendingPlane) 
+                 + pcbType + ".pcb");
 }
 
 //______________________________________________________________________________
-TString AliMpFiles::SectorFilePath(AliMp::StationType station
+TString AliMpFiles::SectorFilePath(AliMq::Station12Type station12Type
                                    AliMp::PlaneType plane)
 {
 /// Return path to data file with sector description.
  
-  return TString(PlaneDataDir(station, plane) + fgkSector + fgkDataExt);
+  return TString(PlaneDataDir(AliMp::kStation12, station12Type, plane) 
+                 + fgkSector + fgkDataExt);
 }
     
 //______________________________________________________________________________
-TString AliMpFiles::SectorSpecialFilePath(AliMp::StationType station, 
+TString AliMpFiles::SectorSpecialFilePath(AliMq::Station12Type station12Type,
                                           AliMp::PlaneType plane)
 {
 /// Return path to data file with sector special description (irregular motifs).
 
-  return TString(PlaneDataDir(station, plane) + fgkSectorSpecial + fgkDataExt);
+  return TString(PlaneDataDir(AliMp::kStation12, station12Type, plane) 
+                 + fgkSectorSpecial + fgkDataExt);
 }
     
 //______________________________________________________________________________
-TString AliMpFiles::SectorSpecialFilePath2(AliMp::StationType station
+TString AliMpFiles::SectorSpecialFilePath2(AliMq::Station12Type station12Type
                                            AliMp::PlaneType plane)
 {
 /// Returns path to data file with sector special description (irregular motifs).
 
-  return TString(PlaneDataDir(station, plane) + fgkSectorSpecial2 + fgkDataExt);
+  return TString(PlaneDataDir(AliMp::kStation12, station12Type, plane) 
+                 + fgkSectorSpecial2 + fgkDataExt);
 }
 
 //______________________________________________________________________________
@@ -263,12 +276,14 @@ TString AliMpFiles::MotifFileName(const TString& motifTypeID)
 
 //______________________________________________________________________________
 TString AliMpFiles::MotifFilePath(AliMp::StationType station, 
+                                  AliMq::Station12Type station12Type,
                                   AliMp::PlaneType plane, 
                                   const TString& motifTypeID)
 {
 /// Returns path to data file for a given motif type.
 
-  return TString(PlaneDataDir(station, plane) + MotifFileName(motifTypeID));
+  return TString(PlaneDataDir(station, station12Type, plane) 
+                 + MotifFileName(motifTypeID));
 }
 
 //______________________________________________________________________________
@@ -281,12 +296,14 @@ TString AliMpFiles::PadPosFileName(const TString& motifTypeID)
 
 //______________________________________________________________________________
 TString AliMpFiles::PadPosFilePath(AliMp::StationType station, 
+                                   AliMq::Station12Type station12Type,
                                    AliMp::PlaneType plane, 
                                    const TString& motifTypeID)
 {
 /// Returns path to data file with pad positions for a given motif type.
 
-  return TString(PlaneDataDir(station, plane) + PadPosFileName(motifTypeID));
+  return TString(PlaneDataDir(station, station12Type, plane) 
+                 + PadPosFileName(motifTypeID));
 }
 
 //______________________________________________________________________________ 
@@ -300,30 +317,35 @@ TString AliMpFiles::MotifSpecialFileName(const TString& motifID)
 
 //______________________________________________________________________________ 
 TString AliMpFiles::MotifSpecialFilePath(AliMp::StationType station, 
+                                         AliMq::Station12Type station12Type,
                                          AliMp::PlaneType plane,
                                          const TString& motifID)
 {
 /// Returns path to data file with pad dimensions for a given motif ID.
 
-  return TString(PlaneDataDir(station, plane) + MotifSpecialFileName(motifID));
+  return TString(PlaneDataDir(station, station12Type, plane) 
+                 + MotifSpecialFileName(motifID));
 }
 
 //______________________________________________________________________________ 
-TString AliMpFiles::BergToGCFilePath(AliMp::StationType station)
+TString AliMpFiles::BergToGCFilePath(AliMp::StationType station,
+                                     AliMq::Station12Type station12Type)
 {
 /// Returns the path of the file which describes the correspondance between
 /// the berg number and the gassiplex channel.
 
-  return GetTop() + fgkDataDir + StationDataDir(station)
+  return GetTop() + fgkDataDir + StationDataDir(station, station12Type)
               + fgkBergToGCFileName + fgkDataExt;
 }
 
 //______________________________________________________________________________ 
-TString AliMpFiles::ManuToSerialPath(const TString& deName, AliMp::StationType station)
+TString AliMpFiles::ManuToSerialPath(const TString& deName, 
+                                     AliMp::StationType station,
+                                     AliMq::Station12Type station12Type)
 {
 /// Returns the path of the file for the manu id to their serial number
 
-  return  GetTop() + fgkDataRunDir + StationDataDir(station)
+  return  GetTop() + fgkDataRunDir + StationDataDir(station, station12Type)
               + deName + fgkManuToSerial + fgkDataExt; 
 }
 
index 48eceb93aa43ba74635db5aacce0f8fbd3add482..d30e18b791de1750e08edbf8155bff685ac88824 100755 (executable)
@@ -21,6 +21,7 @@
 #include <TObject.h>
 
 #include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
 #include "AliMpPlaneType.h"
 
 #include <TString.h>
@@ -37,6 +38,12 @@ class AliMpFiles : public TObject
     // methods
     //
     
+    static TString PlaneDataDir(AliMp::StationType station, 
+                                AliMq::Station12Type station12Type,
+                                AliMp::PlaneType plane);
+    static TString StationDataDir(AliMp::StationType station,
+                                AliMq::Station12Type station12Type);
+  
     // bus patch
     //
     static TString BusPatchFilePath(); 
@@ -45,7 +52,8 @@ class AliMpFiles : public TObject
 
     // de names
     //
-    static TString DENamesFilePath(AliMp::StationType stationType);
+    static TString DENamesFilePath(AliMp::StationType stationType,
+                                   AliMq::Station12Type station12Type);
 
     // trigger
     //
@@ -60,34 +68,37 @@ class AliMpFiles : public TObject
                                 const char* pcbType);
     // sectors
     //
-    static TString SectorFilePath(AliMp::StationType station, 
+    static TString SectorFilePath(AliMq::Station12Type station, 
                                   AliMp::PlaneType plane);
-    static TString SectorSpecialFilePath(AliMp::StationType station, 
+    static TString SectorSpecialFilePath(AliMq::Station12Type station, 
                                   AliMp::PlaneType plane);
-    static TString SectorSpecialFilePath2(AliMp::StationType station, 
+    static TString SectorSpecialFilePath2(AliMq::Station12Type station, 
                                   AliMp::PlaneType plane);
     // motifs
     //
     static TString MotifFilePath(AliMp::StationType station, 
+                                 AliMq::Station12Type station12Type,
                                  AliMp::PlaneType plane, 
                                  const TString& motifTypeID);
     static TString MotifFileName(const TString& motifTypeID);
     static TString MotifSpecialFilePath(AliMp::StationType station,
+                                 AliMq::Station12Type station12Type,
                                  AliMp::PlaneType plane, const TString& motifID);
     static TString MotifSpecialFileName(const TString& motifID);
     static TString PadPosFilePath(AliMp::StationType station, 
+                                 AliMq::Station12Type station12Type,
                                  AliMp::PlaneType plane, const TString& motifTypeID);
     static TString PadPosFileName(const TString& motifTypeID);
 
-    static TString BergToGCFilePath(AliMp::StationType station);
+    static TString BergToGCFilePath(AliMp::StationType station,
+                                 AliMq::Station12Type station12Type);
 
-    static TString ManuToSerialPath(const TString& deName, AliMp::StationType station);
+    static TString ManuToSerialPath(const TString& deName, 
+                                 AliMp::StationType station,
+                                 AliMq::Station12Type station12Type);
 
     static TString SerialToBinFilePath();
 
-    static TString PlaneDataDir(AliMp::StationType station, AliMp::PlaneType plane); 
-    static TString StationDataDir(AliMp::StationType station); 
-  
     // set methods
     static void SetTopPath(const TString& topPath);
     static TString GetTop();
index 2e72e59796def2687b51f1e9a0471c58fa1411c6..f0ad34e100643a29ed334547df7c71eebb9f8cd4 100644 (file)
@@ -157,6 +157,8 @@ Bool_t AliMpManuStore::ReadData(const AliMpDetElement* de, Int_t& nofManus)
   TString deName = de->GetDEName();
   AliMp::StationType stationType 
     =  AliMpDEManager::GetStationType(de->GetId());
+  AliMq::Station12Type station12Type 
+    =  AliMpDEManager::GetStation12Type(de->GetId());
 
   // Nothing to be done for trigger
   if ( stationType == AliMp::kStationTrigger ) {
@@ -168,7 +170,8 @@ Bool_t AliMpManuStore::ReadData(const AliMpDetElement* de, Int_t& nofManus)
 
   istream& in 
     = fDataStreams.
-        CreateDataStream(AliMpFiles::ManuToSerialPath(deName, stationType));
+        CreateDataStream(
+          AliMpFiles::ManuToSerialPath(deName, stationType, station12Type));
 
   char line[80];
 
@@ -298,12 +301,14 @@ Bool_t  AliMpManuStore::WriteData(const TString& outDir)
     TString deName = detElement->GetDEName();
     AliMp::StationType stationType 
       =  AliMpDEManager::GetStationType(detElemId);
+    AliMq::Station12Type station12Type 
+      =  AliMpDEManager::GetStation12Type(detElemId);
       
     if ( stationType == AliMp::kStationTrigger ) continue;  
 
     // Create directory if it does not yet exist
     //
-    TString dirPath = outDir + AliMpFiles::StationDataDir(stationType);
+    TString dirPath = outDir + AliMpFiles::StationDataDir(stationType, station12Type);
     if ( ! gSystem->OpenDirectory(dirPath.Data()) ) {
       AliDebugStream(2) << "Making directory " <<  dirPath.Data() << endl;
       gSystem->mkdir(dirPath.Data());
@@ -311,7 +316,7 @@ Bool_t  AliMpManuStore::WriteData(const TString& outDir)
 
     // Compose output file path 
     //
-    string dataPath = AliMpFiles::ManuToSerialPath(deName, stationType).Data();
+    string dataPath = AliMpFiles::ManuToSerialPath(deName, stationType, station12Type).Data();
     string top = AliMpFiles::GetTop().Data();
     if ( dataPath.find(top) != string::npos ) dataPath.erase(0, top.size()+1);
     dataPath.erase(0,dataPath.find('/')+1);
index 986d9c724ca117752c91fa152c0f6cca57f928c9..543c86178e0ced23b3e271f70b3b32f5480f92ad 100644 (file)
@@ -53,10 +53,12 @@ ClassImp(AliMpMotifReader)
 //_____________________________________________________________________________
 AliMpMotifReader::AliMpMotifReader(const AliMpDataStreams& dataStreams,
                                    AliMp::StationType station, 
+                                   AliMq::Station12Type station12,
                                    AliMp::PlaneType plane) 
   : TObject(),
     fDataStreams(dataStreams),
     fStationType(station),
+    fStation12Type(station12),
     fPlaneType(plane)
 {
 /// Standard constructor
@@ -85,15 +87,15 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
   istream& padPosStream 
     = fDataStreams.
         CreateDataStream(AliMpFiles::PadPosFilePath(
-                            fStationType,fPlaneType, motifTypeId));
+                            fStationType, fStation12Type, fPlaneType, motifTypeId));
   istream& bergToGCStream 
     = fDataStreams.
-        CreateDataStream(AliMpFiles::BergToGCFilePath(fStationType));
+        CreateDataStream(AliMpFiles::BergToGCFilePath(fStationType, fStation12Type));
       
   istream& motifTypeStream 
     = fDataStreams.
         CreateDataStream(AliMpFiles::MotifFilePath(
-                            fStationType, fPlaneType, motifTypeId));
+                            fStationType, fStation12Type, fPlaneType, motifTypeId));
 
   AliMpMotifType*  motifType = new AliMpMotifType(motifTypeId);        
 
@@ -128,7 +130,7 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
   } while (!padPosStream.eof());
 
   const Int_t knbergpins = 
-    (fStationType == AliMp::kStation1 || fStationType == AliMp::kStation2 ) ? 80 : 100;
+    (fStationType == AliMp::kStation12 ) ? 80 : 100;
   // Station1 & 2 Bergstak connectors have 80 pins, while for stations
   // 3, 4 and 5 they have 100 pins.
   Int_t gassiChannel[100];
@@ -262,7 +264,7 @@ AliMpMotifReader::BuildMotifSpecial(const TString& motifID,
   istream& in 
     = fDataStreams.
         CreateDataStream(AliMpFiles::MotifSpecialFilePath(
-                             fStationType,fPlaneType, motifID));
+                             fStationType, fStation12Type, fPlaneType, motifID));
 
   TString id = MotifSpecialName(motifID,scale);
   
index 9ce0654931aedca1075cb23d83f494c3f30bf9e2..13c7cc57af3933d3218e6e3dc089d3d3b40b3949 100644 (file)
@@ -18,6 +18,7 @@
 #include "AliMpContainers.h"
 
 #include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
 #include "AliMpPlaneType.h"
 #include "AliMpIntPair.h"
 #include "AliMpContainers.h"
@@ -56,7 +57,9 @@ class AliMpMotifReader : public TObject
 
   public:
     AliMpMotifReader(const AliMpDataStreams& dataStreams,
-                     AliMp::StationType station, AliMp::PlaneType plane);
+                     AliMp::StationType station, 
+                     AliMq::Station12Type station12,
+                     AliMp::PlaneType plane);
     virtual ~AliMpMotifReader();
   
     // methods   
@@ -76,8 +79,9 @@ class AliMpMotifReader : public TObject
 
     // data members  
     const AliMpDataStreams& fDataStreams; ///< data streams
-    AliMp::StationType  fStationType; ///< station type 
-    AliMp::PlaneType    fPlaneType;   ///< plane type 
+    AliMp::StationType    fStationType;   ///< station type 
+    AliMq::Station12Type  fStation12Type; ///< station12 type 
+    AliMp::PlaneType      fPlaneType;     ///< plane type 
 
   ClassDef(AliMpMotifReader,0)  // Data reader
 };
index ce7bb3d1372ea5ff001d7d0a73cab00eb9474be1..1a6b2ea021166b341b4f5b94bd0b70d5682938e7 100755 (executable)
@@ -75,14 +75,14 @@ const TString  AliMpSectorReader::fgkPadRowSegmentKeyword  = "PAD_ROW_SEGMENT";
 
 //_____________________________________________________________________________
 AliMpSectorReader::AliMpSectorReader(const AliMpDataStreams& dataStreams,
-                                     AliMp::StationType station, 
+                                     AliMq::Station12Type station, 
                                      AliMp::PlaneType plane) 
   : TObject(),
     fDataStreams(dataStreams),
     fStationType(station),
     fPlaneType(plane),
     fSector(0),
-    fMotifReader(new AliMpMotifReader(dataStreams, station, plane))
+    fMotifReader(new AliMpMotifReader(dataStreams, AliMp::kStation12, station, plane))
  
 {
 /// Standard constructor
index cc3c35f8eaf25f12acb4db8be2a1295f47e5ab53..50f8455d915f7998652afe86e681d71bdf327312 100755 (executable)
@@ -15,7 +15,7 @@
 
 #include <TObject.h>
 
-#include "AliMpStationType.h"
+#include "AliMpStation12Type.h"
 #include "AliMpPlaneType.h"
 #include "AliMpXDirection.h"
 #include "AliMpIntPair.h"
@@ -39,7 +39,7 @@ class AliMpSectorReader : public TObject
 {
   public:
     AliMpSectorReader(const AliMpDataStreams& dataStreams,
-                      AliMp::StationType station, AliMp::PlaneType plane);
+                      AliMq::Station12Type station, AliMp::PlaneType plane);
     virtual ~AliMpSectorReader();
   
     // methods   
@@ -80,11 +80,11 @@ class AliMpSectorReader : public TObject
     static const TString  fgkPadRowSegmentKeyword; ///< pad row segment keyword
   
     // data members  
-    const AliMpDataStreams&  fDataStreams; ///< data streams
-    AliMp::StationType  fStationType; ///< station type 
-    AliMp::PlaneType    fPlaneType;   ///< plane type 
-    AliMpSector*        fSector;      ///< sector
-    AliMpMotifReader*   fMotifReader; ///< motif reader
+    const AliMpDataStreams&    fDataStreams; ///< data streams
+    AliMq::Station12Type  fStationType; ///< station type 
+    AliMp::PlaneType      fPlaneType;   ///< plane type 
+    AliMpSector*          fSector;      ///< sector
+    AliMpMotifReader*     fMotifReader; ///< motif reader
 
   ClassDef(AliMpSectorReader,0)  // Data reader
 };
index b75570ff07eaecf837d0e6f49410717d83973524..19b312800b661c624b6f97ef83904347cf03ed89 100644 (file)
@@ -209,8 +209,9 @@ AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, AliMp::CathodType cath)
 
   AliMpVSegmentation* mpSegmentation = 0;
 
-  if ( stationType == AliMp::kStation1 || stationType == AliMp::kStation2 ) {
-    AliMpSectorReader reader(fDataStreams, stationType, planeType);
+  if ( stationType == AliMp::kStation12 ) {
+    AliMq::Station12Type station12Type = detElement->GetStation12Type();
+    AliMpSectorReader reader(fDataStreams, station12Type, planeType);
     AliMpSector* sector = reader.BuildSector();
     mpSegmentation = new AliMpSectorSegmentation(sector, true);
   }
index 64f7d57d9e4f3326b34aa7744178505f303230e1..321d9993c2def9edbda640bea4cd21a1f023b029 100644 (file)
@@ -89,7 +89,7 @@ AliMpSt345Reader::ReadPCB(const char* pcbType)
                              AliMp::kStation345, pcbType));
  
   AliMpMotifReader reader(fDataStreams, 
-                          AliMp::kStation345,AliMp::kNonBendingPlane); 
+                          AliMp::kStation345, AliMq::kNotSt12, 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
diff --git a/MUON/mapping/AliMpStation12Type.cxx b/MUON/mapping/AliMpStation12Type.cxx
new file mode 100644 (file)
index 0000000..4dfad68
--- /dev/null
@@ -0,0 +1,29 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// $Id$
+
+//-----------------------------------------------------------------------------
+// Enum AliMq::Station12Type
+// Enumeration for refering to a MUON station12 type.
+//
+// Author: Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
+#include "AliMpStation12Type.h"
+
+#include "AliLog.h" 
+
+//_____________________________________________________________________________
+TString AliMq::Station12TypeName(AliMq::Station12Type station12Type)
+{
+  switch ( station12Type ) {
+    case kStation1:         return "st1";     break;
+    case kStation2:         return "st2";     break;
+    case kNotSt12:          return "";        break;
+  }
+  
+  // Cannot reach this line
+  AliFatalGeneral("AliMpStation12Type.h", "Unknown sector station type"); 
+  return "invalidStation12";
+}
diff --git a/MUON/mapping/AliMpStation12Type.h b/MUON/mapping/AliMpStation12Type.h
new file mode 100644 (file)
index 0000000..2ff92ed
--- /dev/null
@@ -0,0 +1,33 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// $Id$
+
+/// \ingroup basic
+/// \enum AliMq::Station12Type
+/// Enumeration for refering to a MUON station12.
+/// It is defined in a different namespace than StationType
+/// in order to prevent from unwanted mixing of both types
+/// in switch command.
+///
+/// \author Ivana Hrivnacova; IPN Orsay
+#ifndef ALI_MP_STATION_12_TYPE_H
+#define ALI_MP_STATION_12_TYPE_H
+
+#include <TString.h>
+
+namespace AliMq {
+
+  enum Station12Type
+  {
+    kStation1,  ///< station 1
+    kStation2,  ///< station 2
+    kNotSt12    ///< value for all non sector stations
+  };
+
+  /// Return name for given stationType
+  TString Station12TypeName(AliMq::Station12Type station12Type);
+}
+
+#endif //ALI_MP_SECTOR_STATION_TYPE_H
index e8b9999714c1af5749453b759394b2d14fc07ea5..abec3dfa835aa8483cdebedc787f70f1e78493f1 100644 (file)
@@ -19,8 +19,6 @@
 TString AliMp::StationTypeName(AliMp::StationType stationType)
 {
   switch ( stationType ) {
-    case kStation1:       return "st1";     break;
-    case kStation2:       return "st2";     break;
     case kStation12:      return "st12";    break;
     case kStation345:     return "slat";    break;
     case kStationTrigger: return "trigger"; break;
index 93a946f179ff336702ff4fce43f9b044d29a2994..0510088b36987316cf997d3e5b4a4a356cb83dc4 100644 (file)
@@ -19,8 +19,6 @@ namespace AliMp {
 
   enum StationType
   {
-    kStation1,           ///< station 1 (quadrants)
-    kStation2,           ///< station 2 (quadrants)
     kStation12,          ///< station 1,2 (quadrants)
     kStation345,         ///< station 3,4,5 (slats)
     kStationTrigger      ///< trigger stations (slats)
index 2fa77ac93bf497a600f9786f06e556080e61624a..3889953e7c6afd4aa5ff9f0e355cb998abd63407 100644 (file)
@@ -616,7 +616,7 @@ AliMpTriggerReader::ReadPCB(const char* pcbType)
                              AliMp::kStationTrigger,pcbName));
  
   AliMpMotifReader reader(fDataStreams,
-                          AliMp::kStationTrigger,AliMp::kNonBendingPlane); 
+                          AliMp::kStationTrigger, AliMq::kNotSt12, 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