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

Fix package dependency problems in Alignment #27384

Merged
merged 2 commits into from Jun 28, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 17 additions & 3 deletions Alignment/CommonAlignment/interface/AlignableObjectId.h
Expand Up @@ -7,8 +7,6 @@
class TrackerGeometry;
class DTGeometry;
class CSCGeometry;
class AlignableTracker;
class AlignableMuon;

/// Allows conversion between type and name, and vice-versa
class AlignableObjectId {
Expand Down Expand Up @@ -38,7 +36,10 @@ class AlignableObjectId {

static Geometry commonGeometry(Geometry, Geometry);
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId&, const AlignableObjectId&);
static AlignableObjectId commonObjectIdProvider(const AlignableTracker*, const AlignableMuon*);
template <typename TRACKER, typename MUON>
static AlignableObjectId commonObjectIdProvider(const TRACKER*, const MUON*);
template <typename TRACKER>
static AlignableObjectId commonObjectIdProvider(const TRACKER*, std::nullptr_t);

private:
static Geometry trackerGeometry(const TrackerGeometry*);
Expand All @@ -48,4 +49,17 @@ class AlignableObjectId {
Geometry geometry_{Geometry::Unspecified};
};

template <typename TRACKER, typename MUON>
AlignableObjectId AlignableObjectId ::commonObjectIdProvider(const TRACKER* tracker, const MUON* muon) {
auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
auto muonGeometry = (muon ? muon->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
return AlignableObjectId::commonGeometry(trackerGeometry, muonGeometry);
}

template <typename T>
AlignableObjectId AlignableObjectId ::commonObjectIdProvider(const T* tracker, std::nullptr_t) {
auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
return AlignableObjectId::commonGeometry(trackerGeometry, AlignableObjectId::Geometry::General);
}

#endif
9 changes: 0 additions & 9 deletions Alignment/CommonAlignment/src/AlignableObjectId.cc
Expand Up @@ -4,8 +4,6 @@

#include "FWCore/Utilities/interface/Exception.h"
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
#include "Alignment/TrackerAlignment/interface/AlignableTracker.h"
#include "Alignment/MuonAlignment/interface/AlignableMuon.h"

struct AlignableObjectId::entry {
align::StructureType type;
Expand Down Expand Up @@ -323,10 +321,3 @@ AlignableObjectId AlignableObjectId ::commonObjectIdProvider(const AlignableObje
const AlignableObjectId &second) {
return AlignableObjectId{commonGeometry(first.geometry(), second.geometry())};
}

AlignableObjectId AlignableObjectId ::commonObjectIdProvider(const AlignableTracker *tracker,
const AlignableMuon *muon) {
auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
auto muonGeometry = (muon ? muon->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
return AlignableObjectId::commonGeometry(trackerGeometry, muonGeometry);
}
3 changes: 3 additions & 0 deletions Alignment/MillePedeAlignmentAlgorithm/src/PedeLabelerBase.cc
Expand Up @@ -14,6 +14,9 @@
#include "Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters.h"
#include "Alignment/CommonAlignmentAlgorithm/interface/IntegratedCalibrationBase.h"

#include "Alignment/TrackerAlignment/interface/AlignableTracker.h"
#include "Alignment/MuonAlignment/interface/AlignableMuon.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"

// NOTE: Changing '+14' makes older binary files unreadable...
Expand Down
1 change: 1 addition & 0 deletions Alignment/SurveyAnalysis/BuildFile.xml
Expand Up @@ -2,6 +2,7 @@
<use name="Alignment/CommonAlignment"/>
<use name="DataFormats/MuonDetId"/>
<use name="DataFormats/SiStripDetId"/>
<use name="Geometry/DTGeometry"/>
<use name="FWCore/Framework"/>
<use name="FWCore/MessageLogger"/>
<use name="FWCore/Utilities"/>
Expand Down
1 change: 1 addition & 0 deletions Alignment/TrackerAlignment/plugins/BuildFile.xml
Expand Up @@ -71,6 +71,7 @@
<use name="DataFormats/SiPixelDetId"/>
<use name="DataFormats/SiStripDetId"/>
<use name="DataFormats/SiStripCluster"/>
<use name="DataFormats/MuonReco"/>
<use name="CondFormats/DataRecord"/>
<use name="CondFormats/SiStripObjects"/>
<use name="MagneticField/Engine"/>
Expand Down