+//_____________________________________________________________________________
+TArrayI AliDCSSensorArray::OutsideThreshold(Double_t threshold, UInt_t timeSec, Bool_t below) const
+{
+ //
+ // Return sensors with values outside threshold at time defined by second
+ // parameter
+ // By default sensors with values below threshold are listed, if third
+ // parameter is set to kFALSE sensors with values above threshold are listed
+ //
+ Int_t nsensors = fSensors->GetEntries();
+ TArrayI array(nsensors);
+ Int_t outside=0;
+ for (Int_t isensor=0; isensor<nsensors; isensor++) { // loop over sensors
+ AliDCSSensor *entry = (AliDCSSensor*)fSensors->At(isensor);
+ Double_t val=entry->GetValue(timeSec);
+ if (below) {
+ if (val<threshold) array[outside++] = entry->GetIdDCS();
+ } else {
+ if (val>threshold) array[outside++] = entry->GetIdDCS();
+ }
+ }
+ array.Set(outside);
+ return array;
+}
+
+//_____________________________________________________________________________