+ // we put here the TRIP value as SV:value
+ // for cases where there's a drop in voltage but the starting point was
+ // below operational voltage, so strictly speaking it's *not* a trip, but
+ // more a big fluctuation
+ if ( !dryRun )
+ {
+ MarkForDeletion(indices,0,values.GetLast());
+ values.Add(new AliDCSValue(static_cast<Float_t>(0),meanTimeStamp));
+ }
+ }
+ else if ( nStartRU > 0 && nRU == 0 && nRD == 0 && nEndRD == 0 )
+ {
+ hvCase = "C";
+ if (!dryRun)
+ {
+ sscanf(internalMsg.Data(),"RU%10d[%10d:%10d]%80s",&dummy,&a,&b,r);
+ MarkForDeletion(indices,a,b);
+ }
+ }
+ else if ( nStartRU > 0 && nEndRD > 0 && nRD == 0 && nRU == 0 )
+ {
+ hvCase = "D";
+ if (!dryRun)
+ {
+ sscanf(internalMsg.Data(),"RU%10d[%10d:%10d]%80s",&dummy,&a,&b,r);
+ MarkForDeletion(indices,a,b-1);
+ Int_t i = internalMsg.Index("RD",strlen("RD"),0,TString::kExact);
+ sscanf(internalMsg(i,internalMsg.Length()-i).Data(),
+ "RD%10d[%10d:%10d]%80s",&dummy,&a,&b,r);
+ MarkForDeletion(indices,a+1,b);
+ }
+ }
+ else if ( nEndRD > 0 && nStartRU == 0 && nRU == 0 && nRD == 0 )
+ {
+ hvCase = "B";
+ if (!dryRun)
+ {
+ Int_t i = internalMsg.Index("RD",strlen("RD"),0,TString::kExact);
+ sscanf(internalMsg(i,internalMsg.Length()-i).Data(),
+ "RD%10d[%10d:%10d]%80s",&dummy,&a,&b,r);
+ MarkForDeletion(indices,a,b);
+ }
+ }
+ else if ( nFluct > 0 )
+ {
+ hvCase = "G";
+ if (!dryRun)
+ {
+ TObjArray* af = internalMsg.Tokenize(" ");
+ TIter next(af);
+ TObjString* str;
+ while ( ( str = static_cast<TObjString*>(next()) ) )
+ {
+ TString s(str->String());
+ if ( s.BeginsWith("FLUCT") )
+ {
+ sscanf(s.Data(),"FLUCT%d[%d:%d]",&dummy,&a,&b);
+ MarkForDeletion(indices,a,b);
+ }
+ }
+ delete af;
+ }
+ }
+ else if ( nEndAndShortRU > 0 && nStartRU == 0 && nRU == 0 && nRD == 0 && nEndRD == 0 )
+ {
+ hvCase = "H";
+ if (!dryRun)
+ {
+ sscanf(internalMsg.Data(),"RU%10d[%10d:%10d]%80s",&dummy,&a,&b,r);
+ MarkForDeletion(indices,a,b);
+ }
+ }
+ else
+ {
+ // last chance...
+ // here we know it's not a trip, so let's assume everything is OK
+ // if first and last value are in the same ballpark
+
+ const Double_t HVFLUCT(20); // volts