return AliMpDEStore::Instance()->GetDetElement(detElemId, warn);
}
+//______________________________________________________________________________
+AliMpDetElement* AliMpDEManager::GetDetElement(const TString& deName, Bool_t warn)
+{
+/// Return det element for given deName
+
+ return AliMpDEStore::Instance()->GetDetElement(deName, warn);
+}
+
//
// static public methods
//
#include "AliMpDEIterator.h"
class AliMpDetElement;
+class TString;
class AliMpDEManager : public TObject {
static AliMp::CathodType GetCathod(Int_t detElemId, AliMp::PlaneType planeType);
static AliMpDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true);
+ static AliMpDetElement* GetDetElement(const TString& deName, Bool_t warn = true);
+
static Int_t GetNofDEInChamber(Int_t chamberId, Bool_t warn = true);
private:
return detElement;
}
+//______________________________________________________________________________
+AliMpDetElement* AliMpDEStore::GetDetElement(const TString& deName, Bool_t warn) const
+{
+/// Return det element for given deName
+
+ for ( Int_t i = 0; i < fDetElements.GetSize(); i++ ) {
+
+ AliMpDetElement* detElement
+ = (AliMpDetElement*)fDetElements.GetObject(i);
+
+ if (deName.CompareTo(detElement->GetDEName()) == 0)
+
+ return detElement;
+ }
+
+ if (warn) {
+ AliErrorClassStream()
+ << "Detection element with name" << deName.Data() << " not defined." << endl;
+ }
+
+ return 0x0;
+
+}
//______________________________________________________________________________
AliMpIntPair AliMpDEStore::GetDetElemIdManu(Int_t manuSerial) const
{
// manu with this serial number does not exist
return AliMpIntPair::Invalid();
}
+
#include "AliMpIntPair.h"
class AliMpDetElement;
+class TString;
class AliMpDEStore : public TObject {
// methods
AliMpDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true) const;
+ AliMpDetElement* GetDetElement(const TString& detName, Bool_t warn = true) const;
+
AliMpIntPair GetDetElemIdManu(Int_t manuSerial) const;
private: