]>
Commit | Line | Data |
---|---|---|
ba030c0e | 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 | ||
88cb7938 | 16 | /* $Id$ */ |
ba030c0e | 17 | |
18 | // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay | |
19 | // | |
20 | // Class AliMUONSt1ResponseRule | |
21 | // ----------------------------- | |
22 | // Describes a response rule. | |
23 | // A "rule" is defined as being a set of electronic filters to be applied | |
24 | // (ie. a set of AliMUONSt1ResponseParameter) and a set of cathode pads to | |
25 | // which these filters should be applied (set of AliMUONSt1ElectronicElement) | |
5f1df83a | 26 | // Included in AliRoot 2003/01/28 |
ba030c0e | 27 | |
3c25381f | 28 | #include "AliMpPad.h" |
29 | ||
ba030c0e | 30 | #include "AliMUONSt1ResponseRule.h" |
31 | #include "AliMUONSt1ElectronicElement.h" | |
32 | #include "AliMUONSt1ResponseParameter.h" | |
33 | ||
34 | ClassImp(AliMUONSt1ResponseRule); | |
35 | ||
36 | //__________________________________________________________________________ | |
37 | AliMUONSt1ResponseRule::AliMUONSt1ResponseRule() | |
38 | : TObject(), | |
39 | fElementList(), | |
40 | fParameters() | |
41 | { | |
42 | // default constructor | |
43 | } | |
44 | ||
45 | //__________________________________________________________________________ | |
46 | AliMUONSt1ResponseRule::~AliMUONSt1ResponseRule() | |
47 | { | |
48 | // destructor | |
49 | } | |
50 | ||
51 | //__________________________________________________________________________ | |
52 | void AliMUONSt1ResponseRule::AddElement(AliMUONSt1ElectronicElement* element) | |
53 | { | |
54 | // Add an electronic element to the list | |
55 | // --- | |
56 | ||
57 | fElementList.Add(element); | |
58 | } | |
59 | ||
60 | //__________________________________________________________________________ | |
61 | void AliMUONSt1ResponseRule::AddParameter(AliMUONSt1ResponseParameter* param) | |
62 | { | |
63 | // Add an electronics parameter for this rule | |
64 | // --- | |
65 | ||
66 | fParameters.Add(param); | |
67 | } | |
68 | ||
69 | //__________________________________________________________________________ | |
5f91c9e8 | 70 | Bool_t AliMUONSt1ResponseRule::Contains(const AliMpPad& pad) const |
ba030c0e | 71 | { |
72 | // Is this pad is contained in this rule's list | |
73 | // --- | |
74 | ||
75 | TIter next(&fElementList); | |
76 | AliMUONSt1ElectronicElement* el; | |
77 | while ((el = static_cast<AliMUONSt1ElectronicElement*>(next()))){ | |
78 | if (el->Contains(pad)) return kTRUE; | |
79 | } | |
80 | return kFALSE; | |
81 | } |