5223 |
* |
* |
5224 |
**/ |
**/ |
5225 |
UInt_t PamelaDBOperations::Check(){ |
UInt_t PamelaDBOperations::Check(){ |
5226 |
|
return(this->Check(0,0)); |
5227 |
|
} |
5228 |
|
|
5229 |
|
UInt_t PamelaDBOperations::Check(UInt_t from, UInt_t to){ |
5230 |
|
// |
5231 |
|
if ( IsDebug() ) printf(" from %u to %u \n",from,to); |
5232 |
// |
// |
5233 |
UInt_t test = 0; |
UInt_t test = 0; |
5234 |
// |
// |
5267 |
thisrht = (UInt_t)atoll(row->GetField(2)); |
thisrht = (UInt_t)atoll(row->GetField(2)); |
5268 |
thisrtt = (UInt_t)atoll(row->GetField(3)); |
thisrtt = (UInt_t)atoll(row->GetField(3)); |
5269 |
// |
// |
5270 |
|
if ( from > 0 && nid <= from ) goto ss; |
5271 |
|
if ( to > 0 && nid >= to ) goto ss; |
5272 |
|
// |
5273 |
if ( (UInt_t)atoll(row->GetField(4)) > 1 ){ |
if ( (UInt_t)atoll(row->GetField(4)) > 1 ){ |
5274 |
// |
// |
5275 |
// |
// |
5300 |
printf(" CHECK n.4 RUNs %u and %u HAVE SAME RUNHEADER \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
printf(" CHECK n.4 RUNs %u and %u HAVE SAME RUNHEADER \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
5301 |
row3 = result3->Next(); |
row3 = result3->Next(); |
5302 |
}; |
}; |
5303 |
|
// delete result3; |
5304 |
|
|
5305 |
}; |
}; |
5306 |
// |
// |
5307 |
oss.str(""); |
oss.str(""); |
5321 |
printf(" CHECK n.5 RUNs %u and %u HAVE SAME RUNTRAILER \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
printf(" CHECK n.5 RUNs %u and %u HAVE SAME RUNTRAILER \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
5322 |
row3 = result3->Next(); |
row3 = result3->Next(); |
5323 |
}; |
}; |
5324 |
|
// delete result3; |
5325 |
}; |
}; |
5326 |
// |
// |
5327 |
oss.str(""); |
oss.str(""); |
5341 |
printf(" CHECK n.7 RUNs %u and %u HAVE SAME RUNTRAILER AND RUNHEADER (ARE THE SAME?) \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
printf(" CHECK n.7 RUNs %u and %u HAVE SAME RUNTRAILER AND RUNHEADER (ARE THE SAME?) \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
5342 |
row3 = result3->Next(); |
row3 = result3->Next(); |
5343 |
}; |
}; |
5344 |
|
// delete result3; |
5345 |
|
|
5346 |
}; |
}; |
5347 |
}; |
}; |
5348 |
// |
// |
5362 |
printf(" CHECK n.6 RUN %u CONTAINS RUN %u \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
printf(" CHECK n.6 RUN %u CONTAINS RUN %u \n",thisid,(UInt_t)atoll(row3->GetField(0))); |
5363 |
row3 = result3->Next(); |
row3 = result3->Next(); |
5364 |
}; |
}; |
5365 |
|
// delete result3; |
5366 |
}; |
}; |
5367 |
// |
// |
5368 |
}; |
}; |
5388 |
thisf = (TString)row2->GetField(0); |
thisf = (TString)row2->GetField(0); |
5389 |
if ( IsDebug() ) printf(" ==> files %s and %s \n",prevf.Data(),thisf.Data()); |
if ( IsDebug() ) printf(" ==> files %s and %s \n",prevf.Data(),thisf.Data()); |
5390 |
test = 1; |
test = 1; |
5391 |
|
// delete result2; |
5392 |
}; |
}; |
5393 |
// |
// |
5394 |
if ( (thisrtt < prevrht) && (thisrht != prevrht) ){ |
if ( (thisrtt < prevrht) && (thisrht != prevrht) ){ |
5410 |
thisf = (TString)row2->GetField(0); |
thisf = (TString)row2->GetField(0); |
5411 |
if ( IsDebug() ) printf(" ==> files %s and %s \n",prevf.Data(),thisf.Data()); |
if ( IsDebug() ) printf(" ==> files %s and %s \n",prevf.Data(),thisf.Data()); |
5412 |
test = 1; |
test = 1; |
5413 |
|
// delete result2; |
5414 |
}; |
}; |
5415 |
// |
// |
5416 |
if ( (thisrht > thisrtt) && (thisrht != prevrht) ){ |
if ( (thisrht > thisrtt) && (thisrht != prevrht) ){ |
5432 |
thisf = (TString)row2->GetField(0); |
thisf = (TString)row2->GetField(0); |
5433 |
if ( IsDebug() ) printf(" ==> files %s and %s \n",prevf.Data(),thisf.Data()); |
if ( IsDebug() ) printf(" ==> files %s and %s \n",prevf.Data(),thisf.Data()); |
5434 |
test = 1; |
test = 1; |
5435 |
|
// delete result2; |
5436 |
}; |
}; |
5437 |
|
ss: |
5438 |
// |
// |
5439 |
prevrht = thisrht; |
prevrht = thisrht; |
5440 |
prevrtt = thisrtt; |
prevrtt = thisrtt; |
5441 |
previd = thisid; |
previd = thisid; |
5442 |
prevl0id = thisl0id; |
prevl0id = thisl0id; |
5443 |
row = result->Next(); |
row = result->Next(); |
5444 |
|
// if ( result2 ) delete result2; |
5445 |
|
// if ( result3 ) delete result3; |
5446 |
}; |
}; |
5447 |
// |
// |
5448 |
return(test); |
return(test); |