+ UInt_t timeDiff = entry->GetEndTime() - entry->GetStartTime();
+ if ( timeDiff < kMinMapTime ) {
+ AliWarning(Form("sensor %s: map length < 60 s, DCS graph kept.",stringID.Data()));
+ entry->SetGraph((TGraph*)gr->Clone());
+ } else {
+ AliSplineFit *fit = new AliSplineFit();
+ fit->SetMinPoints(fMinGraph);
+ fit->InitKnots(gr,fMinPoints,fIter,fMaxDelta);
+ fit->SplineFit(fFitReq);
+ fit->Cleanup();
+ if (fit) {
+ entry->SetFit(fit);
+ } else {
+ AliWarning(Form("sensor %s: no fit performed, DCS graph kept.",stringID.Data()));
+ entry->SetGraph((TGraph*)gr->Clone());
+ }
+ }
+ if (keepMap) entry->SetGraph((TGraph*)gr->Clone());
+ }
+}
+//_____________________________________________________________________________
+void AliDCSSensorArray::MakeSplineFitAddPoints(TMap *map)
+{
+ //
+ // Make spline fits from DCS maps
+ //
+ Int_t nsensors = fSensors->GetEntries();
+ for ( Int_t isensor=0; isensor<nsensors; isensor++) {
+ AliDCSSensor *entry = (AliDCSSensor*)fSensors->At(isensor);
+
+ // fetch old points from existing graph
+
+ TGraph *gr = entry->GetGraph();
+ if (!gr) {
+ gr = new TGraph();
+ entry->SetGraph(gr);
+ }
+ TString stringID = entry->GetStringID();
+
+ // fetch new points from DCS map
+
+ TGraph *grAdd = (TGraph*)map->GetValue(stringID.Data());
+ if (!grAdd ) return;
+
+ // add new points to end of graph
+
+ Int_t nPointsOld=gr->GetN();
+ Int_t nPointsAdd=grAdd->GetN();
+ gr->Expand(nPointsOld+nPointsAdd);
+ gr->Set(nPointsOld+nPointsAdd);
+ Double_t *addX=grAdd->GetX();
+ Double_t *addY=grAdd->GetY();
+ for (Int_t i=0;i<nPointsAdd;i++) {
+ gr->SetPoint(nPointsOld+i,addX[i],addY[i]);
+ }
+
+ // make fit to complete graph
+