1 /**************************************************************************
\r
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
\r
4 * Author: The ALICE Off-line Project. *
\r
5 * Contributors are mentioned in the code where appropriate. *
\r
7 * Permission to use, copy, modify and distribute this software and its *
\r
8 * documentation strictly for non-commercial purposes is hereby granted *
\r
9 * without fee, provided that the above copyright notice appears in all *
\r
10 * copies and that both the copyright notice and this permission notice *
\r
11 * appear in the supporting documentation. The authors make no claims *
\r
12 * about the suitability of this software for any purpose. It is *
\r
13 * provided "as is" without express or implied warranty. *
\r
14 **************************************************************************/
\r
16 #include "AliQAThresholds.h"
\r
18 ClassImp(AliQAThresholds)
\r
20 AliQAThresholds::AliQAThresholds(Int_t detId): TObject(), fThresholds(), fDetectorId(detId)
\r
24 fThresholds.SetOwner(kTRUE);
\r
27 AliQAThresholds::~AliQAThresholds()
\r
32 Int_t AliQAThresholds::GetDetectorId()
\r
37 void AliQAThresholds::SetDetectorId(Int_t i)
\r
42 void AliQAThresholds::AddThreshold(TParameter<long>* item)
\r
44 // Add a threshold at the end of the array of thresholds.
\r
45 // Ownership of the object is transfered to AliQAThresholds.
\r
47 fThresholds.Add(item);
\r
49 void AliQAThresholds::AddThreshold(TParameter<int>* item)
\r
51 // Add a threshold at the end of the array of thresholds.
\r
52 // Ownership of the object is transfered to AliQAThresholds.
\r
54 fThresholds.Add(item);
\r
56 void AliQAThresholds::AddThreshold(TParameter<double>* item)
\r
58 // Add a threshold at the end of the array of thresholds.
\r
59 // Ownership of the object is transfered to AliQAThresholds.
\r
61 fThresholds.Add(item);
\r
63 void AliQAThresholds::AddThreshold(TParameter<float>* item)
\r
65 // Add a threshold at the end of the array of thresholds.
\r
66 // Ownership of the object is transfered to AliQAThresholds.
\r
68 fThresholds.Add(item);
\r
71 void AliQAThresholds::AddThresholdAt(TParameter<int>* item, Int_t index)
\r
73 // Add a threshold at index 'index' in the array of thresholds.
\r
74 // If index is larger than the current size of the array, expand the array.
\r
75 // Ownership of the object is transfered to AliQAThresholds.
\r
77 fThresholds.AddAtAndExpand(item, index);
\r
79 void AliQAThresholds::AddThresholdAt(TParameter<long>* item, Int_t index)
\r
81 // Add a threshold at index 'index' in the array of thresholds.
\r
82 // If index is larger than the current size of the array, expand the array.
\r
83 // Ownership of the object is transfered to AliQAThresholds.
\r
85 fThresholds.AddAtAndExpand(item, index);
\r
87 void AliQAThresholds::AddThresholdAt(TParameter<double>* item, Int_t index)
\r
89 // Add a threshold at index 'index' in the array of thresholds.
\r
90 // If index is larger than the current size of the array, expand the array.
\r
91 // Ownership of the object is transfered to AliQAThresholds.
\r
93 fThresholds.AddAtAndExpand(item, index);
\r
95 void AliQAThresholds::AddThresholdAt(TParameter<float>* item, Int_t index)
\r
97 // Add a threshold at index 'index' in the array of thresholds.
\r
98 // If index is larger than the current size of the array, expand the array.
\r
99 // Ownership of the object is transfered to AliQAThresholds.
\r
101 fThresholds.AddAtAndExpand(item, index);
\r
104 TObject* AliQAThresholds::GetThreshold(Int_t i)
\r
106 // Return the object at position i. Returns 0 if i is out of bounds.
\r
108 return fThresholds.At(i);
\r
111 Int_t AliQAThresholds::GetSize()
\r
113 // Return the number of elements in the thresholds array.
\r
114 // Beware that it is not the number of thresholds, as some elements of the array can be null.
\r
116 return fThresholds.GetSize();
\r