Skip to content

Commit

Permalink
Implement suggested changes for DataFormats/RecoParticleFlow subpackage
Browse files Browse the repository at this point in the history
1) Merge files src/alpaka/classes_serial{.h,_def.xml} into src/classes{.h,_def.xml} and update BuildFile.xml
2) Split class definitions into two files, undoing commit 42fd4a7. This is possible due to PR cms-sw/cmsdist/pull/8705. Switching to this version required a small change to the Python configuration.
These two changes were suggested for PR cms-sw#42807.
  • Loading branch information
fllor authored and jsamudio committed Oct 24, 2023
1 parent d0f321b commit ec557d3
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 130 deletions.
4 changes: 3 additions & 1 deletion DataFormats/ParticleFlowReco/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<use name="DataFormats/Portable"/>
<use name="DataFormats/SoATemplate"/>
<use name="HeterogeneousCore/AlpakaInterface"/>
<flags ALPAKA_BACKENDS="1"/>
<flags LCG_DICT_HEADER="classes_1.h classes_2.h"/>
<flags LCG_DICT_XML="classes_def_1.xml classes_def_2.xml"/>
<flags ALPAKA_BACKENDS="cuda rocm"/>
<export>
<lib name="1"/>
</export>
10 changes: 0 additions & 10 deletions DataFormats/ParticleFlowReco/src/alpaka/classes_serial.h

This file was deleted.

57 changes: 0 additions & 57 deletions DataFormats/ParticleFlowReco/src/alpaka/classes_serial_def.xml

This file was deleted.

54 changes: 54 additions & 0 deletions DataFormats/ParticleFlowReco/src/classes_1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/Common/interface/Ref.h"
#include <DataFormats/Common/interface/OwnVector.h>
#include <DataFormats/Common/interface/ClonePolicy.h>
#include "DataFormats/Common/interface/ValueMap.h"

#include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
#include "Math/Cartesian3D.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h"
#include "Math/Polar3D.h"
#include "Math/CylindricalEta3D.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
#include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrack.h"
#include "Math/GenVector/PositionVector3D.h"
#include "DataFormats/Math/interface/Point3D.h"
#include "Rtypes.h"
#include "DataFormats/Math/interface/Vector3D.h"
#include "Math/PxPyPzE4D.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
#include "DataFormats/GsfTrackReco/interface/GsfTrackExtra.h"
#include "DataFormats/ParticleFlowReco/interface/PFSimParticle.h"
#include "DataFormats/ParticleFlowReco/interface/PFTrajectoryPoint.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockElement.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementGsfTrack.h" //Daniele
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementBrem.h" //Daniele
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementSuperCluster.h" //Florian
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementCluster.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedTrackerVertex.h"
#include "DataFormats/ParticleFlowReco/interface/PFNuclearInteraction.h"
#include "DataFormats/ParticleFlowReco/interface/PFConversion.h"
#include "DataFormats/ParticleFlowReco/interface/PFConversionFwd.h"
#include "DataFormats/ParticleFlowReco/interface/PFV0.h"
#include "DataFormats/ParticleFlowReco/interface/ConvBremSeed.h"
#include "DataFormats/ParticleFlowReco/interface/ConvBremSeedFwd.h"
#include "DataFormats/ParticleFlowReco/interface/ParticleFiltrationDecision.h"

#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexCandidate.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexSeed.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertex.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexCandidateFwd.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexSeedFwd.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexFwd.h"

#include "DataFormats/ParticleFlowReco/interface/PreId.h"
#include "DataFormats/ParticleFlowReco/interface/PreIdFwd.h"
#include "DataFormats/ParticleFlowReco/interface/RecoPFClusterRefCandidate.h"
#include "DataFormats/ParticleFlowReco/interface/RecoPFClusterRefCandidateFwd.h"

#include <map>
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
#include <map>

#include "DataFormats/ParticleFlowReco/interface/CaloRecHitSoA.h"
#include "DataFormats/ParticleFlowReco/interface/CaloRecHitHostCollection.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitSoA.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitHostCollection.h"

#include "DataFormats/ParticleFlowReco/interface/PFClusterSoA.h"
#include "DataFormats/ParticleFlowReco/interface/PFClusterHostCollection.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitFractionSoA.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHitFractionHostCollection.h"
64 changes: 64 additions & 0 deletions DataFormats/ParticleFlowReco/src/classes_def_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<lcgdict>
<selection>


<class name="reco::PFNuclearInteraction" ClassVersion="10">
<version ClassVersion="10" checksum="1573561360"/>
</class>
<class name="std::vector<reco::PFNuclearInteraction>" />
<class name="edm::Wrapper<std::vector<reco::PFNuclearInteraction> >" />
<class name="edm::Ref<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction, edm::refhelper::FindUsingAdvance<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction> >" />
<class name="edm::RefProd<std::vector<reco::PFNuclearInteraction> >" />
<class name="edm::RefVector<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction, edm::refhelper::FindUsingAdvance<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction> >" />


<class name="reco::PFDisplacedTrackerVertex" ClassVersion="10">
<version ClassVersion="10" checksum="2059737151"/>
</class>
<class name="std::vector<reco::PFDisplacedTrackerVertex>" />
<class name="edm::Wrapper<std::vector<reco::PFDisplacedTrackerVertex> >" />
<class name="edm::Ref<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex, edm::refhelper::FindUsingAdvance<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex> >" />
<class name="edm::RefProd<std::vector<reco::PFDisplacedTrackerVertex> >" />
<class name="edm::RefVector<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex, edm::refhelper::FindUsingAdvance<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex> >" />

<class name="reco::PFConversion" ClassVersion="10">
<version ClassVersion="10" checksum="2417207933"/>
</class>
<class name="std::vector<reco::PFConversion>"/>
<class name="edm::Wrapper<std::vector<reco::PFConversion> >"/>
<class name="edm::Ref<std::vector<reco::PFConversion>,reco::PFConversion,edm::refhelper::FindUsingAdvance<std::vector<reco::PFConversion>,reco::PFConversion> >"/>
<class name="edm::RefProd<std::vector<reco::PFConversion> >"/>
<class name="edm::RefVector<std::vector<reco::PFConversion>,reco::PFConversion,edm::refhelper::FindUsingAdvance<std::vector<reco::PFConversion>,reco::PFConversion> >"/>
<class name="std::vector<edm::Ref<std::vector<reco::PFRecTrack>,reco::PFRecTrack,edm::refhelper::FindUsingAdvance<std::vector<reco::PFRecTrack>,reco::PFRecTrack> > >"/>

<class name="reco::PFV0" ClassVersion="10">
<version ClassVersion="10" checksum="40832700"/>
</class>
<class name="std::vector<reco::PFV0>" />
<class name="edm::Wrapper<std::vector<reco::PFV0> >" />
<class name="edm::Ref<std::vector<reco::PFV0>, reco::PFV0, edm::refhelper::FindUsingAdvance<std::vector<reco::PFV0>, reco::PFV0> >" />
<class name="edm::RefProd<std::vector<reco::PFV0> >" />
<class name="edm::RefVector<std::vector<reco::PFV0>, reco::PFV0, edm::refhelper::FindUsingAdvance<std::vector<reco::PFV0>, reco::PFV0> >" />
<class name="edm::Ref<std::vector<reco::VertexCompositeCandidate>,reco::VertexCompositeCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::VertexCompositeCandidate>,reco::VertexCompositeCandidate> >" />


<class name="reco::ConvBremSeed" ClassVersion="12">
<version ClassVersion="10" checksum="2980747190"/>
<version ClassVersion="11" checksum="637662266"/>
<version ClassVersion="12" checksum="2604169839"/>
</class>
<class name="std::vector<reco::ConvBremSeed>"/>
<class name="edm::Ref<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> >"/>
<class name="edm::RefProd<std::vector<reco::ConvBremSeed> >"/>
<class name="edm::Wrapper<std::vector<reco::ConvBremSeed> >"/>
<class name="edm::RefVector<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> >"/>
<class name="edm::Wrapper<edm::RefVector<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> > >"/>
<class name="edm::RefToBase<reco::ConvBremSeed>"/>
<class name="edm::reftobase::BaseHolder<reco::ConvBremSeed>" />
<class name="edm::reftobase::RefHolder<edm::Ref<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> > >"/>
<class name="edm::reftobase::Holder<reco::ConvBremSeed,edm::Ref<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> > >"/>


</selection>
</lcgdict>

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,64 @@
<class name="reco::PFRecHitFractionSoA"/>
<class name="reco::PFRecHitFractionSoA::View"/>

<!-- from classes_def_2.xml -->
<class name="reco::CaloRecHitHostCollection"/>
<read
sourceClass="reco::CaloRecHitHostCollection"
targetClass="reco::CaloRecHitHostCollection"
version="[1-]"
source="reco::CaloRecHitSoA layout_;"
target="buffer_,layout_,view_"
embed="false">
<![CDATA[
reco::CaloRecHitHostCollection::ROOTReadStreamer(newObj, onfile.layout_);
]]>
</read>
<class name="edm::Wrapper<reco::CaloRecHitHostCollection>" splitLevel="0"/>

<class name="reco::PFRecHitHostCollection"/>
<read
sourceClass="reco::PFRecHitHostCollection"
targetClass="reco::PFRecHitHostCollection"
version="[1-]"
source="reco::PFRecHitSoA layout_;"
target="buffer_,layout_,view_"
embed="false">
<![CDATA[
reco::PFRecHitHostCollection::ROOTReadStreamer(newObj, onfile.layout_);
]]>
</read>
<class name="edm::Wrapper<reco::PFRecHitHostCollection>" splitLevel="0"/>


<class name="reco::PFClusterHostCollection"/>
<read
sourceClass="reco::PFClusterHostCollection"
targetClass="reco::PFClusterHostCollection"
version="[1-]"
source="reco::PFClusterSoA layout_;"
target="buffer_,layout_,view_"
embed="false">
<![CDATA[
reco::PFClusterHostCollection::ROOTReadStreamer(newObj, onfile.layout_);
]]>
</read>
<class name="edm::Wrapper<reco::PFClusterHostCollection>" splitLevel="0"/>

<class name="reco::PFRecHitFractionHostCollection"/>
<read
sourceClass="reco::PFRecHitFractionHostCollection"
targetClass="reco::PFRecHitFractionHostCollection"
version="[1-]"
source="reco::PFRecHitFractionSoA layout_;"
target="buffer_,layout_,view_"
embed="false">
<![CDATA[
reco::PFRecHitFractionHostCollection::ROOTReadStreamer(newObj, onfile.layout_);
]]>
</read>
<class name="edm::Wrapper<reco::PFRecHitFractionHostCollection>" splitLevel="0"/>


<class name="reco::PFCluster" ClassVersion="17">
<version ClassVersion="17" checksum="3021111509"/>
<version ClassVersion="16" checksum="1786894710"/>
Expand Down Expand Up @@ -312,68 +369,9 @@
<class name="edm::reftobase::RefVectorHolder<reco::RecoPFClusterRefCandidateRefVector>" />

<class name="edm::Wrapper<edm::RefVector<std::vector<reco::RecoPFClusterRefCandidate>,reco::RecoPFClusterRefCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::RecoPFClusterRefCandidate>,reco::RecoPFClusterRefCandidate> > >" />

<!-- from classes_def_1.xml -->
<class name="reco::PFNuclearInteraction" ClassVersion="10">
<version ClassVersion="10" checksum="1573561360"/>
</class>
<class name="std::vector<reco::PFNuclearInteraction>" />
<class name="edm::Wrapper<std::vector<reco::PFNuclearInteraction> >" />
<class name="edm::Ref<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction, edm::refhelper::FindUsingAdvance<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction> >" />
<class name="edm::RefProd<std::vector<reco::PFNuclearInteraction> >" />
<class name="edm::RefVector<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction, edm::refhelper::FindUsingAdvance<std::vector<reco::PFNuclearInteraction>, reco::PFNuclearInteraction> >" />


<class name="reco::PFDisplacedTrackerVertex" ClassVersion="10">
<version ClassVersion="10" checksum="2059737151"/>
</class>
<class name="std::vector<reco::PFDisplacedTrackerVertex>" />
<class name="edm::Wrapper<std::vector<reco::PFDisplacedTrackerVertex> >" />
<class name="edm::Ref<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex, edm::refhelper::FindUsingAdvance<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex> >" />
<class name="edm::RefProd<std::vector<reco::PFDisplacedTrackerVertex> >" />
<class name="edm::RefVector<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex, edm::refhelper::FindUsingAdvance<std::vector<reco::PFDisplacedTrackerVertex>, reco::PFDisplacedTrackerVertex> >" />

<class name="reco::PFConversion" ClassVersion="10">
<version ClassVersion="10" checksum="2417207933"/>
</class>
<class name="std::vector<reco::PFConversion>"/>
<class name="edm::Wrapper<std::vector<reco::PFConversion> >"/>
<class name="edm::Ref<std::vector<reco::PFConversion>,reco::PFConversion,edm::refhelper::FindUsingAdvance<std::vector<reco::PFConversion>,reco::PFConversion> >"/>
<class name="edm::RefProd<std::vector<reco::PFConversion> >"/>
<class name="edm::RefVector<std::vector<reco::PFConversion>,reco::PFConversion,edm::refhelper::FindUsingAdvance<std::vector<reco::PFConversion>,reco::PFConversion> >"/>
<class name="std::vector<edm::Ref<std::vector<reco::PFRecTrack>,reco::PFRecTrack,edm::refhelper::FindUsingAdvance<std::vector<reco::PFRecTrack>,reco::PFRecTrack> > >"/>

<class name="reco::PFV0" ClassVersion="10">
<version ClassVersion="10" checksum="40832700"/>
</class>
<class name="std::vector<reco::PFV0>" />
<class name="edm::Wrapper<std::vector<reco::PFV0> >" />
<class name="edm::Ref<std::vector<reco::PFV0>, reco::PFV0, edm::refhelper::FindUsingAdvance<std::vector<reco::PFV0>, reco::PFV0> >" />
<class name="edm::RefProd<std::vector<reco::PFV0> >" />
<class name="edm::RefVector<std::vector<reco::PFV0>, reco::PFV0, edm::refhelper::FindUsingAdvance<std::vector<reco::PFV0>, reco::PFV0> >" />
<class name="edm::Ref<std::vector<reco::VertexCompositeCandidate>,reco::VertexCompositeCandidate,edm::refhelper::FindUsingAdvance<std::vector<reco::VertexCompositeCandidate>,reco::VertexCompositeCandidate> >" />


<class name="reco::ConvBremSeed" ClassVersion="12">
<version ClassVersion="10" checksum="2980747190"/>
<version ClassVersion="11" checksum="637662266"/>
<version ClassVersion="12" checksum="2604169839"/>
</class>
<class name="std::vector<reco::ConvBremSeed>"/>
<class name="edm::Ref<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> >"/>
<class name="edm::RefProd<std::vector<reco::ConvBremSeed> >"/>
<class name="edm::Wrapper<std::vector<reco::ConvBremSeed> >"/>
<class name="edm::RefVector<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> >"/>
<class name="edm::Wrapper<edm::RefVector<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> > >"/>
<class name="edm::RefToBase<reco::ConvBremSeed>"/>
<class name="edm::reftobase::BaseHolder<reco::ConvBremSeed>" />
<class name="edm::reftobase::RefHolder<edm::Ref<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> > >"/>
<class name="edm::reftobase::Holder<reco::ConvBremSeed,edm::Ref<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed,edm::refhelper::FindUsingAdvance<std::vector<reco::ConvBremSeed>,reco::ConvBremSeed> > >"/>

</selection>

<exclusion>
<!-- from classes_def_2.xml -->
<class name="edm::OwnVector<reco::PFBlockElement, edm::ClonePolicy<reco::PFBlockElement> >">
<method name="sort"/>
</class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
)

process.options = cms.untracked.PSet(
#FailPath = cms.untracked.vstring(),
IgnoreCompletely = cms.untracked.vstring(),
Rethrow = cms.untracked.vstring(),
#SkipEvent = cms.untracked.vstring(),
allowUnscheduled = cms.obsolete.untracked.bool,
canDeleteEarly = cms.untracked.vstring(),
deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
Expand Down

0 comments on commit ec557d3

Please sign in to comment.