Skip to content

Commit

Permalink
feat: warn users not to trust the FC charge
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Mar 26, 2024
1 parent e2eebfd commit 764ad58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/clasqa/QADB.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ class QADB {
public String getComment() { return found ? comment : "" }
public int getEvnumMin() { return found ? evnumMin : -1 }
public int getEvnumMax() { return found ? evnumMax : -1 }
public double getCharge() { return found ? charge : -1 }
public double getCharge() {
System.err.println "ERROR: the charge stored in the Pass1 QADB for Run Groups A, B, K, and M is NOT correct! This will be fixed for their Pass 2 data sets."
return found ? charge : -1
}
// --- access QA info
// check if the file has a particular defect
// - if sector==0, checks the OR of all the sectors
Expand Down Expand Up @@ -350,7 +353,10 @@ class QADB {
}
// -- accessor
// call this method at the end of your event loop
public double getAccumulatedCharge() { return chargeTotal }
public double getAccumulatedCharge() {
System.err.println "ERROR: the charge stored in the Pass1 QADB for Run Groups A, B, K, and M is NOT correct! This will be fixed for their Pass 2 data sets."
return chargeTotal
}
// reset accumulated charge, if you ever need to
public void resetAccumulatedCharge() { chargeTotal = 0 }

Expand Down
10 changes: 8 additions & 2 deletions srcC/include/QADB.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ namespace QA {
inline std::string GetComment() { return found ? comment : ""; };
inline int GetEvnumMin() { return found ? evnumMin : -1; };
inline int GetEvnumMax() { return found ? evnumMax : -1; };
inline double GetCharge() { return found ? charge : -1; };
inline double GetCharge() {
std::cerr << "ERROR: the charge stored in the Pass1 QADB for Run Groups A, B, K, and M is NOT correct! This will be fixed for their Pass 2 data sets." << std::endl;
return found ? charge : -1;
}
// --- access QA info
// check if the file has a particular defect
// - if sector==0, checks the OR of all the sectors
Expand Down Expand Up @@ -119,7 +122,10 @@ namespace QA {
// -- accessor
// returns total accumlated charge that passed your QA cuts; call this
// method after your event loop
inline double GetAccumulatedCharge() { return chargeTotal; };
inline double GetAccumulatedCharge() {
std::cerr << "ERROR: the charge stored in the Pass1 QADB for Run Groups A, B, K, and M is NOT correct! This will be fixed for their Pass 2 data sets." << std::endl;
return chargeTotal;
}
// reset accumulated charge, if you ever need to
inline void ResetAccumulatedCharge() { chargeTotal = 0; };

Expand Down

0 comments on commit 764ad58

Please sign in to comment.