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"
18 ClassImp(AliQAThresholds)
20 AliQAThresholds::AliQAThresholds(Int_t detId): TObject(), fThresholds(), fDetectorId(detId)
23 fThresholds.SetOwner(kTRUE);
26 AliQAThresholds::~AliQAThresholds()
31 Int_t AliQAThresholds::GetDetectorId()
36 void AliQAThresholds::SetDetectorId(Int_t i)
41 void AliQAThresholds::AddThreshold(TParameter<long>* item)
43 // Add a threshold at the end of the array of thresholds.
44 // Ownership of the object is transfered to AliQAThresholds.
46 fThresholds.Add(item);
48 void AliQAThresholds::AddThreshold(TParameter<int>* item)
50 // Add a threshold at the end of the array of thresholds.
51 // Ownership of the object is transfered to AliQAThresholds.
53 fThresholds.Add(item);
55 void AliQAThresholds::AddThreshold(TParameter<double>* item)
57 // Add a threshold at the end of the array of thresholds.
58 // Ownership of the object is transfered to AliQAThresholds.
60 fThresholds.Add(item);
63 void AliQAThresholds::AddThresholdAt(TParameter<int>* item, Int_t index)
65 // Add a threshold at index 'index' in the array of thresholds.
66 // If index is larger than the current size of the array, expand the array.
67 // Ownership of the object is transfered to AliQAThresholds.
69 fThresholds.AddAtAndExpand(item, index);
71 void AliQAThresholds::AddThresholdAt(TParameter<long>* item, Int_t index)
73 // Add a threshold at index 'index' in the array of thresholds.
74 // If index is larger than the current size of the array, expand the array.
75 // Ownership of the object is transfered to AliQAThresholds.
77 fThresholds.AddAtAndExpand(item, index);
79 void AliQAThresholds::AddThresholdAt(TParameter<double>* item, Int_t index)
81 // Add a threshold at index 'index' in the array of thresholds.
82 // If index is larger than the current size of the array, expand the array.
83 // Ownership of the object is transfered to AliQAThresholds.
85 fThresholds.AddAtAndExpand(item, index);
88 TObject* AliQAThresholds::GetThreshold(Int_t i)
90 // Return the object at position i. Returns 0 if i is out of bounds.
92 return fThresholds.At(i);