]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added switch as new member for DA (Christian)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Nov 2007 11:57:23 +0000 (11:57 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Nov 2007 11:57:23 +0000 (11:57 +0000)
MUON/mapping/AliMpLocalBoard.cxx
MUON/mapping/AliMpLocalBoard.h

index 06be4d0802859445ff98e42804a285454554de15..17100f2a7e5072c81be01ae07d89839f3389c379 100644 (file)
@@ -44,6 +44,7 @@ AliMpLocalBoard::AliMpLocalBoard(Int_t id, const Char_t* name, Int_t slot)
       fTC(true),
       fCrate(),
       fSwitches(false),
+      fSwitch(0),
       fNotified(true),
       fDEId(false),
       fInputXfrom(0),
@@ -62,6 +63,7 @@ AliMpLocalBoard::AliMpLocalBoard(TRootIOCtor* /*ioCtor*/)
       fTC(),
       fCrate(),
       fSwitches(),
+      fSwitch(),
       fNotified(),
       fDEId(),
       fInputXfrom(0),
@@ -169,6 +171,8 @@ Bool_t AliMpLocalBoard::AddSwitch(Int_t swit)
     }
 
     fSwitches.Add(swit);
+    fSwitch <<= 1;
+    fSwitch |= (swit & 0x1);
     return true;
 }   
 
index d5c76a1a9784e2a54f5d1d70835eaf2fc095794c..0624ec794209f7b505ba4ce8ee3d44b495a69604 100644 (file)
@@ -41,12 +41,18 @@ class AliMpLocalBoard : public TNamed
            /// Return the slot Identifier in the given crate
     Int_t  GetSlot() const {return fSlot;}
 
+    /// set slot
+    void   SetSlot(Int_t slot) {fSlot = slot;}
+
     // Switches
     //
     Bool_t AddSwitch(Int_t swit);
     Int_t  GetNofSwitches() const;
     Int_t  GetSwitch(Int_t index) const;
 
+    void   SetSwitch(UInt_t swit) {fSwitch = swit;}
+    UInt_t  GetSwitch() const {return fSwitch;}
+
     // switch enum for local board (see PRR, chpt: 2.4.4)
     enum {kX2d, kX2m, kX2u, ///< (1) indicate a change of strip pitch in Y circuit
          kOR0, kOR1,  ///< taking into account the different segmentation in Y from MT1 to MT2
@@ -116,6 +122,7 @@ class AliMpLocalBoard : public TNamed
    Bool_t      fTC;       ///< Transverse connector
    TString     fCrate;    ///< Crate name
    AliMpArrayI fSwitches; ///< switches
+   UInt_t      fSwitch;   ///< switches in compact way
    Bool_t      fNotified; ///< notified flag (not copy card)
    AliMpArrayI fDEId;     ///< list of Detection element to which this local board is connected
    Int_t       fInputXfrom;///< local id of x3-4 inputs copied from (zero: not copied)
@@ -123,7 +130,7 @@ class AliMpLocalBoard : public TNamed
    Int_t       fInputYfrom;///< local id of y1-4 inputs copied from (zero: not copied)
    Int_t       fInputYto;  ///< local id of y1-4 inputs copied to (zero: not copied)
 
-  ClassDef(AliMpLocalBoard,1) //utility class for the motif type
+  ClassDef(AliMpLocalBoard,2) //utility class for the motif type
 };