/[PAMELA software]/PadmeAmidala/src/RunGlue.cpp
ViewVC logotype

Diff of /PadmeAmidala/src/RunGlue.cpp

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

revision 1.1 by mocchiut, Tue Dec 5 12:31:00 2006 UTC revision 1.2 by mocchiut, Wed Dec 6 07:01:11 2006 UTC
# Line 434  void RunGlue::UpdateDB(TList *dlist){ Line 434  void RunGlue::UpdateDB(TList *dlist){
434    //    //
435    UInt_t ll = 0;    UInt_t ll = 0;
436    UInt_t idl2 = 0;    UInt_t idl2 = 0;
437      UInt_t idr = 0;
438    //    //
439    //    //
440    myquery.str("");    myquery.str("");
441    myquery << "insert into GL_ROOT (ID_RAW,PATH,NAME) values (4294967295,'" << outdir.Data() << "','" << ((TString)gSystem->BaseName(this->GetFilename())).Data() << "');";    myquery << "select ID from GL_RAW where NAME='level2 files';";
442      if ( DebugMode() ) printf(" query is %s \n",myquery.str().c_str());
443      //
444      pResult = dbc->Query(myquery.str().c_str());
445      if ( !pResult ){
446        printf(" ERROR QUERYING ON DB!\n");
447        return;
448      };
449      Row = pResult->Next();
450      if( Row == NULL ){
451        printf(" ERROR QUERYING THE DB!\n");
452        return;
453      } else {
454        idr = (UInt_t)atoll(Row->GetField(0));
455      };
456      //
457      myquery.str("");
458      myquery << "insert into GL_ROOT (ID_RAW,PATH,NAME) values (" << idr << ",'" << outdir.Data() << "','" << ((TString)gSystem->BaseName(this->GetFilename())).Data() << "');";
459    if ( DebugMode() ) printf(" query is %s \n",myquery.str().c_str());    if ( DebugMode() ) printf(" query is %s \n",myquery.str().c_str());
460    //    //
461    pResult = dbc->Query(myquery.str().c_str());    pResult = dbc->Query(myquery.str().c_str());

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23