X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2Fmapping%2FAliMpLocalBoard.cxx;h=c3efaa88756d1223f217465f67e1829b98eed796;hb=6aa395488aa04df2345f9e17a25f9eaef2aec91d;hp=3dc0e5aa465e8982551d2443ec463ea5fc765dea;hpb=4fb5ef653c61fd4b05a6f295bb11b852fe9854d7;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/mapping/AliMpLocalBoard.cxx b/MUON/mapping/AliMpLocalBoard.cxx index 3dc0e5aa465..c3efaa88756 100644 --- a/MUON/mapping/AliMpLocalBoard.cxx +++ b/MUON/mapping/AliMpLocalBoard.cxx @@ -13,13 +13,14 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +// $Id$ -// -// -------------------- +//----------------------------------------------------------------------------- // Class AliMpLocalBoard // -------------------- // The class defines the properties of local board // Author: Ch. Finck, Subatech Nantes +//----------------------------------------------------------------------------- #include "AliMpLocalBoard.h" #include "AliMpConstants.h" @@ -42,10 +43,13 @@ AliMpLocalBoard::AliMpLocalBoard(Int_t id, const Char_t* name, Int_t slot) fSlot(slot), fTC(true), fCrate(), - fSwitches(false), + fSwitch(0), fNotified(true), - fDEId(false) - + fDEId(false), + fInputXfrom(0), + fInputXto(0), + fInputYfrom(0), + fInputYto(0) { /// Default constructor } @@ -57,9 +61,13 @@ AliMpLocalBoard::AliMpLocalBoard(TRootIOCtor* /*ioCtor*/) fSlot(), fTC(), fCrate(), - fSwitches(), + fSwitch(), fNotified(), - fDEId() + fDEId(), + fInputXfrom(0), + fInputXto(0), + fInputYfrom(0), + fInputYto(0) { /// Root IO constructor } @@ -148,42 +156,24 @@ Bool_t AliMpLocalBoard::HasDEId(Int_t detElemId) const } //______________________________________________________________________________ -Bool_t AliMpLocalBoard::AddSwitch(Int_t swit) +void AliMpLocalBoard::SetSwitch(UInt_t swit) { -/// Add a swicth for the given local board -/// Return true if switch was added - - if ( swit > 1 ) { - AliWarningStream() - << "Invalid value for switch = " << swit - << endl; - return false; - } - - fSwitches.Add(swit); - return true; -} - - -//______________________________________________________________________________ -Int_t AliMpLocalBoard::GetNofSwitches() const -{ -/// Return the number switches in this local board - - return fSwitches.GetSize(); +/// set compact switch + + fSwitch = swit; + } //______________________________________________________________________________ Int_t AliMpLocalBoard::GetSwitch(Int_t index) const { -/// Return switch by index (in loop) +/// Return switch bit wise - if (index < fSwitches.GetSize()) - return fSwitches.GetValue(index); - else + if (index > 9) { AliWarning("Switch index too large"); - - return -1; + return -1; + } + return (fSwitch >> (9-index)) & 0x1; } //______________________________________________________________________________ @@ -194,9 +184,7 @@ AliMpIntPair AliMpLocalBoard::GetPosition() const const Char_t* boardName = GetName(); Int_t iLine = boardName[4] - '0'; Int_t iCol = boardName[2] - '0'; - if ( iLine == 5 ) --iCol; return (AliMpIntPair(iLine, iCol)); - }