Skip to content

Commit

Permalink
MillePedeDQMModule :add string MonitorElement to signal if the update…
Browse files Browse the repository at this point in the history
… was vetoed
  • Loading branch information
mmusich committed Oct 1, 2022
1 parent 8d4156c commit 9cc016b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

struct mpPCLresults {
private:
bool m_isHG;
bool m_isDBUpdated;
bool m_isDBUpdateVetoed;
int m_nRecords;
Expand All @@ -30,14 +31,17 @@ struct mpPCLresults {
int nRecords,
int exitCode,
std::string exitMessage,
std::bitset<4> updateBits)
: m_isDBUpdated(isDBUpdated),
std::bitset<4> updateBits,
bool isHG)
: m_isHG(isHG),
m_isDBUpdated(isDBUpdated),
m_isDBUpdateVetoed(isDBUpdateVetoed),
m_nRecords(nRecords),
m_exitCode(exitCode),
m_exitMessage(exitMessage),
m_updateBits(updateBits) {}

const bool isHighGranularity() { return m_isHG; }
const bool getDBUpdated() { return m_isDBUpdated; }
const bool getDBVetoed() { return m_isDBUpdateVetoed; }
const bool exceedsThresholds() { return m_updateBits.test(0); }
Expand Down Expand Up @@ -105,7 +109,7 @@ class MillePedeFileReader {
const int binariesAmount() const { return binariesAmount_; }

const mpPCLresults getResults() const {
return mpPCLresults(updateDB_, vetoUpdateDB_, Nrec_, exitCode_, exitMessage_, updateBits_);
return mpPCLresults(updateDB_, vetoUpdateDB_, Nrec_, exitCode_, exitMessage_, updateBits_, isHG_);
}

const std::map<std::string, std::array<bool, 6>>& getResultsHG() const { return fractionExceeded_; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ void MillePedeDQMModule ::bookHistograms(DQMStore::IBooker& booker) {

binariesAvalaible = booker.bookInt("BinariesFound");
exitCode = booker.bookString("PedeExitCode", "");
isVetoed = booker.bookString("IsVetoed", "");

booker.cd();
}
Expand All @@ -131,7 +132,28 @@ void MillePedeDQMModule ::dqmEndJob(DQMStore::IBooker& booker, DQMStore::IGetter
binariesAvalaible->Fill(mpReader_->binariesAmount());
auto theResults = mpReader_->getResults();
std::string exitCodeStr = theResults.getExitMessage();

std::string vetoStr{};
if (mpReader_->storeAlignments()) {
vetoStr = "DB Updated!"; /* easy peasy, fait accompli an alignment is there */
} else {
if (theResults.isHighGranularity()) { /* HG case */
if (theResults.getDBVetoed() && theResults.getDBUpdated()) {
vetoStr = "DB Update Vetoed"; /* this can happen in the HG PCL case */
} else {
vetoStr = "N/A";
}
} else { /* LG case */
if (theResults.exceedsCutoffs()) {
vetoStr = "DB Update Vetoed"; /* this can happen in the LG PCL case */
} else {
vetoStr = "N/A";
} // if the alignment exceeds the cutoffs
} // LG case
} // if the alignment was not stored

exitCode->Fill(exitCodeStr);
isVetoed->Fill(vetoStr);
}

//=============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class MillePedeDQMModule : public DQMEDHarvester {
MonitorElement* statusResults;
MonitorElement* binariesAvalaible;
MonitorElement* exitCode;
MonitorElement* isVetoed;

bool isHG_;
};
Expand Down

0 comments on commit 9cc016b

Please sign in to comment.