]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/MUONmapping/AliMpLocalBoard.h
Fixes for object target dependencies
[u/mrichter/AliRoot.git] / MUON / MUONmapping / AliMpLocalBoard.h
CommitLineData
4fb5ef65 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
5// $MpId: AliMpManuGeo.h,v 1.5 2006/05/24 13:58:16 ivana Exp $
6
101ae099 7/// \ingroup mptrigger
4fb5ef65 8/// \class AliMpLocalBoard
9/// \brief Class that manages the properties of the local board
10///
11/// \author Ch. Finck; Subatech Nantes
12
13#ifndef ALI_MP_LOCAL_BOARD_H
14#define ALI_MP_LOCAL_BOARD_H
15
16#include <TNamed.h>
17
168e9c4d 18#include "AliMpArrayI.h"
19#include "AliMpEncodePair.h"
4fb5ef65 20
21class TString;
22
23class AliMpLocalBoard : public TNamed
24{
25
26 public:
27 AliMpLocalBoard(Int_t id, const Char_t* name, Int_t slot);
28 AliMpLocalBoard(TRootIOCtor* /*ioCtor*/);
29 virtual ~AliMpLocalBoard();
30
31 // detElem
32 Bool_t AddDE(Int_t detElemId);
33 Int_t GetNofDEs() const;
34 Int_t GetDEId(Int_t index) const;
35 Int_t GetDEIdByChamber(Int_t chamberId) const;
36 Bool_t HasDEId(Int_t detElemId) const;
37
38 // get methods
39 //
40 /// Return the identifier (unique)
41 Int_t GetId() const {return fId;}
42 /// Return the slot Identifier in the given crate
43 Int_t GetSlot() const {return fSlot;}
44
3ac706ec 45 /// set slot
46 void SetSlot(Int_t slot) {fSlot = slot;}
47
4fb5ef65 48 // Switches
49 //
60e510d4 50 /// Get switch bit wise (return a inteter for backware compatibility)
4fb5ef65 51 Int_t GetSwitch(Int_t index) const;
96ebe67e 52 /// Set switch in a compact way
60e510d4 53 void SetSwitch(UInt_t swit);
96ebe67e 54 /// Get switch in a compact way
3ac706ec 55 UInt_t GetSwitch() const {return fSwitch;}
56
354e70ca 57 // switch enum for local board (see PRR, chpt: 2.4.4)
58 enum {kX2d, kX2m, kX2u, ///< (1) indicate a change of strip pitch in Y circuit
59 kOR0, kOR1, ///< taking into account the different segmentation in Y from MT1 to MT2
60 kENY, ///< (0) enable communication in Y to n+/-1 board via tranverse connector, (1) disable
61 kZeroAllYLSB,///< (1) reset the LSB for special configuration of board RC2L5B4 & RC2L6B1
62 kZeroDown, ///< (0) information is expected from n-1 board for X input, (1) not
63 kZeroMiddle, ///< (0) always, not used
64 kZeroUp }; ///< (0) information is expected from n+1 board for X input, (1) not
4fb5ef65 65
66 // Transverse connector
67 //
68 /// Set transverse connector
69 void SetTC(Bool_t connect) {fTC = connect;}
70 /// Return transverse connector
71 Bool_t GetTC() const {return fTC;}
72
73 // Crate name
74 //
75 /// Set crate name
76 void SetCrate(TString name) {fCrate = name;}
77 /// Return crate name
78 TString GetCrate() const {return fCrate;}
79
80 // Notify
81 //
82 /// Set notified flag (not copy card)
83 void SetNotified(Bool_t notify) {fNotified = notify;}
84 /// Return notified flag (not copy card)
85 Bool_t IsNotified() const {return fNotified;}
86
60e510d4 87
88 /// given position (line, col)
168e9c4d 89 MpPair_t GetPosition() const;
4fb5ef65 90
354e70ca 91 // Id to be copy to or from
a335a844 92
93 /// Get Id from where the X input are copied
9ee1d6ff 94 Int_t GetInputXfrom() const {return fInputXfrom;}
a335a844 95 /// Get Id to where the X input are copied
9ee1d6ff 96 Int_t GetInputXto() const {return fInputXto;}
a335a844 97 /// Get Id from where the Y input are copied
9ee1d6ff 98 Int_t GetInputYfrom() const {return fInputYfrom;}
a335a844 99 /// Get Id to where the Y input are copied
9ee1d6ff 100 Int_t GetInputYto() const {return fInputYto;}
354e70ca 101
a335a844 102 /// Set Id from where the X input are copied
354e70ca 103 void SetInputXfrom(Int_t id) {fInputXfrom = id;}
a335a844 104 /// Set Id to where the X input are copied
354e70ca 105 void SetInputXto(Int_t id) {fInputXto = id;}
a335a844 106 /// Set Id from where the Y input are copied
354e70ca 107 void SetInputYfrom(Int_t id) {fInputYfrom = id;}
a335a844 108 /// Set Id to where the Y input are copied
354e70ca 109 void SetInputYto(Int_t id) {fInputYto = id;}
4fb5ef65 110
111 private:
112 /// Not implemented
113 AliMpLocalBoard();
114 /// Not implemented
115 AliMpLocalBoard(const AliMpLocalBoard& src);
116 /// Not implemented
117 AliMpLocalBoard& operator = (const AliMpLocalBoard& src) ;
118
119 Int_t GetIndex(Int_t chamberId) const;
120
121 Int_t fId; ///< Identifier (unique)
122 Int_t fSlot; ///< Slot Identifier in the given crate
4fb5ef65 123 Bool_t fTC; ///< Transverse connector
124 TString fCrate; ///< Crate name
3ac706ec 125 UInt_t fSwitch; ///< switches in compact way
4fb5ef65 126 Bool_t fNotified; ///< notified flag (not copy card)
354e70ca 127 AliMpArrayI fDEId; ///< list of Detection element to which this local board is connected
128 Int_t fInputXfrom;///< local id of x3-4 inputs copied from (zero: not copied)
129 Int_t fInputXto; ///< local id of x3-4 inputs copied to (zero: not copied)
130 Int_t fInputYfrom;///< local id of y1-4 inputs copied from (zero: not copied)
131 Int_t fInputYto; ///< local id of y1-4 inputs copied to (zero: not copied)
4fb5ef65 132
60e510d4 133 ClassDef(AliMpLocalBoard,3) //utility class for the motif type
4fb5ef65 134};
135
136
137#endif