Skip to content
Snippets Groups Projects
Commit f0f78a19 authored by Attila Krasznahorkay's avatar Attila Krasznahorkay
Browse files

Updated the xAODEgamma package's dictionary generation.

Made sure that all potentially useful/necessary types are generated
in an organised fashion, using the helper code from xAODCore.

Removed code not necessary with modern ROOT versions.

Declared the typedef names to the generated ROOT dictionary.

Moved the pure STL types to the xAODCoreSTLDict dictionary.
parent 30edff4e
No related branches found
No related tags found
No related merge requests found
# $Id$ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
################################################################################
# Package: xAODEgamma
################################################################################
# Declare the package name: # Declare the package name:
atlas_subdir( xAODEgamma ) atlas_subdir( xAODEgamma )
# Declare the package's dependencies: # External 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 )
find_package( ROOT COMPONENTS Core GenVector ) find_package( ROOT COMPONENTS Core GenVector )
find_package( xAODUtilities )
# Extra dependencies, based on what environment we are in:
if (BUILDVP1LIGHT)
if( BUILDVP1LIGHT_DIST STREQUAL "ubuntu")
set( extra_libs GenVector )
endif()
endif()
# Component(s) in the package: # Component(s) in the package:
atlas_add_library( xAODEgamma atlas_add_library( xAODEgamma
xAODEgamma/*.h xAODEgamma/versions/*.h Root/*.cxx xAODEgamma/*.h xAODEgamma/versions/*.h Root/*.cxx
PUBLIC_HEADERS xAODEgamma PUBLIC_HEADERS xAODEgamma
INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${EIGEN_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthLinks LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks GeoPrimitives
GeoPrimitives EventPrimitives xAODBase xAODCaloEvent xAODCore EventPrimitives xAODBase xAODCaloEvent xAODCore xAODPrimitives xAODTracking
xAODPrimitives xAODTracking xAODTruth ${extra_libs} ) 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 atlas_add_dictionary( xAODEgammaDict
xAODEgamma/xAODEgammaDict.h xAODEgamma/xAODEgammaDict.h
xAODEgamma/selection.xml ${_selectionFile}
LINK_LIBRARIES xAODEgamma LINK_LIBRARIES xAODCore xAODEgamma
EXTRA_FILES Root/dict/*.cxx ) EXTRA_FILES Root/dict/*.cxx )
<!-- $Id: selection.xml 789134 2016-12-11 02:15:53Z christos $ --> <!-- Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -->
<lcgdict> <lcgdict>
<!-- Egamma_v1 dictionaries: --> <!-- xAOD::Egamma interface type(s). -->
<class name="xAOD::Egamma_v1" /> <class name="xAOD::Egamma_v1" />
<class name="xAOD::EgammaContainer_v1"
<class name="xAOD::EgammaContainer_v1" id="CE53CD7A-0B8E-44F5-9AB1-997E87713BC5" />
id="CE53CD7A-0B8E-44F5-9AB1-997E87713BC5" /> <typedef name="xAOD::Egamma" />
<typedef name="xAOD::EgammaContainer" />
<class name="xAOD::EgammaAuxContainer_v1"
id="01A7F3AA-D5CA-4FCF-A314-20F822FF6CA0" /> <!-- xAOD::Egamma auxiliary type(s). -->
<class name="xAOD::EgammaAuxContainer_v1"
<!-- Smart pointers to Egamma_v1: --> id="01A7F3AA-D5CA-4FCF-A314-20F822FF6CA0" />
<class name="DataLink<xAOD::EgammaContainer_v1>" /> <typedef name="xAOD::EgammaAuxContainer" />
<class name="std::vector<DataLink<xAOD::EgammaContainer_v1> >" />
<class name="ElementLink<xAOD::EgammaContainer_v1>" /> <!-- xAOD::Electron interface type(s). -->
<class name="std::vector<ElementLink<xAOD::EgammaContainer_v1> >" /> <class name="xAOD::Electron_v1" />
<class name="std::vector<std::vector<ElementLink<xAOD::EgammaContainer_v1> > >" /> <class name="xAOD::ElectronContainer_v1"
<class name="SG::AuxTypeVectorFactory<ElementLink< xAOD::EgammaContainer_v1 > >"/> id="9CA52CF4-E219-45B8-9971-6DAA89125952" />
<typedef name="xAOD::Electron" />
<!-- Electron_v1 dictionaries: --> <typedef name="xAOD::ElectronContainer" />
<class name="xAOD::Electron_v1" >
</class> <!-- xAOD::Electron auxiliary type(s). -->
<class name="xAOD::ElectronContainer_v1" <class name="xAOD::ElectronAuxContainer_v1"
id="9CA52CF4-E219-45B8-9971-6DAA89125952" /> id="85A46300-3F57-454C-8B7E-94B653AA70CF" />
<class name="xAOD::ElectronAuxContainer_v1" <class name="xAOD::ElectronAuxContainer_v2"
id="85A46300-3F57-454C-8B7E-94B653AA70CF" /> id="7160FC1C-937D-474C-909B-2C0FCE1DD755" />
<class name="xAOD::ElectronAuxContainer_v3"
<!-- Electron_v2 dictionaries: --> id="5435686E-4B00-11E4-AEAA-02163E00A5BB" />
<class name="xAOD::ElectronAuxContainer_v2" <typedef name="xAOD::ElectronAuxContainer" />
id="7160FC1C-937D-474C-909B-2C0FCE1DD755" />
<!-- xAOD::Photon interface type(s). -->
<!-- Electron_v3 dictionaries: --> <class name="xAOD::Photon_v1" />
<class name="xAOD::ElectronAuxContainer_v3" <class name="xAOD::PhotonContainer_v1"
id="5435686E-4B00-11E4-AEAA-02163E00A5BB" /> id="5F045AAE-DBD8-47E4-90AC-9162530A9565" />
<typedef name="xAOD::Photon" />
<!-- Smart pointers to Electron_v1: --> <typedef name="xAOD::PhotonContainer" />
<class name="DataLink<xAOD::ElectronContainer_v1>" />
<class name="std::vector<DataLink<xAOD::ElectronContainer_v1> >" /> <!-- xAOD::Photon auxiliary type(s). -->
<class name="ElementLink<xAOD::ElectronContainer_v1>" /> <class name="xAOD::PhotonAuxContainer_v1"
<class name="std::vector<ElementLink<xAOD::ElectronContainer_v1> >" /> id="67A1818E-4591-4100-B8BD-9A3C9E0D4EBB" />
<class name="std::vector<std::vector<ElementLink<xAOD::ElectronContainer_v1> > >" /> <class name="xAOD::PhotonAuxContainer_v2"
id="CAE4C9A6-B3D0-429B-9A4F-1F174D892CA5" />
<!-- Photon_v1 dictionaries: --> <class name="xAOD::PhotonAuxContainer_v3"
<class name="xAOD::Photon_v1" > id="5C389DEC-4B00-11E4-B9F0-02163E00A5BB" />
</class> <typedef name="xAOD::PhotonAuxContainer" />
<class name="xAOD::PhotonContainer_v1"
id="5F045AAE-DBD8-47E4-90AC-9162530A9565" /> <!-- Objects from the namespace. -->
<class name="xAOD::PhotonAuxContainer_v1" <variable pattern="xAOD::EgammaParameters::*" />
id="67A1818E-4591-4100-B8BD-9A3C9E0D4EBB" /> <class name="xAOD::EgammaParameters::ROOT6_NamespaceAutoloadHook" />
<!-- Photon_v2 dictionaries: --> <!-- Enum(s). -->
<class name="xAOD::PhotonAuxContainer_v2" <enum pattern="xAOD::EgammaParameters::*" />
id="CAE4C9A6-B3D0-429B-9A4F-1F174D892CA5" />
<!-- Helper Function(s). -->
<!-- Photon_v3 dictionaries: --> <function pattern="xAOD::EgammaHelpers::*" />
<class name="xAOD::PhotonAuxContainer_v3"
id="5C389DEC-4B00-11E4-B9F0-02163E00A5BB" /> <!-- Type returned by helper function(s). -->
<class name="std::set<const xAOD::TrackParticle*>" />
<!-- Smart pointers to Photon_v1: --> <!-- Suppress the unwanted classes/symbols. -->
<class name="DataLink<xAOD::PhotonContainer_v1>" /> <exclusion>
<class name="std::vector<DataLink<xAOD::PhotonContainer_v1> >" /> <function pattern="xAOD::EgammaHelpers::getLink*" />
<class name="ElementLink<xAOD::PhotonContainer_v1>" /> </exclusion>
<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>
</lcgdict> </lcgdict>
// Dear emacs, this is -*- c++ -*- // 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 #ifndef XAODEGAMMA_XAODEGAMMADICT_H
#define 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): // Local include(s):
#include "xAODEgamma/Egamma.h"
#include "xAODEgamma/EgammaContainer.h" #include "xAODEgamma/EgammaContainer.h"
#include "xAODEgamma/EgammaAuxContainer.h"
#include "xAODEgamma/versions/Egamma_v1.h"
#include "xAODEgamma/versions/EgammaContainer_v1.h" #include "xAODEgamma/versions/EgammaContainer_v1.h"
#include "xAODEgamma/versions/EgammaAuxContainer_v1.h" #include "xAODEgamma/versions/EgammaAuxContainer_v1.h"
#include "xAODEgamma/Electron.h"
#include "xAODEgamma/ElectronContainer.h" #include "xAODEgamma/ElectronContainer.h"
#include "xAODEgamma/ElectronAuxContainer.h"
#include "xAODEgamma/versions/Electron_v1.h"
#include "xAODEgamma/versions/ElectronContainer_v1.h" #include "xAODEgamma/versions/ElectronContainer_v1.h"
#include "xAODEgamma/versions/ElectronAuxContainer_v1.h" #include "xAODEgamma/versions/ElectronAuxContainer_v1.h"
#include "xAODEgamma/versions/ElectronAuxContainer_v2.h" #include "xAODEgamma/versions/ElectronAuxContainer_v2.h"
#include "xAODEgamma/versions/ElectronAuxContainer_v3.h" #include "xAODEgamma/versions/ElectronAuxContainer_v3.h"
#include "xAODEgamma/Photon.h"
#include "xAODEgamma/PhotonContainer.h" #include "xAODEgamma/PhotonContainer.h"
#include "xAODEgamma/PhotonAuxContainer.h"
#include "xAODEgamma/versions/Photon_v1.h"
#include "xAODEgamma/versions/PhotonContainer_v1.h" #include "xAODEgamma/versions/PhotonContainer_v1.h"
#include "xAODEgamma/versions/PhotonAuxContainer_v1.h" #include "xAODEgamma/versions/PhotonAuxContainer_v1.h"
#include "xAODEgamma/versions/PhotonAuxContainer_v2.h" #include "xAODEgamma/versions/PhotonAuxContainer_v2.h"
...@@ -43,46 +37,24 @@ ...@@ -43,46 +37,24 @@
#include "xAODEgamma/EgammaTruthxAODHelpers.h" #include "xAODEgamma/EgammaTruthxAODHelpers.h"
#include "xAODEgamma/EgammaEnums.h" #include "xAODEgamma/EgammaEnums.h"
#include "xAODEgamma/EgammaDefs.h" #include "xAODEgamma/EgammaDefs.h"
#include "AthContainers/tools/AuxTypeVectorFactory.h"
namespace { // EDM include(s).
struct GCCXML_DUMMY_INSTANTIATION_XAODEGAMMA { #include "xAODCore/tools/DictHelpers.h"
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;
// Instantiate the classes used by xAOD::Electron, xAODPhoton so that // Instantiate all necessary types for the dictionary.
// Reflex would see them with their "correct type". Note that the namespace {
// dictionary for these types comes from other places. This instantiation struct GCCXML_DUMMY_INSTANTIATION_XAODEGAMMA {
// is just needed for "Reflex related technical reasons"...OA // Local type(s).
ElementLink< xAOD::TrackParticleContainer > auxlink1; XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, EgammaContainer_v1 );
std::vector< ElementLink< xAOD::TrackParticleContainer > > auxlink2; XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, ElectronContainer_v1 );
ElementLink< xAOD::CaloClusterContainer > auxlink3; XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, PhotonContainer_v1 );
std::vector< ElementLink< xAOD::CaloClusterContainer > > auxlink4; // Type(s) needed for the dictionary generation to succeed.
ElementLink< xAOD::VertexContainer > auxlink5; XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, TrackParticleContainer );
std::vector< ElementLink< xAOD::VertexContainer > > auxlink6; XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, CaloClusterContainer );
XAOD_INSTANTIATE_NS_CONTAINER_TYPES( xAOD, VertexContainer );
std::set<const xAOD::TrackParticle*> setTP; // Type returned by helper function(s).
std::set< const xAOD::TrackParticle* > setTP;
}; };
} }
#endif // XAODEGAMMA_XAODEGAMMADICT_H #endif // XAODEGAMMA_XAODEGAMMADICT_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment