From 4e51cfd20f100b19ae6698bc3fb52e3c96ac06d1 Mon Sep 17 00:00:00 2001 From: ivana Date: Wed, 4 Feb 2009 12:10:48 +0000 Subject: [PATCH] In mapping: 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). --- MUON/AliMUONClusterFinderPeakFit.cxx | 5 +- MUON/AliMUONClusterFinderSimpleFit.cxx | 5 +- MUON/AliMUONClusterSplitterMLEM.cxx | 5 +- MUON/AliMUONGeometryTransformer.cxx | 2 +- MUON/AliMUONHVSubprocessor.cxx | 3 +- MUON/AliMUONPadStatusMaker.cxx | 3 +- MUON/AliMUONPainterHelper.cxx | 2 +- MUON/MUONmappingLinkDef.h | 3 +- MUON/libMUONmapping.pkg | 3 +- MUON/mapping/AliMpBusPatch.cxx | 4 +- MUON/mapping/AliMpDCSNamer.cxx | 18 ++--- MUON/mapping/AliMpDDLStore.cxx | 4 +- MUON/mapping/AliMpDEManager.cxx | 17 ++++- MUON/mapping/AliMpDEManager.h | 10 +-- MUON/mapping/AliMpDEStore.cxx | 49 ++----------- MUON/mapping/AliMpDEStore.h | 8 +-- MUON/mapping/AliMpDEVisu.cxx | 2 +- MUON/mapping/AliMpDetElement.cxx | 29 ++++++-- MUON/mapping/AliMpDetElement.h | 12 ++-- MUON/mapping/AliMpFiles.cxx | 96 ++++++++++++++++---------- MUON/mapping/AliMpFiles.h | 29 +++++--- MUON/mapping/AliMpManuStore.cxx | 11 ++- MUON/mapping/AliMpMotifReader.cxx | 12 ++-- MUON/mapping/AliMpMotifReader.h | 10 ++- MUON/mapping/AliMpSectorReader.cxx | 4 +- MUON/mapping/AliMpSectorReader.h | 14 ++-- MUON/mapping/AliMpSegmentation.cxx | 5 +- MUON/mapping/AliMpSt345Reader.cxx | 2 +- MUON/mapping/AliMpStation12Type.cxx | 29 ++++++++ MUON/mapping/AliMpStation12Type.h | 33 +++++++++ MUON/mapping/AliMpStationType.cxx | 2 - MUON/mapping/AliMpStationType.h | 2 - MUON/mapping/AliMpTriggerReader.cxx | 2 +- 33 files changed, 266 insertions(+), 169 deletions(-) create mode 100644 MUON/mapping/AliMpStation12Type.cxx create mode 100644 MUON/mapping/AliMpStation12Type.h diff --git a/MUON/AliMUONClusterFinderPeakFit.cxx b/MUON/AliMUONClusterFinderPeakFit.cxx index 9dcfced9981..be4ab0ba648 100644 --- a/MUON/AliMUONClusterFinderPeakFit.cxx +++ b/MUON/AliMUONClusterFinderPeakFit.cxx @@ -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(); diff --git a/MUON/AliMUONClusterFinderSimpleFit.cxx b/MUON/AliMUONClusterFinderSimpleFit.cxx index b2b126cdf06..314f27d37a8 100644 --- a/MUON/AliMUONClusterFinderSimpleFit.cxx +++ b/MUON/AliMUONClusterFinderSimpleFit.cxx @@ -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(); diff --git a/MUON/AliMUONClusterSplitterMLEM.cxx b/MUON/AliMUONClusterSplitterMLEM.cxx index da1f0ff6bdc..589b91db195 100644 --- a/MUON/AliMUONClusterSplitterMLEM.cxx +++ b/MUON/AliMUONClusterSplitterMLEM.cxx @@ -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(); diff --git a/MUON/AliMUONGeometryTransformer.cxx b/MUON/AliMUONGeometryTransformer.cxx index 1c6dca5f8a1..03eaa3b3d78 100644 --- a/MUON/AliMUONGeometryTransformer.cxx +++ b/MUON/AliMUONGeometryTransformer.cxx @@ -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); diff --git a/MUON/AliMUONHVSubprocessor.cxx b/MUON/AliMUONHVSubprocessor.cxx index 0f14525ea99..c4529d6a7f6 100644 --- a/MUON/AliMUONHVSubprocessor.cxx +++ b/MUON/AliMUONHVSubprocessor.cxx @@ -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) { diff --git a/MUON/AliMUONPadStatusMaker.cxx b/MUON/AliMUONPadStatusMaker.cxx index 6ebb8db7de8..ce668260a9f 100644 --- a/MUON/AliMUONPadStatusMaker.cxx +++ b/MUON/AliMUONPadStatusMaker.cxx @@ -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 ) diff --git a/MUON/AliMUONPainterHelper.cxx b/MUON/AliMUONPainterHelper.cxx index aa589f08e38..89edf7918f7 100644 --- a/MUON/AliMUONPainterHelper.cxx +++ b/MUON/AliMUONPainterHelper.cxx @@ -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); diff --git a/MUON/MUONmappingLinkDef.h b/MUON/MUONmappingLinkDef.h index 39bf64b6fa9..f07889a93b0 100644 --- a/MUON/MUONmappingLinkDef.h +++ b/MUON/MUONmappingLinkDef.h @@ -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& ); diff --git a/MUON/libMUONmapping.pkg b/MUON/libMUONmapping.pkg index 725135f6bcd..304714bdeda 100644 --- a/MUON/libMUONmapping.pkg +++ b/MUON/libMUONmapping.pkg @@ -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 \ diff --git a/MUON/mapping/AliMpBusPatch.cxx b/MUON/mapping/AliMpBusPatch.cxx index e001cff4fb5..b8e603fbed9 100644 --- a/MUON/mapping/AliMpBusPatch.cxx +++ b/MUON/mapping/AliMpBusPatch.cxx @@ -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 diff --git a/MUON/mapping/AliMpDCSNamer.cxx b/MUON/mapping/AliMpDCSNamer.cxx index b2b22acde92..c8c00d14394 100644 --- a/MUON/mapping/AliMpDCSNamer.cxx +++ b/MUON/mapping/AliMpDCSNamer.cxx @@ -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"; diff --git a/MUON/mapping/AliMpDDLStore.cxx b/MUON/mapping/AliMpDDLStore.cxx index a71e94147e4..0828d001eed 100644 --- a/MUON/mapping/AliMpDDLStore.cxx +++ b/MUON/mapping/AliMpDDLStore.cxx @@ -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(); diff --git a/MUON/mapping/AliMpDEManager.cxx b/MUON/mapping/AliMpDEManager.cxx index de6871c0cb7..e85b8491ad4 100644 --- a/MUON/mapping/AliMpDEManager.cxx +++ b/MUON/mapping/AliMpDEManager.cxx @@ -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) diff --git a/MUON/mapping/AliMpDEManager.h b/MUON/mapping/AliMpDEManager.h index 4953c91e4b7..0849742d94c 100644 --- a/MUON/mapping/AliMpDEManager.h +++ b/MUON/mapping/AliMpDEManager.h @@ -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); diff --git a/MUON/mapping/AliMpDEStore.cxx b/MUON/mapping/AliMpDEStore.cxx index df2ac552ca4..eefadb3246c 100644 --- a/MUON/mapping/AliMpDEStore.cxx +++ b/MUON/mapping/AliMpDEStore.cxx @@ -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); diff --git a/MUON/mapping/AliMpDEStore.h b/MUON/mapping/AliMpDEStore.h index 3a5eaaf7982..9a989969c73 100644 --- a/MUON/mapping/AliMpDEStore.h +++ b/MUON/mapping/AliMpDEStore.h @@ -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 diff --git a/MUON/mapping/AliMpDEVisu.cxx b/MUON/mapping/AliMpDEVisu.cxx index d5a7d31db51..e779a7e24f1 100644 --- a/MUON/mapping/AliMpDEVisu.cxx +++ b/MUON/mapping/AliMpDEVisu.cxx @@ -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; diff --git a/MUON/mapping/AliMpDetElement.cxx b/MUON/mapping/AliMpDetElement.cxx index dc7001168fa..69cb7a07c05 100644 --- a/MUON/mapping/AliMpDetElement.cxx +++ b/MUON/mapping/AliMpDetElement.cxx @@ -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; } //______________________________________________________________________________ diff --git a/MUON/mapping/AliMpDetElement.h b/MUON/mapping/AliMpDetElement.h index 4f9b573ae5e..23341236503 100644 --- a/MUON/mapping/AliMpDetElement.h +++ b/MUON/mapping/AliMpDetElement.h @@ -19,9 +19,10 @@ #include #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; diff --git a/MUON/mapping/AliMpFiles.cxx b/MUON/mapping/AliMpFiles.cxx index c4890da1868..f53ffbea505 100755 --- a/MUON/mapping/AliMpFiles.cxx +++ b/MUON/mapping/AliMpFiles.cxx @@ -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; } diff --git a/MUON/mapping/AliMpFiles.h b/MUON/mapping/AliMpFiles.h index 48eceb93aa4..d30e18b791d 100755 --- a/MUON/mapping/AliMpFiles.h +++ b/MUON/mapping/AliMpFiles.h @@ -21,6 +21,7 @@ #include #include "AliMpStationType.h" +#include "AliMpStation12Type.h" #include "AliMpPlaneType.h" #include @@ -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(); diff --git a/MUON/mapping/AliMpManuStore.cxx b/MUON/mapping/AliMpManuStore.cxx index 2e72e59796d..f0ad34e1006 100644 --- a/MUON/mapping/AliMpManuStore.cxx +++ b/MUON/mapping/AliMpManuStore.cxx @@ -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); diff --git a/MUON/mapping/AliMpMotifReader.cxx b/MUON/mapping/AliMpMotifReader.cxx index 986d9c724ca..543c86178e0 100644 --- a/MUON/mapping/AliMpMotifReader.cxx +++ b/MUON/mapping/AliMpMotifReader.cxx @@ -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); diff --git a/MUON/mapping/AliMpMotifReader.h b/MUON/mapping/AliMpMotifReader.h index 9ce0654931a..13c7cc57af3 100644 --- a/MUON/mapping/AliMpMotifReader.h +++ b/MUON/mapping/AliMpMotifReader.h @@ -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 }; diff --git a/MUON/mapping/AliMpSectorReader.cxx b/MUON/mapping/AliMpSectorReader.cxx index ce7bb3d1372..1a6b2ea0211 100755 --- a/MUON/mapping/AliMpSectorReader.cxx +++ b/MUON/mapping/AliMpSectorReader.cxx @@ -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 diff --git a/MUON/mapping/AliMpSectorReader.h b/MUON/mapping/AliMpSectorReader.h index cc3c35f8eaf..50f8455d915 100755 --- a/MUON/mapping/AliMpSectorReader.h +++ b/MUON/mapping/AliMpSectorReader.h @@ -15,7 +15,7 @@ #include -#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 }; diff --git a/MUON/mapping/AliMpSegmentation.cxx b/MUON/mapping/AliMpSegmentation.cxx index b75570ff07e..19b312800b6 100644 --- a/MUON/mapping/AliMpSegmentation.cxx +++ b/MUON/mapping/AliMpSegmentation.cxx @@ -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); } diff --git a/MUON/mapping/AliMpSt345Reader.cxx b/MUON/mapping/AliMpSt345Reader.cxx index 64f7d57d9e4..321d9993c2d 100644 --- a/MUON/mapping/AliMpSt345Reader.cxx +++ b/MUON/mapping/AliMpSt345Reader.cxx @@ -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 index 00000000000..4dfad68457e --- /dev/null +++ b/MUON/mapping/AliMpStation12Type.cxx @@ -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 index 00000000000..2ff92eda835 --- /dev/null +++ b/MUON/mapping/AliMpStation12Type.h @@ -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 + +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 diff --git a/MUON/mapping/AliMpStationType.cxx b/MUON/mapping/AliMpStationType.cxx index e8b9999714c..abec3dfa835 100644 --- a/MUON/mapping/AliMpStationType.cxx +++ b/MUON/mapping/AliMpStationType.cxx @@ -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; diff --git a/MUON/mapping/AliMpStationType.h b/MUON/mapping/AliMpStationType.h index 93a946f179f..0510088b369 100644 --- a/MUON/mapping/AliMpStationType.h +++ b/MUON/mapping/AliMpStationType.h @@ -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) diff --git a/MUON/mapping/AliMpTriggerReader.cxx b/MUON/mapping/AliMpTriggerReader.cxx index 2fa77ac93bf..3889953e7c6 100644 --- a/MUON/mapping/AliMpTriggerReader.cxx +++ b/MUON/mapping/AliMpTriggerReader.cxx @@ -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 -- 2.43.0