Ignore:
Timestamp:
02/15/05 19:41:20 (20 years ago)
Author:
mazin
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpointing/MPointingPosInterpolate.cc

    r6488 r6508  
    177177        // Sometimes there are two reports with the same time
    178178        //
    179         if (reporttime->GetTime() == reportTime[n-2])
    180         {
    181             *fLog << warn <<"["<< GetName()
    182                 << "]: Warning: this report has the same time that the previous one...skipping it " << endl;
    183             continue;
    184         }
     179        if (n>1)
     180          if (reporttime->GetTime() == reportTime[n-2])
     181            {
     182              *fLog << warn <<"["<< GetName()
     183                    << "]: Warning: this report has the same time that the previous one...skipping it " << endl;
     184              continue;
     185            }
    185186
    186187        reportTime[n-1] = reporttime->GetTime();
     
    294295    //const Int_t run = fRunHeader->GetRunNumber();
    295296  const MTime &StartRunTime = fRunHeader->GetRunStart();
     297  const MTime &EndRunTime   = fRunHeader->GetRunEnd();
    296298  Int_t time = StartRunTime.GetTime();
    297299
     
    302304         // Check that we have drive report for this time
    303305         //
     306
     307         time = (EndRunTime.GetTime() + StartRunTime.GetTime())/2;
     308
    304309         if( StartRunTime<fFirstDriveTime || StartRunTime>fLastDriveTime)
    305310         {
     
    317322
    318323    case kEventTime:
     324     
    319325        time = fEvtTime->GetTime();       
    320326
    321         if (fDebug)
    322           {
    323             *fLog << " real time : " << time
    324                  << " first time: " << fFirstDriveTime.GetTime()
    325                  << " last time: " << fLastDriveTime.GetTime() << endl;
    326           }
    327327        //
    328328        // Check that we have drive report for this time
     
    340340            else                                   time = fLastDriveTime.GetTime();
    341341               
    342             if (fDebug)
    343               {
    344                 *fLog << " PointingPos: time = " << time << " (" << *fEvtTime << ")  (zd, az) = ("
    345                       << fSplineZd->Eval( time )<< ", "  <<fSplineAz->Eval( time )<< ")" << endl;
    346               }
    347342        }
    348343        break;
    349344    }
    350345
     346   if (fDebug)
     347     {
     348       *fLog << " real time : " << time
     349             << " first time: " << fFirstDriveTime.GetTime()
     350             << " last time: " << fLastDriveTime.GetTime() << endl;
     351       *fLog << " PointingPos: time = " << time << " (" << *fEvtTime << ")  (zd, az) = ("
     352             << fSplineZd->Eval( time )<< ", "  <<fSplineAz->Eval( time )<< ")" << endl;
     353     }
    351354    //
    352355    // Check that we have drive report for this time
     
    389392        rc = kTRUE;
    390393      }
     394
     395    if (IsEnvDefined(env, prefix, "TimeMode", print))
     396      {
     397
     398        TString dat(GetEnvValue(env, prefix, "TimeMode", ""));
     399        dat.ToLower();
     400
     401        rc = kTRUE;
     402
     403        if (dat.Contains("eventtime"))
     404          SetTimeMode(kEventTime);
     405        else if (dat.Contains("runtime"))
     406          SetTimeMode(kRunTime);
     407        else
     408          rc = kFALSE;
     409      }
    391410    return rc;
    392411}
     412
Note: See TracChangeset for help on using the changeset viewer.