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)
37 //______________________________________________________________________________
38 AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig()
39 : TNamed("Trigger Crate","configuration trigger crate"),
46 /// Standard constructor for Shuttle + DA
50 //______________________________________________________________________________
51 AliMUONTriggerCrateConfig::AliMUONTriggerCrateConfig(const Char_t* name, UShort_t id, UShort_t mask, UShort_t mode, UShort_t coinc)
52 : TNamed(name, "configuration trigger crate"),
59 /// Standard constructor for Shuttle + DA
63 //______________________________________________________________________________
64 AliMUONTriggerCrateConfig::~AliMUONTriggerCrateConfig()
73 //______________________________________________________________________________
74 Bool_t AliMUONTriggerCrateConfig::AddLocalBoard(Int_t localBoardId)
76 /// Add detection element with given detElemId.
77 /// Return true if the detection element was added
79 if ( HasLocalBoard(localBoardId) ) {
81 << "Local board with Id=" << localBoardId << " already present."
86 fLocalBoard.Add(localBoardId);
91 //______________________________________________________________________________
92 Int_t AliMUONTriggerCrateConfig::GetNofLocalBoards() const
94 /// Return the number of local board in this crate
96 return fLocalBoard.GetSize();
99 //______________________________________________________________________________
100 Int_t AliMUONTriggerCrateConfig::GetLocalBoardId(Int_t index) const
102 /// Return the local board by index (in loop)
104 if (index >= 0 && index < fLocalBoard.GetSize())
105 return fLocalBoard.GetValue(index);
107 return 0; // begin at 1
110 //______________________________________________________________________________
111 Bool_t AliMUONTriggerCrateConfig::HasLocalBoard(Int_t localBoardId) const
113 /// Return true if crate has local boardwith given localBoardId
115 return fLocalBoard.HasValue(localBoardId);