]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpTriggerCrate.h
In Print(): added an option to print area borders
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpTriggerCrate.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $MpId: $ 
5
6 /// \ingroup management
7 /// \class AliMpTriggerCrate
8 /// \brief The class defines the properties of trigger crate
9 ///
10 /// \author Ch. Finck, Subatech Nantes
11
12 #ifndef ALI_MP_TRIGGER_CRATE_H
13 #define ALI_MP_TRIGGER_CRATE_H
14
15 #include "AliMpArrayI.h"
16
17 #include <TNamed.h>
18 #include <TString.h>
19
20 class AliMpTriggerCrate : public  TNamed {
21
22   public:
23     AliMpTriggerCrate(const Char_t* name, Int_t ddlId);
24     AliMpTriggerCrate(const Char_t* name, UShort_t Id, UShort_t mask, UShort_t mode, UShort_t coinc);
25     AliMpTriggerCrate(TRootIOCtor* /*ioCtor*/);
26     virtual ~AliMpTriggerCrate();
27     
28     static TString GenerateName(Int_t crateId, Int_t ddlId, Int_t nodDdls);
29
30     // methods 
31     Bool_t AddLocalBoard(Int_t localBoardId);
32
33     /// get methods
34     Int_t  GetDdlId() const;
35     UShort_t GetId()  const;
36     UShort_t GetMask() const;
37     UShort_t GetMode() const;
38     UShort_t GetCoinc() const;
39     Int_t  GetNofLocalBoards() const;
40     Int_t  GetLocalBoardId(Int_t index) const;
41     Bool_t HasLocalBoard(Int_t localBoardId) const;
42     
43     /// set methods
44     void SetDdlId(Int_t ddl) {fDdlId = ddl;}
45     
46   private:
47     /// Not implemented
48     AliMpTriggerCrate();
49     /// Not implemented
50     AliMpTriggerCrate(const AliMpTriggerCrate& rhs);
51     /// Not implemented
52     AliMpTriggerCrate& operator=(const AliMpTriggerCrate& rhs);
53
54     // data members
55     UShort_t     fId;         ///< crate number
56     Int_t        fDdlId;      ///< DDL to which this bus patch is connected
57     AliMpArrayI  fLocalBoard; ///< local board connected to this crate
58     UShort_t     fMask;       ///< regional mask
59     UShort_t     fMode;       ///< mode operating for crate
60     UShort_t     fCoinc;      ///< coincidence mode for crate
61
62   ClassDef(AliMpTriggerCrate,2)  // The class collectiong electronics properties of DDL
63 };
64
65 // inline functions
66
67
68 /// Return the Ddl  Id
69 inline Int_t AliMpTriggerCrate::GetDdlId() const
70 {  return fDdlId; }
71
72 /// Return  Id
73 inline UShort_t AliMpTriggerCrate::GetId() const
74 {  return fId; }
75
76 /// Return mask
77 inline UShort_t AliMpTriggerCrate::GetMask() const
78 {  return fMask; }
79
80 /// Return Mode
81 inline UShort_t AliMpTriggerCrate::GetMode() const
82 {  return fMode; }
83
84 /// Return coinc
85 inline UShort_t AliMpTriggerCrate::GetCoinc() const
86 {  return fCoinc; }
87
88 #endif //ALI_MP_TRIGGER__CRATE_H
89
90
91
92
93
94
95
96
97
98
99
100
101
102