Line data Source code
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 18 : ClassImp(AliMUONTriggerCrateConfig)
34 : /// \endcond
35 :
36 : //______________________________________________________________________________
37 : AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(AliMpTriggerCrate* mpTriggerCrate)
38 0 : : TObject(),
39 0 : fMpCrate(mpTriggerCrate),
40 0 : fMask(0),
41 0 : fMode(0),
42 0 : fCoinc(0),
43 0 : fId(0),
44 0 : fLocalBoard()
45 0 : {
46 : /// Standard constructor for Shuttle + DA
47 :
48 0 : if ( mpTriggerCrate ) {
49 0 : fId = mpTriggerCrate->GetId();
50 0 : for ( Int_t i=0; i<mpTriggerCrate->GetNofLocalBoards(); ++i ) {
51 0 : fLocalBoard.Add(mpTriggerCrate->GetLocalBoardId(i));
52 : }
53 0 : }
54 0 : }
55 :
56 :
57 : //______________________________________________________________________________
58 : AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(TRootIOCtor* ioCtor)
59 48 : : TObject(),
60 48 : fMpCrate(0x0),
61 48 : fMask(0),
62 48 : fMode(0),
63 48 : fCoinc(0),
64 48 : fId(0),
65 48 : fLocalBoard(ioCtor)
66 240 : {
67 : /// Standard constructor for Shuttle + DA
68 96 : }
69 :
70 :
71 : //______________________________________________________________________________
72 : AliMUONTriggerCrateConfig::~AliMUONTriggerCrateConfig()
73 0 : {
74 : /// Destructor
75 0 : }
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 0 : fLocalBoard.Add(localBoardId);
88 0 : 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 0 : 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 0 : 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 0 : 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 0 : 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 0 : return fLocalBoard.GetValue(index);
132 : }
|