]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTriggerCrateConfig.cxx
Update for 2012
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerCrateConfig.cxx
CommitLineData
92c23b09 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
33ClassImp(AliMUONTriggerCrateConfig)
34/// \endcond
35
92c23b09 36 //______________________________________________________________________________
5cc125b2 37AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(AliMpTriggerCrate* mpTriggerCrate)
38 : TObject(),
39 fMpCrate(mpTriggerCrate),
92c23b09 40 fMask(0),
41 fMode(0),
1497cb86 42 fCoinc(0),
43 fId(0),
44 fLocalBoard()
92c23b09 45{
46/// Standard constructor for Shuttle + DA
1497cb86 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 }
92c23b09 54}
55
56
57 //______________________________________________________________________________
5cc125b2 58AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(TRootIOCtor* ioCtor)
59 : TObject(),
60 fMpCrate(0x0),
61 fMask(0),
62 fMode(0),
1497cb86 63 fCoinc(0),
64 fId(0),
d011bba5 65 fLocalBoard(ioCtor)
92c23b09 66{
67/// Standard constructor for Shuttle + DA
68}
69
70
71//______________________________________________________________________________
72AliMUONTriggerCrateConfig::~AliMUONTriggerCrateConfig()
73{
74/// Destructor
75}
76
77//
78// public methods
79//
80
81//______________________________________________________________________________
82Bool_t AliMUONTriggerCrateConfig::AddLocalBoard(Int_t localBoardId)
83{
5cc125b2 84/// Add local boards with given detElemId.
85/// Return true if the local board was added
86
1497cb86 87 fLocalBoard.Add(localBoardId);
5cc125b2 88 return fMpCrate->AddLocalBoard(localBoardId);
92c23b09 89}
90
91
92//______________________________________________________________________________
93Int_t AliMUONTriggerCrateConfig::GetNofLocalBoards() const
94{
95/// Return the number of local board in this crate
96
5cc125b2 97 return fMpCrate->GetNofLocalBoards();
92c23b09 98}
99
100//______________________________________________________________________________
101Int_t AliMUONTriggerCrateConfig::GetLocalBoardId(Int_t index) const
102{
103/// Return the local board by index (in loop)
104
5cc125b2 105 return fMpCrate->GetLocalBoardId(index);
92c23b09 106}
107
108//______________________________________________________________________________
109Bool_t AliMUONTriggerCrateConfig::HasLocalBoard(Int_t localBoardId) const
110{
111/// Return true if crate has local boardwith given localBoardId
112
5cc125b2 113 return fMpCrate->HasLocalBoard(localBoardId);
92c23b09 114}
115
1497cb86 116
117//______________________________________________________________________________
118Int_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//______________________________________________________________________________
126Int_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}