1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // $MpId: AliMpTrigger.cxx,v 1.4 2006/05/24 13:58:52 ivana Exp $
19 //-----------------------------------------------------------------------------
20 // Class AliMUONTriggerCrateConfig
21 // --------------------
22 // The class defines the configuration of trigger crate
23 // Author: Ch. Finck, Subatech Nantes
24 //-----------------------------------------------------------------------------
26 #include "AliMUONTriggerCrateConfig.h"
30 #include <Riostream.h>
33 ClassImp(AliMUONTriggerCrateConfig)
36 //______________________________________________________________________________
37 AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(AliMpTriggerCrate* mpTriggerCrate)
39 fMpCrate(mpTriggerCrate),
46 /// Standard constructor for Shuttle + DA
48 if ( mpTriggerCrate ) {
49 fId = mpTriggerCrate->GetId();
50 for ( Int_t i=0; i<mpTriggerCrate->GetNofLocalBoards(); ++i ) {
51 fLocalBoard.Add(mpTriggerCrate->GetLocalBoardId(i));
57 //______________________________________________________________________________
58 AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(TRootIOCtor* ioCtor)
67 /// Standard constructor for Shuttle + DA
71 //______________________________________________________________________________
72 AliMUONTriggerCrateConfig::~AliMUONTriggerCrateConfig()
81 //______________________________________________________________________________
82 Bool_t AliMUONTriggerCrateConfig::AddLocalBoard(Int_t localBoardId)
84 /// Add local boards with given detElemId.
85 /// Return true if the local board was added
87 fLocalBoard.Add(localBoardId);
88 return fMpCrate->AddLocalBoard(localBoardId);
92 //______________________________________________________________________________
93 Int_t AliMUONTriggerCrateConfig::GetNofLocalBoards() const
95 /// Return the number of local board in this crate
97 return fMpCrate->GetNofLocalBoards();
100 //______________________________________________________________________________
101 Int_t AliMUONTriggerCrateConfig::GetLocalBoardId(Int_t index) const
103 /// Return the local board by index (in loop)
105 return fMpCrate->GetLocalBoardId(index);
108 //______________________________________________________________________________
109 Bool_t AliMUONTriggerCrateConfig::HasLocalBoard(Int_t localBoardId) const
111 /// Return true if crate has local boardwith given localBoardId
113 return fMpCrate->HasLocalBoard(localBoardId);
117 //______________________________________________________________________________
118 Int_t AliMUONTriggerCrateConfig::GetNofLocalBoardsOld() const
120 /// Return the number of local board in this crate from the old
121 /// data member. Only for OCDB backward compatibility checking.
123 return fLocalBoard.GetSize();
125 //______________________________________________________________________________
126 Int_t AliMUONTriggerCrateConfig::GetLocalBoardIdOld(Int_t index) const
128 /// Return the local board by index (in loop)from the old
129 /// data member. Only for OCDB backward compatibility checking.
131 return fLocalBoard.GetValue(index);