Skip to content

Commit

Permalink
Merge pull request #29283 from fabiocos/fc-fixlogdebug
Browse files Browse the repository at this point in the history
Fix non-compiling code triggered by EDM_ML_DEBUG flag
  • Loading branch information
cmsbuild authored Mar 31, 2020
2 parents aad09fb + d8c6864 commit 61ea698
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 23 deletions.
1 change: 0 additions & 1 deletion Calibration/IsolatedParticles/src/MatchingSimTrack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ namespace spr {

#ifdef EDM_ML_DEBUG
if (debug) {
std::cout << "Reconstructed Track with " << i << " recHits.";
for (unsigned int isim = 0; isim < trkId.size(); isim++) {
std::cout << "\n trkId " << trkId[isim] << " Occurance " << trkOcc[isim] << ", ";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void CalibrationTrackSelectorFromDetIdList::produce(edm::Event &iEvent, const ed

for (const auto &detidsel : detidsels_) {
if (detidsel.isSelected(detid)) {
LogDebug("CalibrationTrackSelectorFromDetIdList") << "Selected by selection " << detid;
LogDebug("CalibrationTrackSelectorFromDetIdList") << "Selected by selection " << detid.rawId();
saveTrack = true;
break;
}
Expand Down
3 changes: 0 additions & 3 deletions CondFormats/SiPixelTransient/src/SiPixelUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ namespace SiPixelUtils {
if ((size >= size_cut) || ((W_eff / pitch < eff_charge_cut_low) | (W_eff / pitch > eff_charge_cut_high))) {
W_eff = pitch * 0.5f * sum_of_edge; // ave. length of edge pixels (first+last) (cm)
// usedEdgeAlgo = true;
#ifdef EDM_ML_DEBUG
nRecHitsUsedEdge_++;
#endif
}

//--- Finally, compute the position in this projection
Expand Down
2 changes: 1 addition & 1 deletion DQM/MuonMonitor/plugins/CosmicMuonRecoAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void CosmicMuonRecoAnalyzer::bookHistograms(DQMStore::IBooker& ibooker,
}

void CosmicMuonRecoAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
LogTrace(metname) << "[MuonRecoAnalyzer] Analyze the mu";
LogTrace("CosmicMuon") << "[MuonRecoAnalyzer] Analyze the mu";

// Take the muon container
edm::Handle<edm::View<reco::Track> > muons;
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/src/SiStripTrackerMapCreator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ uint16_t SiStripTrackerMapCreator::getDetectorFlagAndComment(DQMStore* const dqm
}
std::ostringstream badmodule_path;
badmodule_path << badmodule_folder << "/" << det_id;
LogDebug("SearchBadModule") << badmodule_folder << " exists: " << badmodule_path;
LogDebug("SearchBadModule") << badmodule_folder << " exists: " << badmodule_path.str();

auto const* bad_module_me = dqm_store->get(badmodule_path.str());
if (bad_module_me && bad_module_me->kind() == MonitorElement::Kind::INT) {
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/Muon/src/TriggerMatchMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace edm;
//#define DEBUG

TriggerMatchMonitor::TriggerMatchMonitor(const edm::ParameterSet& pSet) {
LogTrace(metname) << "[TriggerMatchMonitor] Parameters initialization";
LogTrace("TriggerMatching") << "[TriggerMatchMonitor] Parameters initialization";

parameters = pSet;

Expand Down Expand Up @@ -135,7 +135,7 @@ void TriggerMatchMonitor::bookHistograms(DQMStore::IBooker& ibooker,
"totalHLT" + triggerHistName2_ + "_phi_Tight", " HLT(" + triggerHistName2_ + ") total phi", 8, -3.0, 3.0);
}
void TriggerMatchMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
LogTrace(metname) << "[TriggerMatchMonitor] Analyze the mu in different eta regions";
LogTrace("TriggerMatching") << "[TriggerMatchMonitor] Analyze the mu in different eta regions";

edm::Handle<edm::View<reco::Muon>> muons;
iEvent.getByToken(theMuonCollectionLabel_, muons);
Expand Down
1 change: 1 addition & 0 deletions DQMOffline/Trigger/interface/HLTTauDQMOfflineSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class HLTTauDQMOfflineSource : public DQMEDAnalyzer {
edm::EDGetTokenT<trigger::TriggerEvent> triggerEventToken_;

// For path plotters
const std::string pathRegexString_;
const std::regex pathRegex_;
const int nPtBins_, nEtaBins_, nPhiBins_;
const double ptMax_, highPtMax_, l1MatchDr_, hltMatchDr_;
Expand Down
5 changes: 3 additions & 2 deletions DQMOffline/Trigger/plugins/HLTTauDQMOfflineSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ HLTTauDQMOfflineSource::HLTTauDQMOfflineSource(const edm::ParameterSet& ps)
triggerResultsToken_(consumes<edm::TriggerResults>(triggerResultsSrc_)),
triggerEventSrc_(ps.getUntrackedParameter<edm::InputTag>("TriggerEventSrc")),
triggerEventToken_(consumes<trigger::TriggerEvent>(triggerEventSrc_)),
pathRegex_(ps.getUntrackedParameter<std::string>("Paths")),
pathRegexString_(ps.getUntrackedParameter<std::string>("Paths")),
pathRegex_(pathRegexString_),
nPtBins_(ps.getUntrackedParameter<int>("PtHistoBins", 20)),
nEtaBins_(ps.getUntrackedParameter<int>("EtaHistoBins", 12)),
nPhiBins_(ps.getUntrackedParameter<int>("PhiHistoBins", 18)),
Expand Down Expand Up @@ -75,7 +76,7 @@ void HLTTauDQMOfflineSource::dqmBeginRun(const edm::Run& iRun, const edm::EventS
// Find all paths to monitor
std::vector<std::string> foundPaths;
std::smatch what;
LogDebug("HLTTauDQMOffline") << "Looking for paths with regex " << pathRegex_;
LogDebug("HLTTauDQMOffline") << "Looking for paths with regex " << pathRegexString_;
for (const std::string& pathName : HLTCP_.triggerNames()) {
if (std::regex_search(pathName, what, pathRegex_)) {
LogDebug("HLTTauDQMOffline") << "Found path " << pathName;
Expand Down
6 changes: 5 additions & 1 deletion DQMOffline/Trigger/src/HLTTauDQMPath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ HLTTauDQMPath::HLTTauDQMPath(std::string pathName,
filterMuonN_.reserve(filterIndices_.size());
filterMET_.reserve(filterIndices_.size());
filterLevel_.reserve(filterIndices_.size());
#ifdef EDM_ML_DEBUG
size_t i(0);
#endif
for (auto& filterIndice : filterIndices_) {
const std::string& filterName = std::get<kName>(filterIndice);
const std::string& moduleType = HLTCP.moduleType(filterName);
Expand All @@ -408,8 +411,9 @@ HLTTauDQMPath::HLTTauDQMPath(std::string pathName,
filterLevel_.push_back(n.level);

#ifdef EDM_ML_DEBUG
ss << "\n " << i << " " << std::get<kModuleIndex>(filterIndices_[i]) << " " << filterName << " " << moduleType
ss << "\n " << i << " " << std::get<kModuleIndex>(filterIndice) << " " << filterName << " " << moduleType
<< " ntau " << n.tau << " nele " << n.electron << " nmu " << n.muon;
i++;
#endif
}
#ifdef EDM_ML_DEBUG
Expand Down
7 changes: 4 additions & 3 deletions Geometry/HcalTowerAlgo/src/HcalDDDGeometryLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ void HcalDDDGeometryLoader::fill(HcalSubdetector subdet, HcalDDDGeometry* geom)
#ifdef EDM_ML_DEBUG
std::cout << "HcalDDDGeometryLoader: Subdet " << subdet << " side " << iside << " eta " << etaRing << " depth "
<< depthBin << " with " << phis.size() << "modules:" << std::endl;
size_t i(0);
#endif
geom->increaseReserve(phis.size());
for (auto& phi : phis) {
#ifdef EDM_ML_DEBUG
std::cout << "HcalDDDGeometryLoader::fill Cell " << i << " eta " << iside * etaRing << " phi " << phis[k].first
<< "(" << phis[k].second / CLHEP::deg << ", " << dphi / CLHEP::deg << ") depth " << depthBin
<< std::endl;
std::cout << "HcalDDDGeometryLoader::fill Cell " << i << " eta " << iside * etaRing << " phi " << phi.first << "("
<< phi.second / CLHEP::deg << ", " << dphi / CLHEP::deg << ") depth " << depthBin << std::endl;
i++;
#endif
HcalDetId id(subdet, iside * etaRing, phi.first, depthBin);
hcalIds.emplace_back(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ namespace {

// Positions child with respect to parent
mother.placeVolume(child, copy, Transform3D(globalRotMatrix, tran));
LogDebug("TrackerGeom") << "DDTrackerRingAlgo test " << child << " number " << copy << " positioned in " << mother
<< " at " << tran << " with " << globalRotMatrix;
LogDebug("TrackerGeom") << "DDTrackerRingAlgo test " << child.data()->GetName() << " number " << copy
<< " positioned in " << mother.data()->GetName() << " at " << tran << " with "
<< globalRotMatrix;

copy += incrCopyNo;
phi += delta;
Expand Down
2 changes: 1 addition & 1 deletion RecoMTD/MeasurementDet/src/MTDDetLayerMeasurements.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MTDRecHitContainer MTDDetLayerMeasurements::recHits(const GeomDet* geomDet, cons

// Create the ChamberId
DetId detId(geoId.rawId());
LogDebug("Track|RecoMTD|MTDDetLayerMeasurements") << "(MTD): " << detId << std::endl;
LogDebug("Track|RecoMTD|MTDDetLayerMeasurements") << "(MTD): " << static_cast<MTDDetId>(detId) << std::endl;

// Get the MTD-Segment which relies on this chamber
//auto cmp = [](const unsigned one, const unsigned two) -> bool { return one < two; };
Expand Down
1 change: 1 addition & 0 deletions RecoTracker/SiTrackerMRHTools/src/SimpleDAFHitCollector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "TrackingTools/TrackFitters/interface/TrajectoryStateCombiner.h"

#ifdef EDM_ML_DEBUG
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
Expand Down
1 change: 1 addition & 0 deletions SimCalorimetry/EcalSimAlgos/src/EcalCoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "SimGeneral/NoiseGenerators/interface/CorrelatedNoisifier.h"
#include "DataFormats/EcalDigi/interface/EcalMGPASample.h"
#include "DataFormats/EcalDigi/interface/EcalDataFrame.h"
#include "CalibFormats/CaloObjects/interface/CaloTSamplesBase.icc"

#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion SimFastTiming/FastTimingCommon/src/BTLElectronicsSim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void BTLElectronicsSim::runTrivialShaper(BTLDataFrame& dataFrame,
bool debug = debug_;
#ifdef EDM_ML_DEBUG
for (int it = 0; it < (int)(chargeColl.size()); it++)
debug |= (chargeColl[it] > adcThreshold_fC_);
debug |= (chargeColl[it] > adcThreshold_MIP_);
#endif

if (debug)
Expand Down
2 changes: 1 addition & 1 deletion SimFastTiming/FastTimingCommon/src/ETLElectronicsSim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void ETLElectronicsSim::runTrivialShaper(ETLDataFrame& dataFrame,
bool debug = debug_;
#ifdef EDM_ML_DEBUG
for (int it = 0; it < (int)(chargeColl.size()); it++)
debug |= (chargeColl[it] > adcThreshold_fC_);
debug |= (chargeColl[it] > adcThreshold_MIP_);
#endif

if (debug)
Expand Down
4 changes: 2 additions & 2 deletions SimG4CMS/HGCalTestBeam/plugins/HGCPassive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ void HGCPassive::update(const G4Step* aStep) {
G4LogicalVolume* plv = touchable->GetVolume(i)->GetLogicalVolume();
auto it = (init_) ? mapLV_.find(plv) : findLV(plv);
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("ValidHGCal") << "Level: " << ii << ":" << i << " " << plv->GetName() << " flag in the List "
<< (it != mapLV_.end());
edm::LogVerbatim("ValidHGCal") << "Level: " << level << ":" << i << " " << plv->GetName()
<< " flag in the List " << (it != mapLV_.end());
#endif
if (it != mapLV_.end()) {
unsigned int copy =
Expand Down
2 changes: 1 addition & 1 deletion SimG4Core/Geometry/src/DDG4ProductionCuts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void DDG4ProductionCuts::dd4hepInitialize() {
<< " DDG4ProductionCuts : Got " << dd4hepVec_.size() << " region roots.\n"
<< " DDG4ProductionCuts : List of all roots:";
for (size_t jj = 0; jj < dd4hepVec_.size(); ++jj)
LogDebug("Geometry") << " DDG4ProductionCuts : root=" << dd4hepVec_[jj];
LogDebug("Geometry") << " DDG4ProductionCuts : root=" << dd4hepVec_[jj].first << " , " << dd4hepVec_[jj].second;
}
}

Expand Down
1 change: 1 addition & 0 deletions SimTransport/PPSProtonTransport/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="CommonTools/Utils"/>
<use name="SimDataFormats/Forward"/>
<use name="SimDataFormats/GeneratorProducts"/>
<use name="SimGeneral/HepPDTRecord"/>
<use name="Utilities/PPS"/>
Expand Down
1 change: 1 addition & 0 deletions SimTransport/PPSProtonTransport/src/ProtonTransport.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "SimDataFormats/Forward/interface/LHCTransportLink.h"
#include "SimTransport/PPSProtonTransport/interface/ProtonTransport.h"
#include "Utilities/PPS/interface/PPSUnitConversion.h"
#include <CLHEP/Random/RandGauss.h>
Expand Down

0 comments on commit 61ea698

Please sign in to comment.