Skip to content

Commit

Permalink
Merge pull request #2679 from cerati/fix-compile-errors-debug-flag
Browse files Browse the repository at this point in the history
Fix compile errors debug flag
  • Loading branch information
nclopezo committed Mar 3, 2014
2 parents 63e578f + 59099f3 commit e1a93b8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 24 deletions.
12 changes: 10 additions & 2 deletions DataFormats/MuonDetId/interface/CSCDetId.h
Expand Up @@ -37,8 +37,8 @@ class CSCDetId : public DetId {

/// Construct from a packed id. It is required that the Detector part of
/// id is Muon and the SubDet part is CSC, otherwise an exception is thrown.
CSCDetId(uint32_t id) : DetId(id){}
CSCDetId(DetId id) : DetId(id){}
CSCDetId(uint32_t id) : DetId(id) {}
CSCDetId(DetId id) : DetId(id) {}


/// Construct from fully qualified identifier.
Expand All @@ -51,6 +51,14 @@ class CSCDetId : public DetId {
id_ |= init(iendcap, istation, iring, ichamber, ilayer);
}

#else

CSCDetId(uint32_t id);
CSCDetId(DetId id);
CSCDetId( int iendcap, int istation,
int iring, int ichamber,
int ilayer = 0 );

#endif

/** Chamber CSCDetId from a Layer CSCDetId
Expand Down
8 changes: 4 additions & 4 deletions RecoTracker/TrackProducer/interface/TrackProducerBase.icc
Expand Up @@ -119,8 +119,8 @@ TrackProducerBase<T>::getFromEvt(edm::Event& theEvent,edm::Handle<TrackCandidate
//get the TrackCandidateCollection from the event
//
LogDebug("TrackProducer") <<
"get the TrackCandidateCollection from the event, source is " << src_<<"\n";
theEvent.getByToken(src_,theTCCollection );
"get the TrackCandidateCollection from the event, source is " << conf_.getParameter<edm::InputTag>( "src" ) <<"\n";
theEvent.getByToken(src_,theTCCollection );

//get the BeamSpot
edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
Expand All @@ -135,8 +135,8 @@ TrackProducerBase<T>::getFromEvt(edm::Event& theEvent,edm::Handle<TrackCollectio
//get the TrackCollection from the event
//
LogDebug("TrackProducer") <<
"get the TrackCollection from the event, source is " << src_<<"\n";
theEvent.getByToken(src_,theTCollection );
"get the TrackCollection from the event, source is " << conf_.getParameter<edm::InputTag>( "src" ) <<"\n";
theEvent.getByToken(src_,theTCollection );

//get the BeamSpot
edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
Expand Down
26 changes: 16 additions & 10 deletions TrackingTools/TrackFitters/src/KFTrajectoryFitter.cc
Expand Up @@ -3,14 +3,22 @@
#include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Utilities/interface/isFinite.h"

#ifdef EDM_ML_DEBUG
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/DTWireId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "FWCore/Utilities/interface/isFinite.h"

#include "DataFormats/SiStripDetId/interface/TIBDetId.h"
#include "DataFormats/SiStripDetId/interface/TOBDetId.h"
#include "DataFormats/SiStripDetId/interface/TIDDetId.h"
#include "DataFormats/SiStripDetId/interface/TECDetId.h"
#include "DataFormats/SiPixelDetId/interface/PXBDetId.h"
#include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
#endif

const DetLayerGeometry KFTrajectoryFitter::dummyGeometry;

Expand Down Expand Up @@ -98,19 +106,17 @@ Trajectory KFTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,

if(hitId.det() == DetId::Tracker) {
if (hitId.subdetId() == StripSubdetector::TIB )
LogTrace("TrackFitters") << " I am TIB " << tTopo->tibLayer(hitId);
LogTrace("TrackFitters") << " I am TIB " << TIBDetId(hitId).layer();
else if (hitId.subdetId() == StripSubdetector::TOB )
LogTrace("TrackFitters") << " I am TOB " << tTopo->tobLayer(hitId);
LogTrace("TrackFitters") << " I am TOB " << TOBDetId(hitId).layer();
else if (hitId.subdetId() == StripSubdetector::TEC )
LogTrace("TrackFitters") << " I am TEC " << tTopo->tecWheel(hitId);
else if (hitId.subdetId() == StripSubdetector::TID )
LogTrace("TrackFitters") << " I am TID " << tTopo->tidWheel(hitId);
LogTrace("TrackFitters") << " I am TEC " << TECDetId(hitId).wheel();
else if (hitId.subdetId() == StripSubdetector::TID )
LogTrace("TrackFitters") << " I am TID " << tTopo->tidWheel(hitId);
LogTrace("TrackFitters") << " I am TID " << TIDDetId(hitId).wheel();
else if (hitId.subdetId() == (int) PixelSubdetector::PixelBarrel )
LogTrace("TrackFitters") << " I am PixBar " << tTopo->pxbLayer(hitId);
LogTrace("TrackFitters") << " I am PixBar " << PXBDetId(hitId).layer();
else if (hitId.subdetId() == (int) PixelSubdetector::PixelEndcap )
LogTrace("TrackFitters") << " I am PixFwd " << tTopo->pxfDisk(hitId);
LogTrace("TrackFitters") << " I am PixFwd " << PXFDetId(hitId).disk();
else
LogTrace("TrackFitters") << " UNKNOWN TRACKER HIT TYPE ";
}
Expand Down
20 changes: 12 additions & 8 deletions TrackingTools/TrackFitters/src/KFTrajectorySmoother.cc
Expand Up @@ -11,6 +11,12 @@
#include "DataFormats/MuonDetId/interface/DTWireId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "DataFormats/SiStripDetId/interface/TIBDetId.h"
#include "DataFormats/SiStripDetId/interface/TOBDetId.h"
#include "DataFormats/SiStripDetId/interface/TIDDetId.h"
#include "DataFormats/SiStripDetId/interface/TECDetId.h"
#include "DataFormats/SiPixelDetId/interface/PXBDetId.h"
#include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
#endif

#include "FWCore/Utilities/interface/GCC11Compatibility.h"
Expand Down Expand Up @@ -105,19 +111,17 @@ KFTrajectorySmoother::trajectory(const Trajectory& aTraj) const {

if(hitId.det() == DetId::Tracker) {
if (hitId.subdetId() == StripSubdetector::TIB )
LogTrace("TrackFitters") << " I am TIB " << tTopo->tibLayer(hitId);
LogTrace("TrackFitters") << " I am TIB " << TIBDetId(hitId).layer();
else if (hitId.subdetId() == StripSubdetector::TOB )
LogTrace("TrackFitters") << " I am TOB " << tTopo->tobLayer(hitId);
LogTrace("TrackFitters") << " I am TOB " << TOBDetId(hitId).layer();
else if (hitId.subdetId() == StripSubdetector::TEC )
LogTrace("TrackFitters") << " I am TEC " << tTopo->tecWheel(hitId);
LogTrace("TrackFitters") << " I am TEC " << TECDetId(hitId).wheel();
else if (hitId.subdetId() == StripSubdetector::TID )
LogTrace("TrackFitters") << " I am TID " << tTopo->tidWheel(hitId);
else if (hitId.subdetId() == StripSubdetector::TID )
LogTrace("TrackFitters") << " I am TID " << tTopo->tidWheel(hitId);
LogTrace("TrackFitters") << " I am TID " << TIDDetId(hitId).wheel();
else if (hitId.subdetId() == (int) PixelSubdetector::PixelBarrel )
LogTrace("TrackFitters") << " I am PixBar " << tTopo->pxbLayer(hitId);
LogTrace("TrackFitters") << " I am PixBar " << PXBDetId(hitId).layer();
else if (hitId.subdetId() == (int) PixelSubdetector::PixelEndcap )
LogTrace("TrackFitters") << " I am PixFwd " << tTopo->pxfDisk(hitId);
LogTrace("TrackFitters") << " I am PixFwd " << PXFDetId(hitId).disk();
else
LogTrace("TrackFitters") << " UNKNOWN TRACKER HIT TYPE ";
}
Expand Down

0 comments on commit e1a93b8

Please sign in to comment.