/[PAMELA software]/chewbacca/YodaProfiler/src/PamelaDBOperations.cpp
ViewVC logotype

Diff of /chewbacca/YodaProfiler/src/PamelaDBOperations.cpp

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

revision 1.18 by mocchiut, Mon Dec 22 10:38:15 2008 UTC revision 1.20 by mocchiut, Tue Dec 23 20:43:10 2008 UTC
# Line 182  void PamelaDBOperations::OpenL0File(TStr Line 182  void PamelaDBOperations::OpenL0File(TStr
182            //            //
183            if ( !chboot ){            if ( !chboot ){
184              qu.str("");              qu.str("");
185              qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<10000 AND (REAL_TIME_INIT-"<< row2->GetField(10) <<")<7200 group by BOOT_NUMBER order by BOOT_NUMBER asc limit 1;";              qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<10000 AND (REAL_TIME_INIT-"<< row2->GetField(10) <<")<7200 group by BOOT_NUMBER order by BOOT_NUMBER asc;";
186              if ( debug ) printf(" chewbacca: query is %s \n",qu.str().c_str());              if ( debug ) printf(" chewbacca: query is %s \n",qu.str().c_str());
187              result3 = conn->Query(qu.str().c_str());              result3 = conn->Query(qu.str().c_str());
188              if ( result3 ){              if ( result3 ){
189                row3 = result3->Next();                row3 = result3->Next();
190                if ( row3 ){                if ( row3 && result3->GetRowCount() == 1 ){
191                  chboot = (UInt_t)atoll(row3->GetField(0));                  chboot = (UInt_t)atoll(row3->GetField(0));
192                  if ( debug ) printf(" Found boot_number = %u \n",chboot);                  if ( debug ) printf(" Found boot_number = %u \n",chboot);
193                } else {                } else {
194                  if ( debug ) printf(" AGH CANNOT DETERMINE THE BOOT NUMBER... \n");                  if ( debug ) printf(" AGH CANNOT DETERMINE THE BOOT NUMBER... \n");
195                    throw -29;
196                };                };
197              };              };
198            };            };
# Line 1625  Int_t PamelaDBOperations::insertPamelaGL Line 1626  Int_t PamelaDBOperations::insertPamelaGL
1626      if ( !row ){      if ( !row ){
1627        oss.str("");        oss.str("");
1628        oss << "SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE),ID 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),ID FROM GL_RESURS_OFFSET WHERE FROM_ORBIT< "
1629            << dworbit << " order by FROM_ORBIT desc limit 1;";            << dworbit << " AND SPECIAL_FILE='' order by FROM_ORBIT desc limit 1;";
1630        if ( IsDebug() ) printf(" %s \n",oss.str().c_str());        if ( IsDebug() ) printf(" %s \n",oss.str().c_str());
1631        result = conn->Query(oss.str().c_str());        result = conn->Query(oss.str().c_str());
1632        if ( !result ) throw -10;        if ( !result ) throw -10;

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.23