Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.5.X] MillePedeDQMModule: add string MonitorElement to signal if the update was vetoed #39562

Merged
merged 1 commit into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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