]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | // $MpId: AliMpTrigger.cxx,v 1.4 2006/05/24 13:58:52 ivana Exp $ | |
18 | ||
19 | //----------------------------------------------------------------------------- | |
20 | // Class AliMUONTriggerCrateConfig | |
21 | // -------------------- | |
22 | // The class defines the configuration of trigger crate | |
23 | // Author: Ch. Finck, Subatech Nantes | |
24 | //----------------------------------------------------------------------------- | |
25 | ||
26 | #include "AliMUONTriggerCrateConfig.h" | |
27 | ||
28 | #include "AliLog.h" | |
29 | ||
30 | #include <Riostream.h> | |
31 | ||
32 | /// \cond CLASSIMP | |
33 | ClassImp(AliMUONTriggerCrateConfig) | |
34 | /// \endcond | |
35 | ||
36 | //______________________________________________________________________________ | |
37 | AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(AliMpTriggerCrate* mpTriggerCrate) | |
38 | : TObject(), | |
39 | fMpCrate(mpTriggerCrate), | |
40 | fMask(0), | |
41 | fMode(0), | |
42 | fCoinc(0), | |
43 | fId(0), | |
44 | fLocalBoard() | |
45 | { | |
46 | /// Standard constructor for Shuttle + DA | |
47 | ||
48 | if ( mpTriggerCrate ) { | |
49 | fId = mpTriggerCrate->GetId(); | |
50 | for ( Int_t i=0; i<mpTriggerCrate->GetNofLocalBoards(); ++i ) { | |
51 | fLocalBoard.Add(mpTriggerCrate->GetLocalBoardId(i)); | |
52 | } | |
53 | } | |
54 | } | |
55 | ||
56 | ||
57 | //______________________________________________________________________________ | |
58 | AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(TRootIOCtor* ioCtor) | |
59 | : TObject(), | |
60 | fMpCrate(0x0), | |
61 | fMask(0), | |
62 | fMode(0), | |
63 | fCoinc(0), | |
64 | fId(0), | |
65 | fLocalBoard(ioCtor) | |
66 | { | |
67 | /// Standard constructor for Shuttle + DA | |
68 | } | |
69 | ||
70 | ||
71 | //______________________________________________________________________________ | |
72 | AliMUONTriggerCrateConfig::~AliMUONTriggerCrateConfig() | |
73 | { | |
74 | /// Destructor | |
75 | } | |
76 | ||
77 | // | |
78 | // public methods | |
79 | // | |
80 | ||
81 | //______________________________________________________________________________ | |
82 | Bool_t AliMUONTriggerCrateConfig::AddLocalBoard(Int_t localBoardId) | |
83 | { | |
84 | /// Add local boards with given detElemId. | |
85 | /// Return true if the local board was added | |
86 | ||
87 | fLocalBoard.Add(localBoardId); | |
88 | return fMpCrate->AddLocalBoard(localBoardId); | |
89 | } | |
90 | ||
91 | ||
92 | //______________________________________________________________________________ | |
93 | Int_t AliMUONTriggerCrateConfig::GetNofLocalBoards() const | |
94 | { | |
95 | /// Return the number of local board in this crate | |
96 | ||
97 | return fMpCrate->GetNofLocalBoards(); | |
98 | } | |
99 | ||
100 | //______________________________________________________________________________ | |
101 | Int_t AliMUONTriggerCrateConfig::GetLocalBoardId(Int_t index) const | |
102 | { | |
103 | /// Return the local board by index (in loop) | |
104 | ||
105 | return fMpCrate->GetLocalBoardId(index); | |
106 | } | |
107 | ||
108 | //______________________________________________________________________________ | |
109 | Bool_t AliMUONTriggerCrateConfig::HasLocalBoard(Int_t localBoardId) const | |
110 | { | |
111 | /// Return true if crate has local boardwith given localBoardId | |
112 | ||
113 | return fMpCrate->HasLocalBoard(localBoardId); | |
114 | } | |
115 | ||
116 | ||
117 | //______________________________________________________________________________ | |
118 | Int_t AliMUONTriggerCrateConfig::GetNofLocalBoardsOld() const | |
119 | { | |
120 | /// Return the number of local board in this crate from the old | |
121 | /// data member. Only for OCDB backward compatibility checking. | |
122 | ||
123 | return fLocalBoard.GetSize(); | |
124 | } | |
125 | //______________________________________________________________________________ | |
126 | Int_t AliMUONTriggerCrateConfig::GetLocalBoardIdOld(Int_t index) const | |
127 | { | |
128 | /// Return the local board by index (in loop)from the old | |
129 | /// data member. Only for OCDB backward compatibility checking. | |
130 | ||
131 | return fLocalBoard.GetValue(index); | |
132 | } |