Skip to content

Commit

Permalink
fix: soon, binnums won't be multiples of 5
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Sep 14, 2024
1 parent 48372bc commit 32ebbfa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion srcC/examples/dumpQADB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ int main(int argc, char ** argv) {

// loop through files
int evnum;
for(int filenum=0; filenum<=qa->GetMaxBinnum(runnum); filenum+=5) {
for(int filenum=0; filenum<=qa->GetMaxBinnum(runnum); filenum++) {
sep("=",50);
// skip non-existent bin numbers (required since old QADBs' bin numbers are multiples of 5)
if(!qa->HasBinnum(runnum, filenum)) continue;
cout << "FILE NUMBER " << filenum << endl;

// perform the lookup, by filenum
Expand Down
5 changes: 4 additions & 1 deletion srcC/tests/testCharge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ int main(int argc, char ** argv) {
for(int runnum : runnumList) {

// loop over files
for(int filenum=0; filenum<=qa->GetMaxBinnum(runnum); filenum+=5) {
for(int filenum=0; filenum<=qa->GetMaxBinnum(runnum); filenum++) {

// skip non-existent bin numbers (required since old QADBs' bin numbers are multiples of 5)
if(!qa->HasBinnum(runnum, filenum)) continue;

// query by file number
qa->QueryByBinnum(runnum,filenum);
Expand Down
5 changes: 3 additions & 2 deletions srcC/tests/testDumpQADB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ int main(int argc, char ** argv) {
int evnum;
string defname;
int chargeInt;
for(int filenum=0; filenum<=qa->GetMaxBinnum(runnum); filenum+=5) {
for(int filenum=0; filenum<=qa->GetMaxBinnum(runnum); filenum++) {
sep("=",50);

//err("test error print");
// skip non-existent bin numbers (required since old QADBs' bin numbers are multiples of 5)
if(!qa->HasBinnum(runnum, filenum)) continue;

// query by file number
qa->QueryByBinnum(runnum,filenum);
Expand Down

0 comments on commit 32ebbfa

Please sign in to comment.