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 |
}; |
}; |