Commit b61ba3a1 authored by Lukas Alexander Heinrich's avatar Lukas Alexander Heinrich Committed by Graeme Stewart
Browse files

libtag for sercnv pattern (xAOD) (TrigSerializeUtils-00-00-06)

parent f8ae7200
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file ${name}SerCnv.cxx
* @brief Generated implementation file which includes header files needed by ${name}SerCnv
* @author Jiri Masik <Jiri.Masik@cern.ch>
* a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
* $Id: ExampleClassSerCnv.cxx,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
*/
#include "${name}SerCnv.h"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file ${name}SerCnv.h
* @brief Generated header file which defines a typedef for templated converter class
* @author Jiri Masik <Jiri.Masik@cern.ch>
* a copy of poolcnv by RD Schaffer <R.D. Schaffer@cern.ch>
* $Id: ExampleClassSerCnv.h,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
*/
#ifndef ${name}SerCnv_H
#define ${name}SerCnv_H
#include "TrigSerializeCnvSvc/TrigSerializeConverter.h"
#include "${package}/${name}.h"
typedef TrigSerializeConverter<${type}> ${libtag}${name}SerCnv;
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file ExamplePackageSerCnv_entries.cxx
* @brief Declares component instantiation factories for an example converter
* @author Jiri Masik <Jiri.Masik@cern.ch>
* a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
* $Id: ExamplePackageSerCnv_entries.cxx,v 1.2 2008-06-22 11:51:14 masik Exp $
*/
#include "${libtag}${package}SerCnv_entries.h"
DECLARE_FACTORY_ENTRIES(${libtag}${package}SerCnv) {
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file ExamplePackageCnv_entries.h
* @brief Includes header files needed by ExamplePackageCnv_entries.cxx
* @author Jiri Masik <Jiri.Masik@cern.ch>
* a copy of poolcnv by @author RD Schaffer <R.D.Schaffer@cern.ch>
* $Id: ExamplePackageSerCnv_entries.h,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
*/
#include "GaudiKernel/DeclareFactoryEntries.h"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file ExamplePackageSerCnv_entries_element.cxx
* @brief Declares component instantiation factories for a converter
* @author Jiri Masik <Jiri.Masik@cern.ch>
* a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
* $Id: ExamplePackageSerCnv_entries_element.cxx,v 1.1 2008-06-12 23:32:27 masik Exp $
*/
DECLARE_CONVERTER(${name}SerCnv);
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file ExamplePackageCnv_load.cxx
* @brief Loads component instantiation factories for an example SerCnv converter
* @author Jiri Masik <Jiri.Masik@cern.ch>
* a copy of poolcnv by @author RD Schaffer <R.D.Schaffer@cern.ch>
* $Id: ExamplePackageSerCnv_load.cxx,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
*/
#include "GaudiKernel/LoadFactoryEntries.h"
LOAD_FACTORY_ENTRIES(${package}SerCnv)
##
## @file sercnvcnv.mk
##
## @brief This makefile fragment generates C++ code for Trigger
## converters for serialization
##
##
## @author Jiri Masik <Jiri.Masik@cern.ch>
## a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
##
## $Id: sercnv.mk,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
##
../sercnv${libtag}/${CONSTITUENT}SerCnv.stamp :: ../sercnv${libtag}/${libtag}${NAME}SerCnv.h.stamp
@touch ../sercnv${libtag}/${CONSTITUENT}SerCnv.stamp
# Setup a reset stamp to trigger a cleanup each time a new header file
# is added
../sercnv${libtag}/${CONSTITUENT}SerCnvReset.stamp :: $(bin)${libtag}${NAME}SerCnv.stamp $(sercnvcnv_reset_stamp)
@echo "----- RESET sercnv converter generation -----"
@/bin/rm -rf ../sercnv${libtag}
@if test ! -d ../sercnv${libtag} ; then mkdir -p ../sercnv${libtag}; fi
@touch ../sercnv${libtag}/${CONSTITUENT}SerCnvReset.stamp
# Stamp per input .h file - used for reset
$(bin)${libtag}${NAME}SerCnv.stamp :: dirs
@if test ! -f $(bin)${libtag}${NAME}SerCnv.stamp ; then touch $(bin)${libtag}${NAME}SerCnv.stamp; fi
# For each file, add converter and a line in _entries.cxx
../sercnv${libtag}/${libtag}${NAME}SerCnv.h.stamp :: ../sercnv${libtag}/${CONSTITUENT}SerCnvBegin.stamp
@echo "----- Create Sercnv converter for ${NAME} --------"
@echo "----- fullname ${FULLNAME} --------"
@echo "----- constituent ${CONSTITUENT} --------"
@echo "----- types: ${types_with_namespace_${libtag}} --------"
@if test ! -f ${FULLNAME}; then echo "===> ERROR: file ${FULLNAME} does not exist"; \
exit 1; fi
@if test ! -d ../sercnv${libtag} ; then mkdir -p ../sercnv${libtag}; fi
@PKG=`dirname ${FULLNAME}`; PKG=`basename $${PKG}`; \
NAMESPACE="" ; \
if test ! -z "${types_with_namespace_${libtag}}" ; then \
for class_name in ${types_with_namespace_${libtag}} ; do \
TYPE=`echo $${class_name} | sed 's/^[a-zA-Z_0-9]*:://'` ; \
if test $${TYPE} = ${NAME} ; then \
NAMESPACE=`echo $${class_name} | sed 's/::[a-zA-Z_0-9]*$$/::/'` ; \
fi ; \
done ; \
fi ; \
if test ! -z "${mult_chan_types_}" ; then \
for class_name in ${mult_chan_types_} ; do \
TYPE=`echo $${class_name} | sed 's/^[a-zA-Z_0-9]*:://'` ; \
if test $${TYPE} = ${NAME} ; then \
MULTCHANTYPE="true" ; \
fi ; \
done ; \
fi ; \
if test ! -z "$${NAMESPACE}" ; then echo "Using namespace $${NAMESPACE}" ; fi ; \
if test ! -z "$${MULTCHANTYPE}" ; then echo "----- Generating CondMultChanCollection converter for ${NAME} --------" ; fi ; \
if test ! -f ../src/${NAME}SerCnv.cxx ; then \
if test ! -z "$${MULTCHANTYPE}" ; then \
$(cmtexe) expand model "<ExampleMultChanClassSerCnv.h type=$${NAMESPACE}${NAME} name=${libtag}${NAME} package=$${PKG} />" >| ../sercnv${libtag}/${libtag}${NAME}SerCnv.h ; \
else \
$(cmtexe) expand model "<ExampleClassSerCnv.h type=$${NAMESPACE}${NAME} libtag=${libtag} name=${NAME} package=$${PKG} />" >| ../sercnv${libtag}/${libtag}${NAME}SerCnv.h ; \
fi ; \
fi ; \
#$(cmtexe) expand model "<ExampleItemList_joboptions.py item=$${NAMESPACE}${NAME} />" >> ../sercnv${libtag}/${package}ItemList_joboptions.py
@if test ! -f ../src/${libtag}${NAME}SerCnv.cxx ; then $(cmtexe) expand model '<ExampleClassSerCnv.cxx name=${libtag}${NAME} />' >| ../sercnv${libtag}/${libtag}${NAME}SerCnv.cxx ; fi
@$(cmtexe) expand model '<ExamplePackageSerCnv_entries_element.cxx libtag=${libtag} name=${libtag}${NAME} />' >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.cxx
@echo "#include \"${libtag}${NAME}SerCnv.h\"" >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.h
@echo 'DECLARE_CONVERTER_FACTORY(${libtag}${NAME}SerCnv)' >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.h
@echo "----- OK for ${NAME} converter --------"
@touch ../sercnv${libtag}/${libtag}${NAME}SerCnv.h.stamp
##
## @file sercnvcnv_header.mk
##
## @brief This makefile fragment generates C++ code for trigger converters
## for serialization
##
## There are three files: sercnv_header.mk, sercnv_trailer.mk, and
## sercnv.mk. The header does the global initialization, e.g. the
## creation of the first part of files. The sercnv.mk processes each
## file (${NAME}) listed in the document statement in the
## requirements file. The trailer defines the clean target.
##
## @author Jiri Masik <Jiri.Masik@cern.ch>
## a copy of poolcnv @author RD Schaffer <R.D.Schaffer@cern.ch>
##
## $Id: sercnv_header.mk,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
##
#template_dir = ${ATLASPOOLROOT}/cmt/templates
${CONSTITUENT} :: ../sercnv${libtag}/${CONSTITUENT}SerCnvEnd.stamp
#Begin: create dir and first part of required files
../sercnv${libtag}/${CONSTITUENT}SerCnvBegin.stamp :: ../sercnv${libtag}/${CONSTITUENT}SerCnvReset.stamp
@echo "----- BEGIN sercnv converter generation -----"
@if test ! -d ../sercnv${libtag} ; then mkdir -p ../sercnv${libtag}; fi
@$(cmtexe) expand model '<ExamplePackageSerCnv_entries.h/>' >| ../sercnv${libtag}/${libtag}${package}SerCnv_entries.h
@$(cmtexe) expand model '<ExamplePackageSerCnv_entries.cxx libtag=${libtag} package=${package} />' >| ../sercnv${libtag}/${libtag}${package}SerCnv_entries.cxx
@$(cmtexe) expand model '<ExamplePackageSerCnv_load.cxx package=${package} />' >| ../sercnv${libtag}/${libtag}${package}SerCnv_load.cxx
@if test ! -f ../share/${libtag}${package}_joboptions.py ; then \
echo '# Just a dummy joboption - cnvs are auto-loaded' >> ../sercnv${libtag}/${libtag}${package}_joboptions.py ; \
fi ;
@touch ../sercnv${libtag}/${CONSTITUENT}SerCnvBegin.stamp
#End: create final part of required files
../sercnv${libtag}/${CONSTITUENT}SerCnvEnd.stamp :: ../sercnv${libtag}/${CONSTITUENT}SerCnv.stamp
@echo "----- END sercnv converter generation -----"
@echo '}' >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.cxx
@touch ../sercnv${libtag}/${CONSTITUENT}SerCnvEnd.stamp
#=============================================
# begin
# nameSerCnv
# const
# End
#=============================================
#=============================================
# P_SerCnv_entries.h : H F F ...
#
# P_SerCnv_entries.cxx : H F F ... T
#
# P_SerCnv_load.cxx : H
#
# N_SerCnv.h : F
# N_SerCnv.cxx : F
#=============================================
##
## @file poolcnv.mk
##
## @brief This makefile fragment generates C++ code for AthenaPOOL
## converters and POOL IO handlers needed for element links
##
## See complete documentation in poolcnv_header.mk
## @author Jiri Masik <Jiri.Masik@cern.ch>
## a copy of poolcnv by @author RD Schaffer <R.D.Schaffer@cern.ch>
##
## $Id: sercnv_trailer.mk,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
##
${CONSTITUENT}clean ::
/bin/rm -rf ../sercnv${libtag}
package TrigSerializeUtils
author Jiri Masik <Jiri.Masik@cern.ch>
# based on AthenaPoolUtilities from
# author RD Schaffer <R.D.Schaffer@cern.ch>
# author Christian Arnault <arnault@lal.in2p3.fr>
# author Kyle Cranmer <cranmer@cern.ch>
# author Kristo Karr <Kristo.Karr@cern.ch>
use AtlasPolicy AtlasPolicy-*
#use CLIDSvc CLIDSvc-* Control
#use DataModel DataModel-* Control
#apply_tag NEEDS_CORAL_BASE
#-----------------------------------------------------------------------------
#
# Pattern for creating pool converters
#
# apply_pattern sercnv [typesWithNamespace="..."] [multChanTypes="..."] files="..." \
# [extraFilesToCompile="..."]
#
# where:
#
# typesWithNamespace optional list of types, used to specify the namespace.
# For example: "NS1::MyType1 NS1::MyType2 NS2::MyType3"
# Needed for those files where the file name is the
# types w/o namespace.
#
# multChanTypes optional list of types which are CondMultChanCollections
#
# files gives the list of header files with the declarations
# of the data objects, i.e. the ones with the CLASS_DEF
# macro
#
# extraFilesToCompile gives an optional list of extra files to compile into
# the converter library, e.g.
# extraFilesToCompile="-s=../src/myExtraDir *.cxx"
#
# CONVENTION: there must be ONLY ONE class defined in each header file.
#
# > With this pattern,
#
# + directory ../pool/src
# + a library lib<package>SerCnv.so
#
# will be created for the package
#
# > Two constituents <package>SerCnvGen and <package>SerCnv are generated
# by this pattern
#
# > Two macros can also be used to specify additional options for the serCnv
# generator:
#
# $(sercnv_options) global options
# $(<package>_sercnv_options) options specific to this package
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#
# Definitions for the sercnv generator
make_fragment sercnv.mk -header=sercnv_header.mk -trailer=sercnv_trailer.mk -dependencies
make_fragment ExampleClassSerCnv.cxx
make_fragment ExampleClassSerCnv.h
make_fragment ExampleMultChanClassSerCnv.h
make_fragment ExamplePackageSerCnv_load.cxx
make_fragment ExamplePackageSerCnv_entries.cxx
make_fragment ExamplePackageSerCnv_entries.h
make_fragment ExamplePackageSerCnv_entries_element.cxx
#make_fragment SerExampleItemList_joboptions.py
#make_fragment SerExampleItemList_joboptionsHdr.py
pattern sercnv \
private ; \
use TrigSerializeCnvSvc TrigSerializeCnvSvc-00-* Trigger/TrigDataAccess ; \
use GaudiInterface GaudiInterface-* External ; \
document sercnv.mk <package><libtag>SerCnvGen libtag=<libtag> <files> ; \
library <package><libtag>SerCnv "*.cxx -s=../sercnv<libtag> *.cxx <extraFilesToCompile> " ; \
apply_pattern optdebug_library name=<package><libtag>SerCnv ; \
macro types_with_namespace_<libtag> " <typesWithNamespace> " ; \
macro mult_chan_types_ " <multChanTypes> " ; \
macro sercnv_include_extras " ../src" ; \
include_dirs " $(sercnv_include_extras) " ; \
macro_append <package><libtag>SerCnv_dependencies " <package><libtag>SerCnvGen " ; \
macro_append <package><libtag>SerCnvGen_dependencies " <package> <package>Dict " ; \
macro sercnv_reset_stamp " $(bin)<package>setup.make " ; \
macro <package><libtag>SerCnv_shlibflags "$(componentshr_linkopts) -L$(bin) $(use_linkopts) $(use_dict_linkopts) " ; \
macro dummy_for_library "<library>" ; \
macro_append <package>_named_libraries " <package><libtag>SerCnv " ; \
apply_pattern generate_rootmap library=<package><libtag>SerCnv group=<group> ; \
macro_append <package>_joboptions ' -s=../sercnv<libtag> *.py ' ; \
macro_append install_pool_joboptions_dependencies " <package><libtag>SerCnv" ; \
document data_installer install_pool_joboptions prefix=jobOptions "-s=../sercnv<libtag> *.py"
#-----------------------------------------------------------------------------
#
# Pattern for creating IO handers for element links
#
# apply_pattern pooliohandler [typesWithNamespace=""] [typesWithDataLinkOnly="..."] handlerFiles="..."
#
# where:
#
# typesWithNamespace optional list of types, used to specify the namespace.
# For example: "NS1::MyType1 NS1::MyType2 NS2::MyType3"
# Needed for those files where the file name is the
# types w/o namespace.
#
# handlerFiles gives the list of header files with the declarations
# of the data objects, i.e. the ones with the CLASS_DEF
# macro
#
# typesWithDataLinkOnly optional list of types for which only
# DataLinks should be created.
# Note, ElementLink and ElementLinkVector
# require the class to be a subclass of DataVector,
# but DataLink does not.
#
# CONVENTION: there must be ONLY ONE class defined in each header file.
#
# > With this pattern,
#
# + directory ../pool_plugins
# + a library lib<package>PoolIOHandler.so
#
# will be created for the package
#
# > Two constituents <package>PoolIOHandlerGen and <package>IOHandlers are generated
# by this pattern
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#
# Definitions for the pool io handler generator
# make_fragment pooliohandler.mk -header=pooliohandler_header.mk -dependencies
# make_fragment SerExampleClassIOHandler.h
# make_fragment SerExampleClassElementLinkIOHandler.cxx
# make_fragment SerExampleClassDataLinkIOHandler.cxx
# make_fragment SerExampleClassIOHandlerHdr.cxx
# pattern pooliohandler \
# private ; \
# use AthenaPoolCnvSvc AthenaPoolCnvSvc-00-* Database/AthenaPOOL ; \
# use GaudiInterface GaudiInterface-* External ; \
# use DataModel DataModel-00-* Control ; \
# use AtlasPOOL AtlasPOOL-00-* External ; \
# use AtlasReflex AtlasReflex-00-* External ; \
# use AtlasSEAL AtlasSEAL-00-* External ; \
# document pooliohandler.mk <package>PoolIOHandlerGen <handlerFiles> ; \
# macro_append types_with_namespace " <typesWithNamespace> " ; \
# macro_append types_with_datalink_only " <typesWithDataLinkOnly> " ; \
# apply_pattern module_generic_library name=<package>IOHandlers files= "../pool_plugins/*.cxx" ; \
# macro_append <package>IOHandlers_dependencies " <package>PoolIOHandlerGen " ; \
# macro poolhdlr_reset_stamp " $(bin)<package>setup.make " ; \
# end_private
private
#use AthenaKernel AthenaKernel-* Control
#use AtlasReflex AtlasReflex-* External
use TestPolicy TestPolicy-*
#apply_pattern installed_library
#apply_pattern component_library
#library AthenaPoolUtilities SeekableCollection.cxx SeekableCollectionIterator.cxx
apply_pattern install_runtime method=-symlink
#apply_pattern declare_runtime files="*.sql"
#apply_pattern lcg_module_register module=TrigSerializeUtils
# The following use is to get the lcgdict pattern.
# This is "hidden" behind "private" and "no_auto_imports" to keep
# clients of IOVDbTestConditions from seeing excess dependencies
private
use AtlasReflex AtlasReflex-* External -no_auto_imports
# Pattern to build the dict lib. User should create a single header
# file: <package>Dict.h which includes all other .h files. See EventInfoDict
#apply_tag no_extra_dict_deps
#apply_pattern lcgdict dict=AthenaPoolUtilities selectionfile=selection.xml headerfiles="../AthenaPoolUtilities/AthenaPoolUtilitiesDict.h"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment