]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In FindNearestScalersRecord sorting removed.
authorlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Jun 2009 10:02:03 +0000 (10:02 +0000)
committerlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Jun 2009 10:02:03 +0000 (10:02 +0000)
STEER/AliTriggerRunScalers.cxx

index 580cbabb33e310cb9838a70bf6984ef921df53b4..ae7a29223c351a764c04d214aad05fffcbc94b28 100644 (file)
@@ -197,7 +197,7 @@ Int_t  AliTriggerRunScalers::FindNearestScalersRecord( const AliTimeStamp *stamp
    // is out of range return -1
 
    Int_t   base, position=-1, last, result = 0;
-   AliTimeStamp *op2 = NULL;
+   Int_t op2 = 0;
    
    //fScalersRecord.Sort();
 
@@ -208,15 +208,15 @@ Int_t  AliTriggerRunScalers::FindNearestScalersRecord( const AliTimeStamp *stamp
       position = (base+last) / 2;
       cout << "pos " <<   position<< " base " <<   base << "last " <<   last << endl;
       AliTriggerScalersRecord* rec = (AliTriggerScalersRecord*)fScalersRecord.At(position);
-      if( rec ) op2 = rec->GetTimeStamp();
-      if( op2 && (result = stamp->Compare(op2)) == 0  )
+      if( rec && rec->GetTimeStamp()) op2 = 1;
+      if( op2 && (result = stamp->Compare(rec->GetTimeStamp())) == 0  )
          return position;  // exact match
       cout << "result " <<   result << " op2 " << op2 << " rec "<< rec << endl;
       if (!op2 || result < 0)
          last = position-1;
       else
          base = position+1;
-      op2 = NULL;  
+      op2 = 0;  
    }
    if( (position == 0 && result < 0) || position >= fScalersRecord.GetEntriesFast() ) 
     return -1;  // out of range