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

L1T: fix duplicate dictionary problems in #33978 #34094

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions DataFormats/DetId/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</class>
<class name="std::vector<DetId>"/>
<class name="edm::EDCollection<DetId>"/>
<class name="std::map<DetId,DetId>"/>
<class name="edm::Wrapper<edm::EDCollection<DetId> >"/>
<class name="std::vector<std::pair<DetId,float> >"/>
<class name="std::pair<DetId,float>"/>
Expand Down
76 changes: 37 additions & 39 deletions L1Trigger/VertexFinder/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,42 @@
#include <vector>

namespace {
struct vfdictionary {
l1tVertexFinder::InputData id;
l1tVertexFinder::Vertex vtx;
l1tVertexFinder::TP tp;
l1tVertexFinder::Stub s;
std::map<DetId, DetId> mdid;

edm::Ptr<l1tVertexFinder::Stub> ptrstub;
edm::Ptr<l1tVertexFinder::TP> ptrtp;

edm::RefToBase<TrackingParticle> rtbtp;

std::map<edm::Ptr<TrackingParticle>, edm::RefToBase<TrackingParticle>> mptrtprtbtp;

edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub>> vmptrstub;
edm::ValueMap<edm::Ptr<l1tVertexFinder::TP>> vmptrtp;
edm::ValueMap<l1tVertexFinder::Stub> vmstub;
edm::ValueMap<l1tVertexFinder::TP> vmpt;

std::vector<l1tVertexFinder::Stub> vs;
std::vector<l1tVertexFinder::TP> vtp;
std::vector<l1tVertexFinder::Vertex> vvtx;
std::vector<edm::Ptr<l1tVertexFinder::Stub>> vptrstub;
std::vector<edm::Ptr<l1tVertexFinder::TP>> vptrtp;

edm::Wrapper<l1tVertexFinder::Vertex> wvtx;
edm::Wrapper<l1tVertexFinder::TP> wtp;
edm::Wrapper<l1tVertexFinder::Stub> ws;
edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub>>> wvmptrstub;
edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::TP>>> wvmprttp;
edm::Wrapper<edm::ValueMap<l1tVertexFinder::Stub>> wvmstub;
edm::Wrapper<edm::ValueMap<l1tVertexFinder::TP>> wvmtp;
edm::Wrapper<std::map<DetId, DetId>> wmdid;
edm::Wrapper<std::vector<l1tVertexFinder::Stub>> wvs;
edm::Wrapper<std::vector<l1tVertexFinder::TP>> wvtp;
edm::Wrapper<std::vector<l1tVertexFinder::Vertex>> wvvtx;
edm::Wrapper<l1tVertexFinder::InputData> wid;
};
l1tVertexFinder::InputData id;
l1tVertexFinder::Vertex vtx;
l1tVertexFinder::TP tp;
l1tVertexFinder::Stub s;
std::map<DetId, DetId> mdid;

edm::Ptr<l1tVertexFinder::Stub> ptrstub;
edm::Ptr<l1tVertexFinder::TP> ptrtp;

edm::RefToBase<TrackingParticle> rtbtp;

std::map<edm::Ptr<TrackingParticle>, edm::RefToBase<TrackingParticle>> mptrtprtbtp;

edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub>> vmptrstub;
edm::ValueMap<edm::Ptr<l1tVertexFinder::TP>> vmptrtp;
edm::ValueMap<l1tVertexFinder::Stub> vmstub;
edm::ValueMap<l1tVertexFinder::TP> vmpt;

std::vector<l1tVertexFinder::Stub> vs;
std::vector<l1tVertexFinder::TP> vtp;
std::vector<l1tVertexFinder::Vertex> vvtx;
std::vector<edm::Ptr<l1tVertexFinder::Stub>> vptrstub;
std::vector<edm::Ptr<l1tVertexFinder::TP>> vptrtp;

edm::Wrapper<l1tVertexFinder::Vertex> wvtx;
edm::Wrapper<l1tVertexFinder::TP> wtp;
edm::Wrapper<l1tVertexFinder::Stub> ws;
edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub>>> wvmptrstub;
edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::TP>>> wvmprttp;
edm::Wrapper<edm::ValueMap<l1tVertexFinder::Stub>> wvmstub;
edm::Wrapper<edm::ValueMap<l1tVertexFinder::TP>> wvmtp;
edm::Wrapper<std::map<DetId, DetId>> wmdid;
edm::Wrapper<std::vector<l1tVertexFinder::Stub>> wvs;
edm::Wrapper<std::vector<l1tVertexFinder::TP>> wvtp;
edm::Wrapper<std::vector<l1tVertexFinder::Vertex>> wvvtx;
edm::Wrapper<l1tVertexFinder::InputData> wid;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that the contents of the struct (and the namespace) can be removed.

} // namespace

#endif
#endif
59 changes: 27 additions & 32 deletions L1Trigger/VertexFinder/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
<lcgdict>
<class name="l1tVertexFinder::InputData"/>
<class name="l1tVertexFinder::Vertex"/>
<class name="l1tVertexFinder::TP"/>
<class name="l1tVertexFinder::Stub"/>
<class name="std::map<DetId,DetId>"/>
<class name="edm::Ptr<l1tVertexFinder::Stub>"/>
<class name="edm::Ptr<l1tVertexFinder::TP>"/>
<class name="edm::RefToBase<TrackingParticle>"/>
<class name="edm::reftobase::BaseHolder<TrackingParticle>"/>
<class name="std::map<edm::Ptr<TrackingParticle>,edm::RefToBase<TrackingParticle> >"/>
<class name="edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub> >"/>
<class name="edm::ValueMap<edm::Ptr<l1tVertexFinder::TP> >"/>
<class name="edm::ValueMap<l1tVertexFinder::Stub>"/>
<class name="edm::ValueMap<l1tVertexFinder::TP>"/>
<class name="std::vector<l1tVertexFinder::Stub>"/>
<class name="std::vector<l1tVertexFinder::TP>"/>
<class name="std::vector<l1tVertexFinder::Vertex>"/>
<class name="std::vector<edm::Ptr<l1tVertexFinder::Stub> >"/>
<class name="std::vector<edm::Ptr<l1tVertexFinder::TP> >"/>
<class name="edm::Wrapper<l1tVertexFinder::Vertex>"/>
<class name="edm::Wrapper<l1tVertexFinder::TP>"/>
<class name="edm::Wrapper<l1tVertexFinder::Stub>"/>
<class name="edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub> > >"/>
<class name="edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::TP> > >"/>
<class name="edm::Wrapper<edm::ValueMap<l1tVertexFinder::Stub> >"/>
<class name="edm::Wrapper<edm::ValueMap<l1tVertexFinder::TP> >"/>
<class name="edm::Wrapper<std::map<DetId,DetId>>"/>
<class name="edm::Wrapper<std::vector<l1tVertexFinder::Stub>>"/>
<class name="edm::Wrapper<std::vector<l1tVertexFinder::TP>>"/>
<class name="edm::Wrapper<std::vector<l1tVertexFinder::Vertex>>"/>
<class name="edm::Wrapper<l1tVertexFinder::InputData>"/>
</lcgdict>
<class name="l1tVertexFinder::InputData" transient="true"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should actually be

Suggested change
<class name="l1tVertexFinder::InputData" transient="true"/>
<class name="l1tVertexFinder::InputData" persistent="false"/>

<class name="l1tVertexFinder::Vertex" transient="true"/>
<class name="l1tVertexFinder::TP" transient="true"/>
<class name="l1tVertexFinder::Stub" transient="true"/>
<class name="edm::Ptr<l1tVertexFinder::Stub>" transient="true"/>
<class name="edm::Ptr<l1tVertexFinder::TP>" transient="true"/>
<class name="edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub> >" transient="true"/>
<class name="edm::ValueMap<edm::Ptr<l1tVertexFinder::TP> >" transient="true"/>
<class name="edm::ValueMap<l1tVertexFinder::Stub>" transient="true"/>
<class name="edm::ValueMap<l1tVertexFinder::TP>" transient="true"/>
<class name="std::vector<l1tVertexFinder::Stub>" transient="true"/>
<class name="std::vector<l1tVertexFinder::TP>" transient="true"/>
<class name="std::vector<l1tVertexFinder::Vertex>" transient="true"/>
<class name="std::vector<edm::Ptr<l1tVertexFinder::Stub> >" transient="true"/>
<class name="std::vector<edm::Ptr<l1tVertexFinder::TP> >" transient="true"/>
<class name="edm::Wrapper<l1tVertexFinder::Vertex>" transient="true"/>
<class name="edm::Wrapper<l1tVertexFinder::TP>" transient="true"/>
<class name="edm::Wrapper<l1tVertexFinder::Stub>" transient="true"/>
<class name="edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::Stub> > >" transient="true"/>
<class name="edm::Wrapper<edm::ValueMap<edm::Ptr<l1tVertexFinder::TP> > >" transient="true"/>
<class name="edm::Wrapper<edm::ValueMap<l1tVertexFinder::Stub> >" transient="true"/>
<class name="edm::Wrapper<edm::ValueMap<l1tVertexFinder::TP> >" transient="true"/>
<class name="edm::Wrapper<std::vector<l1tVertexFinder::Stub>>" transient="true"/>
<class name="edm::Wrapper<std::vector<l1tVertexFinder::TP>>" transient="true"/>
<class name="edm::Wrapper<std::vector<l1tVertexFinder::Vertex>>" transient="true"/>
<class name="edm::Wrapper<l1tVertexFinder::InputData>" transient="true"/>
</lcgdict>
2 changes: 2 additions & 0 deletions SimDataFormats/TrackingAnalysis/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

<class name="TrackingParticleRefVector" />
<class name="edm::Wrapper<TrackingParticleRefVector>"/>

<class name="std::map<edm::Ptr<TrackingParticle>,edm::RefToBase<TrackingParticle> >"/>
Copy link
Contributor

@makortel makortel Jun 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still curious why RefToBase<TrackingParticle> is needed. I don't see anything inheriting from TrackingParticle, so a polymorphic reference is not really needed (i.e. edm::Ref would suffice), and for any new use for polymorphic Refs the edm::Ptr is strongly preferred.


<class name="edm::helpers::KeyVal<edm::RefProd<std::vector<TrackingParticle> >,edm::RefToBaseProd<reco::Track> >" />
<class name="edm::helpers::KeyVal<edm::RefToBaseProd<reco::Track>,edm::RefProd<std::vector<TrackingParticle> > >" />
Expand Down