diff --git a/Event/xAOD/xAODEgamma/CMakeLists.txt b/Event/xAOD/xAODEgamma/CMakeLists.txt index e1659e43fec256ed5834a84520dd418359996367..67cc3c2c713b79d45eceab56759e62a120935ff2 100644 --- a/Event/xAOD/xAODEgamma/CMakeLists.txt +++ b/Event/xAOD/xAODEgamma/CMakeLists.txt @@ -1,47 +1,29 @@ -# $Id$ -################################################################################ -# Package: xAODEgamma -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( xAODEgamma ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( - PUBLIC - Control/AthContainers - Control/AthLinks - DetectorDescription/GeoPrimitives - Event/EventPrimitives - Event/xAOD/xAODBase - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODCore - Event/xAOD/xAODPrimitives - Event/xAOD/xAODTracking - Event/xAOD/xAODTruth ) - -# External dependencies: -find_package( Eigen ) +# External dependencies. find_package( ROOT COMPONENTS Core GenVector ) - -# Extra dependencies, based on what environment we are in: -if (BUILDVP1LIGHT) - if( BUILDVP1LIGHT_DIST STREQUAL "ubuntu") - set( extra_libs GenVector ) - endif() -endif() +find_package( xAODUtilities ) # Component(s) in the package: atlas_add_library( xAODEgamma xAODEgamma/*.h xAODEgamma/versions/*.h Root/*.cxx PUBLIC_HEADERS xAODEgamma - INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthLinks - GeoPrimitives EventPrimitives xAODBase xAODCaloEvent xAODCore - xAODPrimitives xAODTracking xAODTruth ${extra_libs} ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks GeoPrimitives + EventPrimitives xAODBase xAODCaloEvent xAODCore xAODPrimitives xAODTracking + xAODTruth ) + +atlas_add_xaod_smart_pointer_dicts( + INPUT xAODEgamma/selection.xml + OUTPUT _selectionFile + CONTAINERS "xAOD::EgammaContainer_v1" "xAOD::ElectronContainer_v1" + "xAOD::PhotonContainer_v1" ) atlas_add_dictionary( xAODEgammaDict xAODEgamma/xAODEgammaDict.h - xAODEgamma/selection.xml - LINK_LIBRARIES xAODEgamma + ${_selectionFile} + LINK_LIBRARIES xAODCore xAODEgamma EXTRA_FILES Root/dict/*.cxx ) diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml b/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml index e9fe8311ccab142b45ac9202780ce1a85d14a147..b9fe932f106567ab5aca25fb6ca3d8f5411c6382 100644 --- a/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml +++ b/Event/xAOD/xAODEgamma/xAODEgamma/selection.xml @@ -1,99 +1,65 @@ -<!-- $Id: selection.xml 789134 2016-12-11 02:15:53Z christos $ --> +<!-- Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration --> <lcgdict> - <!-- Egamma_v1 dictionaries: --> - <class name="xAOD::Egamma_v1" /> - - <class name="xAOD::EgammaContainer_v1" - id="CE53CD7A-0B8E-44F5-9AB1-997E87713BC5" /> - - <class name="xAOD::EgammaAuxContainer_v1" - id="01A7F3AA-D5CA-4FCF-A314-20F822FF6CA0" /> - - <!-- Smart pointers to Egamma_v1: --> - <class name="DataLink<xAOD::EgammaContainer_v1>" /> - <class name="std::vector<DataLink<xAOD::EgammaContainer_v1> >" /> - <class name="ElementLink<xAOD::EgammaContainer_v1>" /> - <class name="std::vector<ElementLink<xAOD::EgammaContainer_v1> >" /> - <class name="std::vector<std::vector<ElementLink<xAOD::EgammaContainer_v1> > >" /> - <class name="SG::AuxTypeVectorFactory<ElementLink< xAOD::EgammaContainer_v1 > >"/> - - <!-- Electron_v1 dictionaries: --> - <class name="xAOD::Electron_v1" > - </class> - <class name="xAOD::ElectronContainer_v1" - id="9CA52CF4-E219-45B8-9971-6DAA89125952" /> - <class name="xAOD::ElectronAuxContainer_v1" - id="85A46300-3F57-454C-8B7E-94B653AA70CF" /> - - <!-- Electron_v2 dictionaries: --> - <class name="xAOD::ElectronAuxContainer_v2" - id="7160FC1C-937D-474C-909B-2C0FCE1DD755" /> - - <!-- Electron_v3 dictionaries: --> - <class name="xAOD::ElectronAuxContainer_v3" - id="5435686E-4B00-11E4-AEAA-02163E00A5BB" /> - - <!-- Smart pointers to Electron_v1: --> - <class name="DataLink<xAOD::ElectronContainer_v1>" /> - <class name="std::vector<DataLink<xAOD::ElectronContainer_v1> >" /> - <class name="ElementLink<xAOD::ElectronContainer_v1>" /> - <class name="std::vector<ElementLink<xAOD::ElectronContainer_v1> >" /> - <class name="std::vector<std::vector<ElementLink<xAOD::ElectronContainer_v1> > >" /> - - <!-- Photon_v1 dictionaries: --> - <class name="xAOD::Photon_v1" > - </class> - <class name="xAOD::PhotonContainer_v1" - id="5F045AAE-DBD8-47E4-90AC-9162530A9565" /> - <class name="xAOD::PhotonAuxContainer_v1" - id="67A1818E-4591-4100-B8BD-9A3C9E0D4EBB" /> - - <!-- Photon_v2 dictionaries: --> - <class name="xAOD::PhotonAuxContainer_v2" - id="CAE4C9A6-B3D0-429B-9A4F-1F174D892CA5" /> - - <!-- Photon_v3 dictionaries: --> - <class name="xAOD::PhotonAuxContainer_v3" - id="5C389DEC-4B00-11E4-B9F0-02163E00A5BB" /> - - - <!-- Smart pointers to Photon_v1: --> - <class name="DataLink<xAOD::PhotonContainer_v1>" /> - <class name="std::vector<DataLink<xAOD::PhotonContainer_v1> >" /> - <class name="ElementLink<xAOD::PhotonContainer_v1>" /> - <class name="std::vector<ElementLink<xAOD::PhotonContainer_v1> >" /> - <class name="std::vector<std::vector<ElementLink<xAOD::PhotonContainer_v1> > >" /> - - <!-- Objects from the namespace --> - <variable pattern="xAOD::EgammaParameters::*" /> - <class name="xAOD::EgammaParameters::ROOT6_NamespaceAutoloadHook" /> - - <!-- Enums --> - <enum pattern="xAOD::EgammaParameters::*" /> - - <!--Add Helper Functions --> - <function pattern="xAOD::EgammaHelpers::*" /> - - <!--Returned by helper functions --> - <class name="std::set<const xAOD::TrackParticle*>" /> - - <!-- Suppress the unwanted classes found by ROOT 6. --> - <!-- Hopefully we can remove these extra lines at one point... --> - <exclusion> - <class name="SG::IConstAuxStore" /> - <class name="DataLink<SG::IConstAuxStore>" /> - <class name="DataVector<xAOD::IParticle>" /> - <class pattern="xAOD::TrackParticle*" /> - <class pattern="DataVector<xAOD::TrackParticle*" /> - <class pattern="ElementLink<DataVector<xAOD::TrackParticle*" /> - <class pattern="xAOD::Vertex*" /> - <class pattern="DataVector<xAOD::Vertex*" /> - <class pattern="ElementLink<DataVector<xAOD::Vertex*" /> - <class pattern="xAOD::CaloCluster*" /> - <class pattern="DataVector<xAOD::CaloCluster*" /> - <class pattern="ElementLink<DataVector<xAOD::CaloCluster*" /> - <function pattern="xAOD::EgammaHelpers::getLink*" /> - </exclusion> - + <!-- xAOD::Egamma interface type(s). --> + <class name="xAOD::Egamma_v1" /> + <class name="xAOD::EgammaContainer_v1" + id="CE53CD7A-0B8E-44F5-9AB1-997E87713BC5" /> + <typedef name="xAOD::Egamma" /> + <typedef name="xAOD::EgammaContainer" /> + + <!-- xAOD::Egamma auxiliary type(s). --> + <class name="xAOD::EgammaAuxContainer_v1" + id="01A7F3AA-D5CA-4FCF-A314-20F822FF6CA0" /> + <typedef name="xAOD::EgammaAuxContainer" /> + + <!-- xAOD::Electron interface type(s). --> + <class name="xAOD::Electron_v1" /> + <class name="xAOD::ElectronContainer_v1" + id="9CA52CF4-E219-45B8-9971-6DAA89125952" /> + <typedef name="xAOD::Electron" /> + <typedef name="xAOD::ElectronContainer" /> + + <!-- xAOD::Electron auxiliary type(s). --> + <class name="xAOD::ElectronAuxContainer_v1" + id="85A46300-3F57-454C-8B7E-94B653AA70CF" /> + <class name="xAOD::ElectronAuxContainer_v2" + id="7160FC1C-937D-474C-909B-2C0FCE1DD755" /> + <class name="xAOD::ElectronAuxContainer_v3" + id="5435686E-4B00-11E4-AEAA-02163E00A5BB" /> + <typedef name="xAOD::ElectronAuxContainer" /> + + <!-- xAOD::Photon interface type(s). --> + <class name="xAOD::Photon_v1" /> + <class name="xAOD::PhotonContainer_v1" + id="5F045AAE-DBD8-47E4-90AC-9162530A9565" /> + <typedef name="xAOD::Photon" /> + <typedef name="xAOD::PhotonContainer" /> + + <!-- xAOD::Photon auxiliary type(s). --> + <class name="xAOD::PhotonAuxContainer_v1" + id="67A1818E-4591-4100-B8BD-9A3C9E0D4EBB" /> + <class name="xAOD::PhotonAuxContainer_v2" + id="CAE4C9A6-B3D0-429B-9A4F-1F174D892CA5" /> + <class name="xAOD::PhotonAuxContainer_v3" + id="5C389DEC-4B00-11E4-B9F0-02163E00A5BB" /> + <typedef name="xAOD::PhotonAuxContainer" /> + + <!-- Objects from the namespace. --> + <variable pattern="xAOD::EgammaParameters::*" /> + <class name="xAOD::EgammaParameters::ROOT6_NamespaceAutoloadHook" /> + + <!-- Enum(s). --> + <enum pattern="xAOD::EgammaParameters::*" /> + + <!-- Helper Function(s). --> + <function pattern="xAOD::EgammaHelpers::*" /> + + <!-- Type returned by helper function(s). --> + <class name="std::set<const xAOD::TrackParticle*>" /> + + <!-- Suppress the unwanted classes/symbols. --> + <exclusion> + <function pattern="xAOD::EgammaHelpers::getLink*" /> + </exclusion> </lcgdict> diff --git a/Event/xAOD/xAODEgamma/xAODEgamma/xAODEgammaDict.h b/Event/xAOD/xAODEgamma/xAODEgamma/xAODEgammaDict.h index 5958e037fafecff25fae1eba301b77818bc7ffd5..02ac71800c800fd5bdeb3c592bd30d00cf730cd1 100644 --- a/Event/xAOD/xAODEgamma/xAODEgamma/xAODEgammaDict.h +++ b/Event/xAOD/xAODEgamma/xAODEgamma/xAODEgammaDict.h @@ -1,37 +1,31 @@ // Dear emacs, this is -*- c++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id: xAODEgammaDict.h 789134 2016-12-11 02:15:53Z christos $ #ifndef XAODEGAMMA_XAODEGAMMADICT_H #define XAODEGAMMA_XAODEGAMMADICT_H -// Needed to successfully generate the dictionary in standalone mode: -#if defined(__GCCXML__) and not defined(EIGEN_DONT_VECTORIZE) -# define EIGEN_DONT_VECTORIZE -#endif // __GCCXML__ - -// STL include(s): -#include <vector> - -// EDM include(s): -#include "AthLinks/DataLink.h" -#include "AthLinks/ElementLink.h" - // Local include(s): +#include "xAODEgamma/Egamma.h" #include "xAODEgamma/EgammaContainer.h" +#include "xAODEgamma/EgammaAuxContainer.h" +#include "xAODEgamma/versions/Egamma_v1.h" #include "xAODEgamma/versions/EgammaContainer_v1.h" #include "xAODEgamma/versions/EgammaAuxContainer_v1.h" +#include "xAODEgamma/Electron.h" #include "xAODEgamma/ElectronContainer.h" +#include "xAODEgamma/ElectronAuxContainer.h" +#include "xAODEgamma/versions/Electron_v1.h" #include "xAODEgamma/versions/ElectronContainer_v1.h" #include "xAODEgamma/versions/ElectronAuxContainer_v1.h" #include "xAODEgamma/versions/ElectronAuxContainer_v2.h" #include "xAODEgamma/versions/ElectronAuxContainer_v3.h" +#include "xAODEgamma/Photon.h" #include "xAODEgamma/PhotonContainer.h" +#include "xAODEgamma/PhotonAuxContainer.h" +#include "xAODEgamma/versions/Photon_v1.h" #include "xAODEgamma/versions/PhotonContainer_v1.h" #include "xAODEgamma/versions/PhotonAuxContainer_v1.h" #include "xAODEgamma/versions/PhotonAuxContainer_v2.h" @@ -43,46 +37,24 @@ #include "xAODEgamma/EgammaTruthxAODHelpers.h" #include "xAODEgamma/EgammaEnums.h" #include "xAODEgamma/EgammaDefs.h" -#include "AthContainers/tools/AuxTypeVectorFactory.h" -namespace { -struct GCCXML_DUMMY_INSTANTIATION_XAODEGAMMA { - xAOD::EgammaContainer_v1 eg_c1; - DataLink< xAOD::EgammaContainer_v1 > eg_l1; - ElementLink< xAOD::EgammaContainer_v1 > eg_l2; - std::vector< DataLink< xAOD::EgammaContainer_v1 > > eg_l3; - std::vector< ElementLink< xAOD::EgammaContainer_v1 > > eg_l4; - std::vector< std::vector< ElementLink< xAOD::EgammaContainer_v1 > > > eg_l5; - SG::AuxTypeVectorFactory<ElementLink< xAOD::EgammaContainer_v1 > > eg_l6; - - xAOD::ElectronContainer_v1 el_c1; - DataLink< xAOD::ElectronContainer_v1 > el_l1; - ElementLink< xAOD::ElectronContainer_v1 > el_l2; - std::vector< ElementLink< xAOD::ElectronContainer_v1 > > el_l3; - std::vector< DataLink< xAOD::ElectronContainer_v1 > > el_l4; - std::vector< std::vector< ElementLink< xAOD::ElectronContainer_v1 > > > el_l5; - - xAOD::PhotonContainer_v1 ph_c1; - DataLink< xAOD::PhotonContainer_v1 > ph_l1; - ElementLink< xAOD::PhotonContainer_v1 > ph_l2; - std::vector< ElementLink< xAOD::PhotonContainer_v1 > > ph_l3; - std::vector< DataLink< xAOD::PhotonContainer_v1 > > ph_l4; - std::vector< std::vector< ElementLink < xAOD::PhotonContainer_v1 > > > ph_l5; +// EDM include(s). +#include "xAODCore/tools/DictHelpers.h" - // Instantiate the classes used by xAOD::Electron, xAODPhoton so that - // Reflex would see them with their "correct type". Note that the - // dictionary for these types comes from other places. This instantiation - // is just needed for "Reflex related technical reasons"...OA - ElementLink< xAOD::TrackParticleContainer > auxlink1; - std::vector< ElementLink< xAOD::TrackParticleContainer > > auxlink2; - ElementLink< xAOD::CaloClusterContainer > auxlink3; - std::vector< ElementLink< xAOD::CaloClusterContainer > > auxlink4; - ElementLink< xAOD::VertexContainer > auxlink5; - std::vector< ElementLink< xAOD::VertexContainer > > auxlink6; - - std::set<const xAOD::TrackParticle*> setTP; - -}; +// Instantiate all necessary types for the dictionary. +namespace { + struct GCCXML_DUMMY_INSTANTIATION_XAODEGAMMA { + // Local type(s). + XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, EgammaContainer_v1 ); + XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, ElectronContainer_v1 ); + XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, PhotonContainer_v1 ); + // Type(s) needed for the dictionary generation to succeed. + XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, TrackParticleContainer ); + XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, CaloClusterContainer ); + XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, VertexContainer ); + // Type returned by helper function(s). + std::set< const xAOD::TrackParticle* > setTP; + }; } #endif // XAODEGAMMA_XAODEGAMMADICT_H