| 115 |
UInt_t lowerlimit = llim->GetSec(); |
UInt_t lowerlimit = llim->GetSec(); |
| 116 |
UInt_t upperlimit = lowerlimit + 86401; |
UInt_t upperlimit = lowerlimit + 86401; |
| 117 |
// |
// |
|
stringstream myquery; |
|
|
myquery.str(""); |
|
|
myquery << "SELECT ID FROM GL_RUN WHERE RUNHEADER_TIME>=" << (UInt_t)lowerlimit |
|
|
<< " AND RUNHEADER_TIME<" << (UInt_t)upperlimit << " ORDER BY RUNHEADER_TIME ASC;"; |
|
|
// |
|
|
pResult = dbc->Query(myquery.str().c_str()); |
|
|
for( UInt_t r=0; r < 1000; r++){ |
|
|
Row = pResult->Next(); |
|
|
if( Row == NULL ) break; |
|
|
if ( DebugMode() ) printf(" %u RUN %s \n",r,Row->GetField(0)); |
|
|
// |
|
|
thisrun=dir+(TString)Row->GetField(0)+".Level2.root"; |
|
|
// |
|
|
if ( DebugMode() ) printf(" Filename is %s \n",thisrun.Data()); |
|
|
// |
|
|
su = TFile::Open(thisrun); |
|
|
if ( li->CheckLevel2File(thisrun) ){ |
|
|
lList->Add(su); |
|
|
} else { |
|
|
if ( DebugMode() ) printf(" RUN %s DISCARDED \n",Row->GetField(0)); |
|
|
}; |
|
|
// |
|
|
}; |
|
|
// |
|
| 118 |
if ( DebugMode() ) printf(" YY %u MM %u DD %u ll %u ul %u \n",YY,MM,DD,lowerlimit,upperlimit); |
if ( DebugMode() ) printf(" YY %u MM %u DD %u ll %u ul %u \n",YY,MM,DD,lowerlimit,upperlimit); |
| 119 |
// |
// |
| 120 |
YY -= 2000; |
YY -= 2000; |
| 148 |
// |
// |
| 149 |
printf(" Output filename is %s \n",fFilename.Data()); |
printf(" Output filename is %s \n",fFilename.Data()); |
| 150 |
// |
// |
| 151 |
|
if ( !this->OpenFile() ){ |
| 152 |
|
fEnd = true; |
| 153 |
|
return(0); |
| 154 |
|
}; |
| 155 |
|
// |
| 156 |
|
stringstream myquery; |
| 157 |
|
myquery.str(""); |
| 158 |
|
myquery << "SELECT ID FROM GL_RUN WHERE RUNHEADER_TIME>=" << (UInt_t)lowerlimit |
| 159 |
|
<< " AND RUNHEADER_TIME<" << (UInt_t)upperlimit << " ORDER BY RUNHEADER_TIME ASC;"; |
| 160 |
|
// |
| 161 |
|
pResult = dbc->Query(myquery.str().c_str()); |
| 162 |
|
for( UInt_t r=0; r < 1000; r++){ |
| 163 |
|
Row = pResult->Next(); |
| 164 |
|
if( Row == NULL ) break; |
| 165 |
|
if ( DebugMode() ) printf(" %u RUN %s \n",r,Row->GetField(0)); |
| 166 |
|
// |
| 167 |
|
thisrun=dir+(TString)Row->GetField(0)+".Level2.root"; |
| 168 |
|
// |
| 169 |
|
if ( DebugMode() ) printf(" Filename is %s \n",thisrun.Data()); |
| 170 |
|
// |
| 171 |
|
su = TFile::Open(thisrun); |
| 172 |
|
if ( li->CheckLevel2File(thisrun) ){ |
| 173 |
|
lList->Add(su); |
| 174 |
|
} else { |
| 175 |
|
if ( DebugMode() ) printf(" RUN %s DISCARDED \n",Row->GetField(0)); |
| 176 |
|
}; |
| 177 |
|
// |
| 178 |
|
}; |
| 179 |
|
// |
| 180 |
|
// |
| 181 |
delete glrun; |
delete glrun; |
| 182 |
delete dbtime; |
delete dbtime; |
| 183 |
// |
// |
| 282 |
UInt_t lowerlimit = llim->GetSec(); |
UInt_t lowerlimit = llim->GetSec(); |
| 283 |
UInt_t upperlimit = lowerlimit + 86401; |
UInt_t upperlimit = lowerlimit + 86401; |
| 284 |
// |
// |
|
stringstream myquery; |
|
|
myquery.str(""); |
|
|
myquery << "SELECT ID FROM GL_RUN WHERE RUNHEADER_TIME>=" << (UInt_t)lowerlimit |
|
|
<< " AND RUNHEADER_TIME<" << (UInt_t)upperlimit << " ORDER BY RUNHEADER_TIME ASC;"; |
|
|
// |
|
|
pResult = dbc->Query(myquery.str().c_str()); |
|
|
for( UInt_t r=0; r < 1000; r++){ |
|
|
Row = pResult->Next(); |
|
|
if( Row == NULL ) break; |
|
|
if ( DebugMode() ) printf(" %u RUN %s \n",r,Row->GetField(0)); |
|
|
// |
|
|
thisrun=dir+(TString)Row->GetField(0)+".Level2.root"; |
|
|
// |
|
|
if ( DebugMode() ) printf(" Filename is %s \n",thisrun.Data()); |
|
|
// |
|
|
su = TFile::Open(thisrun); |
|
|
if ( su ){ |
|
|
TFile *su0 = TFile::Open(thisrun); |
|
|
fDoneList->Add(su0); |
|
|
fNlistdone++; |
|
|
}; |
|
|
if ( li->CheckLevel2File(thisrun) ){ |
|
|
lList->Add(su); |
|
|
if ( DebugMode() ) printf(" RUN %s ADDED \n",Row->GetField(0)); |
|
|
} else { |
|
|
if ( DebugMode() ) printf(" RUN %s DISCARDED \n",Row->GetField(0)); |
|
|
}; |
|
|
// |
|
|
}; |
|
|
// |
|
| 285 |
if ( DebugMode() ) printf(" YY %u MM %u DD %u ll %u ul %u \n",YY,MM,DD,lowerlimit,upperlimit); |
if ( DebugMode() ) printf(" YY %u MM %u DD %u ll %u ul %u \n",YY,MM,DD,lowerlimit,upperlimit); |
| 286 |
// |
// |
| 287 |
YY -= 2000; |
YY -= 2000; |
| 315 |
// |
// |
| 316 |
printf(" Output filename is %s \n",fFilename.Data()); |
printf(" Output filename is %s \n",fFilename.Data()); |
| 317 |
// |
// |
| 318 |
|
if ( !this->OpenFile() ) return(0); |
| 319 |
|
// |
| 320 |
|
stringstream myquery; |
| 321 |
|
myquery.str(""); |
| 322 |
|
myquery << "SELECT ID FROM GL_RUN WHERE RUNHEADER_TIME>=" << (UInt_t)lowerlimit |
| 323 |
|
<< " AND RUNHEADER_TIME<" << (UInt_t)upperlimit << " ORDER BY RUNHEADER_TIME ASC;"; |
| 324 |
|
// |
| 325 |
|
pResult = dbc->Query(myquery.str().c_str()); |
| 326 |
|
for( UInt_t r=0; r < 1000; r++){ |
| 327 |
|
Row = pResult->Next(); |
| 328 |
|
if( Row == NULL ) break; |
| 329 |
|
if ( DebugMode() ) printf(" %u RUN %s \n",r,Row->GetField(0)); |
| 330 |
|
// |
| 331 |
|
thisrun=dir+(TString)Row->GetField(0)+".Level2.root"; |
| 332 |
|
// |
| 333 |
|
if ( DebugMode() ) printf(" Filename is %s \n",thisrun.Data()); |
| 334 |
|
// |
| 335 |
|
su = TFile::Open(thisrun); |
| 336 |
|
if ( su ){ |
| 337 |
|
TFile *su0 = TFile::Open(thisrun); |
| 338 |
|
fDoneList->Add(su0); |
| 339 |
|
fNlistdone++; |
| 340 |
|
}; |
| 341 |
|
if ( li->CheckLevel2File(thisrun) ){ |
| 342 |
|
lList->Add(su); |
| 343 |
|
if ( DebugMode() ) printf(" RUN %s ADDED \n",Row->GetField(0)); |
| 344 |
|
} else { |
| 345 |
|
if ( DebugMode() ) printf(" RUN %s DISCARDED \n",Row->GetField(0)); |
| 346 |
|
}; |
| 347 |
|
// |
| 348 |
|
}; |
| 349 |
|
// |
| 350 |
if ( DebugMode() ){ |
if ( DebugMode() ){ |
| 351 |
UInt_t ll = 0; |
UInt_t ll = 0; |
| 352 |
while ( (TFile*)lList->At(ll) ){ |
while ( (TFile*)lList->At(ll) ){ |
| 379 |
|
|
| 380 |
Bool_t RunGlue::OpenFile(){ |
Bool_t RunGlue::OpenFile(){ |
| 381 |
// |
// |
| 382 |
|
fOpen = false; |
| 383 |
printf(" Check if output file already exists \n"); |
printf(" Check if output file already exists \n"); |
| 384 |
Target = TFile::Open((this->GetFilename()).Data(), "READ" ); |
Target = TFile::Open((this->GetFilename()).Data(), "READ" ); |
| 385 |
// |
// |
| 405 |
// |
// |
| 406 |
TTree::SetMaxTreeSize(maxsize); |
TTree::SetMaxTreeSize(maxsize); |
| 407 |
// |
// |
| 408 |
|
fOpen = true; |
| 409 |
return(true); |
return(true); |
| 410 |
// |
// |
| 411 |
}; |
}; |