Skip to content
Snippets Groups Projects
Commit 1e8f6b42 authored by Peter Berta's avatar Peter Berta
Browse files

Merge branch 'cherry-pick-e8584cdb-22.0' into '22.0'

Sweeping !55775 from master to 22.0.
MuonPrdSelector+MuonPRDTest+MuonTesterTree: enable thread-checker and fix warnings

See merge request atlas/athena!55898
parents ecc96fbf 37849ec5
No related branches found
No related tags found
No related merge requests found
MuonSpectrometer/MuonCnv/MuonPrdSelector
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonPrdSelector/MuonPrdSelectorAlg.h"
......@@ -442,8 +442,8 @@ void MuonPrdSelectorAlg::print(){
ATH_MSG_DEBUG( "CSC OUT Collection(" << std::setw(2) << i_coll << ") : " << ID );
}
const DataHandle<Muon::MdtPrepDataCollection> mdtCollection;
const DataHandle<Muon::MdtPrepDataCollection> lastColl;
SG::ConstIterator<Muon::MdtPrepDataCollection> mdtCollection;
SG::ConstIterator<Muon::MdtPrepDataCollection> lastColl;
i_coll = 0;
if (evtStore()->retrieve(mdtCollection,lastColl) ==StatusCode::SUCCESS) {
for ( ; mdtCollection != lastColl ; ++mdtCollection ) {
......
MuonSpectrometer/MuonValidation/MuonPRDTest/
......@@ -17,6 +17,9 @@
#include "EventInfo/EventInfo.h"
#include "GaudiKernel/ITHistSvc.h"
#include "TGCcablingInterface/ITGCcablingServerSvc.h"
#include <mutex>
using namespace MuonPRDTest;
NSWPRDValAlg::NSWPRDValAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthHistogramAlgorithm(name, pSvcLocator) {}
......@@ -285,15 +288,13 @@ StatusCode NSWPRDValAlg::NSWMatchingAlg(EDM_object data0, EDM_object data1) {
}
}
ATH_MSG_VERBOSE("Total Number of matches found: " << nMatch << " " << data1.getName() << " for a single " << data0.getName());
static bool warningPrinted = false;
if (nMatch == 0) {
if (m_noMatchWarning) {
if (!warningPrinted) {
ATH_MSG_WARNING(
"No match found! Will now disable this kind of WARNING but please be aware that you are running with "
"suppressNoMatchWarning set to true!");
warningPrinted = true;
}
static std::once_flag flag;
std::call_once(flag, [&]() {
ATH_MSG_WARNING("No match found! Will now disable this kind of WARNING but please be "
"aware that you are running with suppressNoMatchWarning set to true!");
});
} else {
ATH_MSG_DEBUG("No match found!");
}
......
MuonSpectrometer/MuonValidation/MuonTesterTree
......@@ -29,7 +29,7 @@ public:
/// of the addToTree method
bool initialized() const;
/// Returns the underlying TTree object
TTree* tree() const;
const TTree* tree() const;
/// Returns the data dependencies needed by the MuonTesterBranch
std::vector<DataDependency> data_dependencies() override final;
......
......@@ -46,7 +46,7 @@ MuonTesterBranch::~MuonTesterBranch() {
MuonTesterBranch::MuonTesterBranch(TTree* tree, const std::string& br_name) : m_tree(tree), m_name(br_name) {}
std::string MuonTesterBranch::name() const { return m_name; }
bool MuonTesterBranch::initialized() const { return m_init; }
TTree* MuonTesterBranch::tree() const { return m_tree; }
const TTree* MuonTesterBranch::tree() const { return m_tree; }
std::string MuonTesterBranch::eraseWhiteSpaces(const std::string& In) {
std::string out = In;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment