--- PamelaLevel2/src/PamLevel2.cpp 2007/11/05 13:10:13 1.52 +++ PamelaLevel2/src/PamLevel2.cpp 2007/11/09 09:20:25 1.54 @@ -3757,20 +3757,7 @@ // open the DB connection // (if not already opened) //=================================== - if(!dbc || (dbc && !dbc->IsConnected())){ - cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<IsConnected() )return NULL; -// cout<<"...done"<IsConnected()))SetDBConnection(); GL_ROOT glroot = GL_ROOT(); if( glroot.Query_GL_ROOT(iroot,dbc) ){ cout << "TTree* PamLevel2::GetYodaTree( ) -- ERROR -- level0 file iroot = "<Close(); + dbc->Close(); // EMILIANO, do not leave open connections, open only when needed }; @@ -3832,11 +3819,13 @@ if( !TrkParams::IsLoaded(6) ){ cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- VK-mask not loaded"<IsConnected()))SetDBConnection(); TrkParams::SetCalib(run_obj,dbc); TrkParams::LoadCalib( ); if( !TrkParams::CalibIsLoaded() ){ cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- Calibration not loaded"<Close(); // EMILIANO, do not leave open connections, open only when needed } @@ -3962,6 +3951,10 @@ dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data()); if( !dbc )return false; if( !dbc->IsConnected() )return false; + stringstream myquery; // EMILIANO + myquery.str(""); // EMILIANO + myquery << "SET time_zone='+0:00'"; // EMILIANO + dbc->Query(myquery.str().c_str()); // EMILIANO cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<