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 **************************************************************************/
16 #include "AliQAThresholds.h"
20 ClassImp(AliQAThresholds)
22 AliQAThresholds::AliQAThresholds(Int_t detId): TNamed(), fThresholds(), fDetectorId(detId)
26 fThresholds.SetOwner(kTRUE);
29 AliQAThresholds::~AliQAThresholds()
34 const char* AliQAThresholds::GetName() const
36 return AliDAQ::OnlineName(fDetectorId);
39 const char* AliQAThresholds::GetTitle() const
41 return AliDAQ::OnlineName(fDetectorId);
44 Int_t AliQAThresholds::GetDetectorId()
49 void AliQAThresholds::SetDetectorId(Int_t i)
54 void AliQAThresholds::AddThreshold(TParameter<long>* item)
56 // Add a threshold at the end of the array of thresholds.
57 // Ownership of the object is transfered to AliQAThresholds.
59 fThresholds.Add(item);
61 void AliQAThresholds::AddThreshold(TParameter<int>* item)
63 // Add a threshold at the end of the array of thresholds.
64 // Ownership of the object is transfered to AliQAThresholds.
66 fThresholds.Add(item);
68 void AliQAThresholds::AddThreshold(TParameter<double>* item)
70 // Add a threshold at the end of the array of thresholds.
71 // Ownership of the object is transfered to AliQAThresholds.
73 fThresholds.Add(item);
75 void AliQAThresholds::AddThreshold(TParameter<float>* item)
77 // Add a threshold at the end of the array of thresholds.
78 // Ownership of the object is transfered to AliQAThresholds.
80 fThresholds.Add(item);
83 void AliQAThresholds::AddThresholdAt(TParameter<int>* item, Int_t index)
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.
89 fThresholds.AddAtAndExpand(item, index);
91 void AliQAThresholds::AddThresholdAt(TParameter<long>* item, Int_t index)
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.
97 fThresholds.AddAtAndExpand(item, index);
99 void AliQAThresholds::AddThresholdAt(TParameter<double>* item, Int_t index)
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.
105 fThresholds.AddAtAndExpand(item, index);
107 void AliQAThresholds::AddThresholdAt(TParameter<float>* item, Int_t index)
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.
113 fThresholds.AddAtAndExpand(item, index);
116 TObject* AliQAThresholds::GetThreshold(Int_t i)
118 // Return the object at position i. Returns 0 if i is out of bounds.
120 return fThresholds.At(i);
123 Int_t AliQAThresholds::GetSize()
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.
128 return fThresholds.GetSize();