]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/STEER/AliQAThresholds.cxx
Restore the processing statistics per event
[u/mrichter/AliRoot.git] / STEER / STEER / AliQAThresholds.cxx
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 #include "AliQAThresholds.h"
17
18 #include "AliDAQ.h"
19
20 ClassImp(AliQAThresholds)
21
22   AliQAThresholds::AliQAThresholds(Int_t detId): TNamed(), fThresholds(), fDetectorId(detId)
23 {
24   // constructor
25
26   fThresholds.SetOwner(kTRUE);
27 }
28
29 AliQAThresholds::~AliQAThresholds()
30 {
31   // destructor
32 }
33
34 const char* AliQAThresholds::GetName() const 
35 {
36   return AliDAQ::OnlineName(fDetectorId);
37 }
38
39 const char* AliQAThresholds::GetTitle() const 
40 {
41   return AliDAQ::OnlineName(fDetectorId);
42 }
43
44 Int_t AliQAThresholds::GetDetectorId()
45 {
46   return fDetectorId;
47 }
48
49 void AliQAThresholds::SetDetectorId(Int_t i)
50 {
51   fDetectorId = i;
52 }
53
54 void AliQAThresholds::AddThreshold(TParameter<long>* item)
55 {
56   // Add a threshold at the end of the array of thresholds.
57   // Ownership of the object is transfered to AliQAThresholds.
58
59   fThresholds.Add(item);
60 }
61 void AliQAThresholds::AddThreshold(TParameter<int>* item)
62 {
63   // Add a threshold at the end of the array of thresholds.
64   // Ownership of the object is transfered to AliQAThresholds.
65
66   fThresholds.Add(item);
67 }
68 void AliQAThresholds::AddThreshold(TParameter<double>* item)
69 {
70   // Add a threshold at the end of the array of thresholds.
71   // Ownership of the object is transfered to AliQAThresholds.
72
73   fThresholds.Add(item);
74 }
75 void AliQAThresholds::AddThreshold(TParameter<float>* item)
76 {
77   // Add a threshold at the end of the array of thresholds.
78   // Ownership of the object is transfered to AliQAThresholds.
79
80   fThresholds.Add(item);
81 }
82
83 void AliQAThresholds::AddThresholdAt(TParameter<int>* item, Int_t index)
84 {
85   // Add a threshold at index 'index' in the array of thresholds.
86   // If index is larger than the current size of the array, expand the array.
87   // Ownership of the object is transfered to AliQAThresholds.
88
89   fThresholds.AddAtAndExpand(item, index);
90 }
91 void AliQAThresholds::AddThresholdAt(TParameter<long>* item, Int_t index)
92 {
93   // Add a threshold at index 'index' in the array of thresholds.
94   // If index is larger than the current size of the array, expand the array.
95   // Ownership of the object is transfered to AliQAThresholds.
96
97   fThresholds.AddAtAndExpand(item, index);
98 }
99 void AliQAThresholds::AddThresholdAt(TParameter<double>* item, Int_t index)
100 {
101   // Add a threshold at index 'index' in the array of thresholds.
102   // If index is larger than the current size of the array, expand the array.
103   // Ownership of the object is transfered to AliQAThresholds.
104
105   fThresholds.AddAtAndExpand(item, index);
106 }
107 void AliQAThresholds::AddThresholdAt(TParameter<float>* item, Int_t index)
108 {
109   // Add a threshold at index 'index' in the array of thresholds.
110   // If index is larger than the current size of the array, expand the array.
111   // Ownership of the object is transfered to AliQAThresholds.
112
113   fThresholds.AddAtAndExpand(item, index);
114 }
115
116 TObject* AliQAThresholds::GetThreshold(Int_t i)
117 {
118   // Return the object at position i. Returns 0 if i is out of bounds.
119
120   return fThresholds.At(i);
121 }
122
123 Int_t AliQAThresholds::GetSize()
124 {
125   // Return the number of elements in the thresholds array. 
126   // Beware that it is not the number of thresholds, as some elements of the array can be null. 
127
128   return fThresholds.GetSize();
129 }