| 32 |
printf("\n Options are:\n\n"); |
printf("\n Options are:\n\n"); |
| 33 |
printf(" --version print informations about compilation and exit\n"); |
printf(" --version print informations about compilation and exit\n"); |
| 34 |
printf(" -h | --help print this help and exit \n"); |
printf(" -h | --help print this help and exit \n"); |
| 35 |
printf(" -v | --verbose be verbose [default: print nothing on STDOUT]\n"); |
printf(" -v | --verbose be verbose [default]\n"); |
| 36 |
|
printf(" -n | --neat used with '-filename' returns only the run ID number\n"); |
| 37 |
printf(" -idRun run ID_RUN: ID number of the run \n"); |
printf(" -idRun run ID_RUN: ID number of the run \n"); |
| 38 |
printf(" -filename file output yoda filename \n"); |
printf(" -filename file output yoda filename \n"); |
| 39 |
printf(" -l2filename file output amidala filename \n"); |
printf(" -l2filename file output amidala filename \n"); |
| 98 |
Bool_t ruti2 = false; |
Bool_t ruti2 = false; |
| 99 |
Bool_t convobt = false; |
Bool_t convobt = false; |
| 100 |
Bool_t convobtts = false; |
Bool_t convobtts = false; |
| 101 |
|
Bool_t neat = false; |
| 102 |
// |
// |
| 103 |
UInt_t runtime2 = 0; |
UInt_t runtime2 = 0; |
| 104 |
UInt_t obt = 0; |
UInt_t obt = 0; |
| 124 |
r2d2usage(); |
r2d2usage(); |
| 125 |
exit(0); |
exit(0); |
| 126 |
}; |
}; |
| 127 |
|
if ( !strcmp(inps[i],"-n") || !strcmp(inps[i],"--neat") ){ |
| 128 |
|
neat = true; |
| 129 |
|
}; |
| 130 |
if ( !strcmp(inps[i],"-idRun") ) { |
if ( !strcmp(inps[i],"-idRun") ) { |
| 131 |
if ( numinp-1 < i+1 ) { |
if ( numinp-1 < i+1 ) { |
| 132 |
r2d2usage(); |
r2d2usage(); |
| 534 |
}; |
}; |
| 535 |
delete pResult; |
delete pResult; |
| 536 |
if ( !ID && !ID_RAW ){ |
if ( !ID && !ID_RAW ){ |
| 537 |
printf("\n No file with name %s in the DB!\n",filename.Data()); |
if ( !neat ) printf("\n No file with name %s in the DB!\n",filename.Data()); |
| 538 |
} else { |
} else { |
| 539 |
myquery.str(""); |
myquery.str(""); |
| 540 |
myquery << "select "; |
myquery << "select "; |
| 545 |
Row = pResult->Next(); |
Row = pResult->Next(); |
| 546 |
if( Row == NULL ) break; |
if( Row == NULL ) break; |
| 547 |
found = true; |
found = true; |
| 548 |
if ( !r ) printf("\n File %s contains the following runs: \n\n",filename.Data()); |
if ( !r && !neat ) printf("\n File %s contains the following runs: \n\n",filename.Data()); |
| 549 |
TString UTC=tzone.Data(); |
TString UTC=tzone.Data(); |
| 550 |
printf(" => ID = %i --> the run started at %s %s ended at %s %s NEV = %u \n\n",(UInt_t)atoll(Row->GetField(0)),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(1))).Data(),tzone.Data(),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(2))).Data(),tzone.Data(),(UInt_t)atoll(Row->GetField(3))); |
if ( !neat ) printf(" => ID = %u --> the run started at %s %s ended at %s %s NEV = %u \n\n",(UInt_t)atoll(Row->GetField(0)),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(1))).Data(),tzone.Data(),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(2))).Data(),tzone.Data(),(UInt_t)atoll(Row->GetField(3))); |
| 551 |
|
if ( neat ) printf("%u\n",(UInt_t)atoll(Row->GetField(0))); |
| 552 |
}; |
}; |
| 553 |
delete pResult; |
delete pResult; |
| 554 |
myquery.str(""); |
myquery.str(""); |
| 559 |
for( r=0; r < 1000; r++){ |
for( r=0; r < 1000; r++){ |
| 560 |
Row = pResult->Next(); |
Row = pResult->Next(); |
| 561 |
if( Row == NULL ) break; |
if( Row == NULL ) break; |
| 562 |
if ( !r ) printf("\n File %s contains the following DELETED runs: \n\n",filename.Data()); |
if ( !r && !neat ) printf("\n File %s contains the following DELETED runs: \n\n",filename.Data()); |
| 563 |
TString UTC=tzone.Data(); |
TString UTC=tzone.Data(); |
| 564 |
printf(" => ID = %i --> the run started at %s %s ended at %s %s \n\n",(UInt_t)atoll(Row->GetField(0)),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(1))).Data(),tzone.Data(),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(2))).Data(),tzone.Data()); |
if ( !neat ) printf(" => ID = %i --> the run started at %s %s ended at %s %s \n\n",(UInt_t)atoll(Row->GetField(0)),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(1))).Data(),tzone.Data(),dbtime->ConvertTime(UTC,(UInt_t)atoll(Row->GetField(2))).Data(),tzone.Data()); |
| 565 |
}; |
}; |
| 566 |
// |
// |
| 567 |
if ( !found ){ |
if ( !found ){ |
| 568 |
printf("\n No run associated to the file %s \n",filename.Data()); |
if ( !neat ) printf("\n No run associated to the file %s \n",filename.Data()); |
| 569 |
}; |
}; |
| 570 |
myquery.str(""); |
myquery.str(""); |
| 571 |
myquery << "select "; |
myquery << "select "; |
| 581 |
}; |
}; |
| 582 |
}; |
}; |
| 583 |
delete pResult; |
delete pResult; |
| 584 |
printf("\n File %s belongs to raw data file %s/%s \n",filename.Data(),rawpath,rawname); |
if ( !neat ) printf("\n File %s belongs to raw data file %s/%s \n",filename.Data(),rawpath,rawname); |
| 585 |
}; |
}; |
| 586 |
}; |
}; |
| 587 |
// |
// |
| 666 |
// |
// |
| 667 |
if ( dbc ) dbc->Close(); |
if ( dbc ) dbc->Close(); |
| 668 |
// |
// |
| 669 |
printf("\n"); |
if ( !neat ) printf("\n"); |
| 670 |
// |
// |
| 671 |
exit(0); |
exit(0); |
| 672 |
} |
} |