/[PAMELA software]/YodaProfiler/src/GLTables.cpp
ViewVC logotype

Diff of /YodaProfiler/src/GLTables.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by mocchiut, Thu Nov 9 12:02:54 2006 UTC revision 1.19 by mocchiut, Mon Nov 13 08:49:49 2006 UTC
# Line 1309  GL_TIMESYNC::GL_TIMESYNC(UInt_t id, TStr Line 1309  GL_TIMESYNC::GL_TIMESYNC(UInt_t id, TStr
1309    //    //
1310    stringstream oss;    stringstream oss;
1311    oss.str("");    oss.str("");
1312    oss << "SELECT OFFSET_DATE FROM GL_RESURS_OFFSET WHERE SPECIAL_FILE='"    oss << "SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE) FROM GL_RESURS_OFFSET WHERE SPECIAL_FILE='"
1313        << rname.str().c_str() << "';";        << rname.str().c_str() << "';";
   //  if ( IsDebug() ) printf(" %s \n",oss.str().c_str());  
1314    pResult = dbc->Query(oss.str().c_str());    pResult = dbc->Query(oss.str().c_str());
1315    Row = pResult->Next();    Row = pResult->Next();
1316    //    //
# Line 1332  GL_TIMESYNC::GL_TIMESYNC(UInt_t id, TStr Line 1331  GL_TIMESYNC::GL_TIMESYNC(UInt_t id, TStr
1331      };          };    
1332      if ( dwo.IsDigit() ) dworbit = (UInt_t)dwo.Atoi();      if ( dwo.IsDigit() ) dworbit = (UInt_t)dwo.Atoi();
1333    };    };
   // if ( IsDebug() ) printf(" Downlink orbit is %i (dwo = %s) \n",dworbit,dwo.Data());    
1334    //    //
1335    if ( !Row ){    if ( !Row ){
1336      oss.str("");      oss.str("");
1337      oss << "SELECT OFFSET_DATE FROM GL_RESURS_OFFSET WHERE FROM_ORBIT< "      oss << "SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE) FROM GL_RESURS_OFFSET WHERE FROM_ORBIT< "
1338          << dworbit << " order by FROM_ORBIT desc limit 1;";          << dworbit << " order by FROM_ORBIT desc limit 1;";
     //    if ( IsDebug() ) printf(" %s \n",oss.str().c_str());  
1339      pResult = dbc->Query(oss.str().c_str());      pResult = dbc->Query(oss.str().c_str());
1340      Row = pResult->Next();      Row = pResult->Next();
1341      if ( !Row ){      if ( !Row ){
# Line 1347  GL_TIMESYNC::GL_TIMESYNC(UInt_t id, TStr Line 1344  GL_TIMESYNC::GL_TIMESYNC(UInt_t id, TStr
1344      };      };
1345    };    };
1346    //    //
1347    //      TTimeStamp tu = TTimeStamp((UInt_t)atoi(Row->GetField(0)),(UInt_t)atoi(Row->GetField(1)),(UInt_t)atoi(Row->GetField(2)),(UInt_t)atoi(Row->GetField(3)),(UInt_t)atoi(Row->GetField(4)),(UInt_t)atoi(Row->GetField(5)),0,true,0);
   TDatime ti = TDatime(Row->GetField(0));  
   TTimeStamp tu = TTimeStamp((UInt_t)ti.GetYear(),(UInt_t)ti.GetMonth(),(UInt_t)ti.GetDay(),(UInt_t)ti.GetHour(),(UInt_t)ti.GetMinute(),(UInt_t)ti.GetSecond(),0,true,0);  
1348    T0 = (UInt_t)tu.GetSec();    T0 = (UInt_t)tu.GetSec();
1349    //    //
1350    // look for the correct timesync entry    // look for the correct timesync entry
# Line 1391  UInt_t GL_TIMESYNC::DBabsTime(UInt_t OBT Line 1386  UInt_t GL_TIMESYNC::DBabsTime(UInt_t OBT
1386   */   */
1387  UInt_t GL_TIMESYNC::ResursTime(UInt_t OBT){    UInt_t GL_TIMESYNC::ResursTime(UInt_t OBT){  
1388    //    //
1389    return(((UInt_t)((this->DBobt(OBT)-this->DBobt(OBT0))/1000)+TIMESYNC));    return(((UInt_t)((Int_t)(this->DBobt(OBT)-this->DBobt(OBT0))/1000)+TIMESYNC));
1390    //    //
1391  };  };
1392    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.23