#include "AliMpArrayI.h"
#include "AliMpConstants.h"
#include "AliMpDEManager.h"
-#include "AliMpHVNamer.h"
+#include "AliMpDCSNamer.h"
#include "AliMpHVUID.h"
#include "AliMpManuUID.h"
#include "AliMpPadUID.h"
fSegType(segType),
fPlaneType(planeType),
fBusPatchIds(false),
- fManuToSerialNbs(),
- fSerialNbToManus(),
fManuList(),
fTrackerChannels(),
fHVmanus(),
fSegType(),
fPlaneType(),
fBusPatchIds(),
- fManuToSerialNbs(),
- fSerialNbToManus(),
fManuList(),
fTrackerChannels(),
fHVmanus(ioCtor),
return true;
}
-//______________________________________________________________________________
-void AliMpDetElement::AddManuSerial(Int_t manuId, Int_t serialNb)
-{
-/// Map the serial manu number
-/// (Eventually add check if the given pair already present)
-
- AliCodeTimerAuto("");
-
- AliDebug(1,Form("DE %4d ManuId %4d SerialNB %d",
- fId,manuId,serialNb));
-
- fManuToSerialNbs.Add(Long_t(manuId), Long_t(serialNb));
- fSerialNbToManus.Add(Long_t(serialNb), Long_t(manuId));
-}
-
//______________________________________________________________________________
TString AliMpDetElement::GetSegName(AliMp::CathodType cathType) 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;
}
//______________________________________________________________________________
return fBusPatchIds.HasValue(busPatchId);;
}
-//______________________________________________________________________________
-Int_t AliMpDetElement::GetManuSerialFromId(Int_t manuId) const
-{
-/// Return manu serial number from manuId
-
- return (Int_t)fManuToSerialNbs.GetValue(Long_t(manuId));
-}
-
-//______________________________________________________________________________
-Int_t AliMpDetElement::GetManuIdFromSerial(Int_t serialNb) const
-{
-/// Return manuId from manu serial number
-
- return (Int_t)fSerialNbToManus.GetValue(Long_t(serialNb));
-}
-
//______________________________________________________________________________
Int_t
AliMpDetElement::NofChannelsInManu(Int_t manuId) const
if ( stationType == AliMp::kStationTrigger ) return;
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliDebug(1,Form("DE %4d Manu %4d",fId,manuId));
for ( Int_t i = 0; i < AliMpConstants::ManuNofChannels(); ++i )
{
- if ( seg->PadByLocation(AliMpIntPair(manuId,i),kFALSE).IsValid() )
+ if ( seg->PadByLocation(manuId,i,kFALSE).IsValid() )
{
++n;
fTrackerChannels.Add((Long_t)AliMpPadUID::BuildUniqueID(fId,manuId,i),
fNofChannels += n;
- AliMpHVNamer hvNamer;
+ AliMpDCSNamer hvNamer("TRACKER");
Int_t index = hvNamer.ManuId2Index(fId,manuId);
return static_cast<AliMpArrayI*>(fHVmanus.GetValue(AliMpHVUID::BuildUniqueID(fId,hvIndex)));
}
-//______________________________________________________________________________
-Int_t
-AliMpDetElement::NofManusWithSerialNumber() const
-{
- /// Return the number of manus which have a serial number in this detection element
- return fManuToSerialNbs.GetSize();
-}
-
//______________________________________________________________________________
Int_t
AliMpDetElement::NofManus() const