Commit 9440068f authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (GeneratorObjectsTPCnv-00-06-10)

      * src/McEventCollectionCnv_p4.cxx, src/McEventCollectionCnv_p5.cxx : moved HepMCWeightSvc to new package
      * Tagging as  GeneratorObjectsTPCnv-00-06-10

2015-07-14  John Chapman  <John.Chapman@cern.ch>

	* src/McEventCollectionCnv_p4.cxx,
	GeneratorObjectsTPCnv/McEventCollectionCnv_p4.h - Using
	HepMCWeightSvc to store weight names in metadata, as this version
	is still used in a few places. AGENE-984
	* Tagging as GeneratorObjectsTPCnv-00-06-09

2015-06-25 Will Buttinger <will@cern.ch>

	* src/McEventCollectionCnv_p5.cxx,
	GeneratorObjectsTPCnv/McEventCollectionCnv_p5.h - Using
	HepMCWeightSvc to store weight names in metadata. AGENE-984
	* Tagging as GeneratorObjectsTPCnv-00-06-08

2015-06-17  John Chapman  <John.Chapman@cern.ch>

...
(Long ChangeLog diff - truncated)
parent d8bb33c7
################################################################################
# Package: GeneratorObjectsTPCnv
################################################################################
# Declare the package name:
atlas_subdir( GeneratorObjectsTPCnv )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/SGTools
Database/AthenaPOOL/AthenaPoolCnvSvc
GaudiKernel
Generators/GeneratorObjects
PRIVATE
Control/AthAllocators
Control/AthenaKernel
Generators/HepMCWeightSvc )
# External dependencies:
find_package( HepMC )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
# Component(s) in the package:
atlas_add_tpcnv_library( GeneratorObjectsTPCnv
src/*.cxx
PUBLIC_HEADERS GeneratorObjectsTPCnv
INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} SGTools AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel )
atlas_add_dictionary( GeneratorObjectsTPCnvDict
GeneratorObjectsTPCnv/GeneratorObjectsTPCnvDict.h
GeneratorObjectsTPCnv/selection.xml
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} SGTools AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GeneratorObjectsTPCnv )
atlas_add_dictionary( OLD_GeneratorObjectsTPCnvDict
GeneratorObjectsTPCnv/GeneratorObjectsTPCnvDict.h
GeneratorObjectsTPCnv/OLD_selection.xml
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} SGTools AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GeneratorObjectsTPCnv )
......@@ -4,12 +4,12 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// McEventCollectionCnv_p1.h
// McEventCollectionCnv_p1.h
// Header file for class McEventCollectionCnv_p1
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P1_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P1_H
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P1_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P1_H
// STL includes
......@@ -31,22 +31,20 @@
// Forward declaration
class MsgStream;
namespace HepMC { struct DataPool; }
class McEventCollectionCnv_p1 : public T_AthenaPoolTPCnvBase<
McEventCollection,
McEventCollection_p1
>
{
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p1> Base_t;
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Default constructor:
McEventCollection,
McEventCollection_p1
>
{
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p1> Base_t;
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Default constructor:
*/
McEventCollectionCnv_p1();
......@@ -62,36 +60,27 @@ class McEventCollectionCnv_p1 : public T_AthenaPoolTPCnvBase<
*/
virtual ~McEventCollectionCnv_p1();
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
/** Method creating the transient representation of @c McEventCollection
* from its persistent representation @c McEventCollection_p1
*/
virtual void persToTrans( const McEventCollection_p1* persObj,
McEventCollection* transObj,
MsgStream& msg ) ;
virtual void persToTrans( const McEventCollection_p1* persObj,
McEventCollection* transObj,
MsgStream& msg ) ;
/** Method creating the persistent representation @c McEventCollection_p1
* from its transient representation @c McEventCollection
*/
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p1* persObj,
MsgStream& msg ) ;
///////////////////////////////////////////////////////////////////
// Protected data:
///////////////////////////////////////////////////////////////////
protected:
/// a PIMPL idiom to hide the DataPools (and their specialized destructors)
/// from the outside world
HepMC::DataPool* m_pool;
};
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p1* persObj,
MsgStream& msg ) ;
};
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P1_H
......@@ -4,12 +4,12 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// McEventCollectionCnv_p2.h
// McEventCollectionCnv_p2.h
// Header file for class McEventCollectionCnv_p2
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
// STL includes
......@@ -34,24 +34,23 @@
// Forward declaration
class MsgStream;
class StoreGateSvc;
namespace HepMC { struct DataPool; }
class McEventCollectionCnv_p2 : public T_AthenaPoolTPCnvBase<
McEventCollection,
McEventCollection_p2
>
{
McEventCollection,
McEventCollection_p2
>
{
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p2> Base_t;
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p2> Base_t;
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Default constructor:
/** Default constructor:
*/
McEventCollectionCnv_p2();
......@@ -67,67 +66,60 @@ class McEventCollectionCnv_p2 : public T_AthenaPoolTPCnvBase<
*/
virtual ~McEventCollectionCnv_p2();
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
/** Method creating the transient representation of @c McEventCollection
* from its persistent representation @c McEventCollection_p2
*/
virtual void persToTrans( const McEventCollection_p2* persObj,
McEventCollection* transObj,
MsgStream &log ) ;
virtual void persToTrans( const McEventCollection_p2* persObj,
McEventCollection* transObj,
MsgStream &log ) ;
/** Method creating the persistent representation @c McEventCollection_p2
* from its transient representation @c McEventCollection
*/
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p2* persObj,
MsgStream &log ) ;
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p2* persObj,
MsgStream &log ) ;
///////////////////////////////////////////////////////////////////
// Protected method:
///////////////////////////////////////////////////////////////////
protected:
///////////////////////////////////////////////////////////////////
// Protected method:
///////////////////////////////////////////////////////////////////
protected:
typedef SG::unordered_map<HepMC::GenParticle*,int> ParticlesMap_t;
/** @brief Create a transient @c GenVertex from a persistent one (version 1)
* It returns the new @c GenVertex.
* It returns the new @c GenVertex.
* This method calls @c createGenParticle for each of the out-going
* particles and only for the in-going particle which are orphans (no
* production vertex): for optimisation purposes.
* Note that the map being passed as an argument is to hold the association
* Note that the map being passed as an argument is to hold the association
* of barcodes to particle so that we can reconnect all the (non-orphan)
* particles to their decay vertex (if any).
*/
HepMC::GenVertex*
HepMC::GenVertex*
createGenVertex( const McEventCollection_p2& persEvts,
const GenVertex_p2& vtx,
ParticlesMap_t& bcToPart ) const;
const GenVertex_p2& vtx,
ParticlesMap_t& bcToPart,
HepMC::DataPool* datapools ) const;
/** @brief Create a transient @c GenParticle from a persistent one (vers.1)
* It returns the new @c GenParticle. Note that the map being passed as an
* argument is to hold the association of barcodes to particle so that
* we can reconnect all the particles to their decay vertex (if any).
*/
HepMC::GenParticle*
HepMC::GenParticle*
createGenParticle( const GenParticle_p2& p,
ParticlesMap_t& partToEndVtx ) const;
///////////////////////////////////////////////////////////////////
// Protected data:
///////////////////////////////////////////////////////////////////
protected:
ParticlesMap_t& partToEndVtx,
HepMC::DataPool* datapools ) const;
/// a PIMPL idiom to hide the DataPools (and their specialized destructors)
/// from the outside world
HepMC::DataPool* m_pool;
};
};
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P2_H
......@@ -4,12 +4,12 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// McEventCollectionCnv_p3.h
// McEventCollectionCnv_p3.h
// Header file for class McEventCollectionCnv_p3
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
// STL includes
......@@ -34,24 +34,23 @@
// Forward declaration
class MsgStream;
class StoreGateSvc;
namespace HepMC { struct DataPool; }
class McEventCollectionCnv_p3 : public T_AthenaPoolTPCnvBase<
McEventCollection,
McEventCollection_p3
>
{
McEventCollection,
McEventCollection_p3
>
{
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p3> Base_t;
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p3> Base_t;
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Default constructor:
/** Default constructor:
*/
McEventCollectionCnv_p3();
......@@ -67,67 +66,60 @@ class McEventCollectionCnv_p3 : public T_AthenaPoolTPCnvBase<
*/
virtual ~McEventCollectionCnv_p3();
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
/** Method creating the transient representation of @c McEventCollection
* from its persistent representation @c McEventCollection_p3
*/
virtual void persToTrans( const McEventCollection_p3* persObj,
McEventCollection* transObj,
MsgStream &log ) ;
virtual void persToTrans( const McEventCollection_p3* persObj,
McEventCollection* transObj,
MsgStream &log ) ;
/** Method creating the persistent representation @c McEventCollection_p3
* from its transient representation @c McEventCollection
*/
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p3* persObj,
MsgStream &log ) ;
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p3* persObj,
MsgStream &log ) ;
///////////////////////////////////////////////////////////////////
// Protected method:
///////////////////////////////////////////////////////////////////
protected:
///////////////////////////////////////////////////////////////////
// Protected method:
///////////////////////////////////////////////////////////////////
protected:
typedef SG::unordered_map<HepMC::GenParticle*,int> ParticlesMap_t;
/** @brief Create a transient @c GenVertex from a persistent one (version 1)
* It returns the new @c GenVertex.
* It returns the new @c GenVertex.
* This method calls @c createGenParticle for each of the out-going
* particles and only for the in-going particle which are orphans (no
* production vertex): for optimisation purposes.
* Note that the map being passed as an argument is to hold the association
* Note that the map being passed as an argument is to hold the association
* of barcodes to particle so that we can reconnect all the (non-orphan)
* particles to their decay vertex (if any).
*/
HepMC::GenVertex*
HepMC::GenVertex*
createGenVertex( const McEventCollection_p3& persEvts,
const GenVertex_p3& vtx,
ParticlesMap_t& bcToPart ) const;
const GenVertex_p3& vtx,
ParticlesMap_t& bcToPart,
HepMC::DataPool* datapools ) const;
/** @brief Create a transient @c GenParticle from a persistent one (vers.1)
* It returns the new @c GenParticle. Note that the map being passed as an
* argument is to hold the association of barcodes to particle so that
* we can reconnect all the particles to their decay vertex (if any).
*/
HepMC::GenParticle*
HepMC::GenParticle*
createGenParticle( const GenParticle_p3& p,
ParticlesMap_t& partToEndVtx ) const;
///////////////////////////////////////////////////////////////////
// Protected data:
///////////////////////////////////////////////////////////////////
protected:
ParticlesMap_t& partToEndVtx,
HepMC::DataPool* datapools ) const;
/// a PIMPL idiom to hide the DataPools (and their specialized destructors)
/// from the outside world
HepMC::DataPool* m_pool;
};
};
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P3_H
......@@ -4,12 +4,12 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// McEventCollectionCnv_p4.h
// McEventCollectionCnv_p4.h
// Header file for class McEventCollectionCnv_p4
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
///////////////////////////////////////////////////////////////////
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
// STL includes
......@@ -32,26 +32,28 @@
// GeneratorObjectsTPCnv includes
#include "GeneratorObjectsTPCnv/McEventCollection_p4.h"
#include "GaudiKernel/ServiceHandle.h"
// Forward declaration
class IHepMCWeightSvc;
class MsgStream;
class StoreGateSvc;
namespace HepMC { struct DataPool; }
class McEventCollectionCnv_p4 : public T_AthenaPoolTPCnvBase<
McEventCollection,
McEventCollection_p4
>
{
McEventCollection,
McEventCollection_p4
>
{
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p4> Base_t;
typedef T_AthenaPoolTPCnvBase<McEventCollection,
McEventCollection_p4> Base_t;
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Default constructor:
/** Default constructor:
*/
McEventCollectionCnv_p4();
......@@ -69,83 +71,82 @@ class McEventCollectionCnv_p4 : public T_AthenaPoolTPCnvBase<
void setPileup();
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
/** Method creating the transient representation of @c McEventCollection
* from its persistent representation @c McEventCollection_p4
*/
virtual void persToTrans( const McEventCollection_p4* persObj,
McEventCollection* transObj,
MsgStream &log ) ;
virtual void persToTrans( const McEventCollection_p4* persObj,
McEventCollection* transObj,
MsgStream &log ) ;
/** Method creating the persistent representation @c McEventCollection_p4
* from its transient representation @c McEventCollection
*/
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p4* persObj,
MsgStream &log ) ;
virtual void transToPers( const McEventCollection* transObj,
McEventCollection_p4* persObj,
MsgStream &log ) ;
///////////////////////////////////////////////////////////////////
// Protected method:
///////////////////////////////////////////////////////////////////
protected:
///////////////////////////////////////////////////////////////////
// Protected method:
///////////////////////////////////////////////////////////////////
protected:
typedef SG::unordered_map<HepMC::GenParticle*,int> ParticlesMap_t;
/** @brief Create a transient @c GenVertex from a persistent one (version 1)
* It returns the new @c GenVertex.
* It returns the new @c GenVertex.
* This method calls @c createGenParticle for each of the out-going
* particles and only for the in-going particle which are orphans (no
* production vertex): for optimisation purposes.
* Note that the map being passed as an argument is to hold the association
* Note that the map being passed as an argument is to hold the association
* of barcodes to particle so that we can reconnect all the (non-orphan)
* particles to their decay vertex (if any).
*/
HepMC::GenVertex*
HepMC::GenVertex*
createGenVertex( const McEventCollection_p4& persEvts,
const GenVertex_p4& vtx,
ParticlesMap_t& bcToPart ) const;
const GenVertex_p4& vtx,
ParticlesMap_t& bcToPart,
HepMC::DataPool* datapools ) const;
/** @brief Create a transient @c GenParticle from a persistent one (vers.1)
* It returns the new @c GenParticle. Note that the map being passed as an
* argument is to hold the association of barcodes to particle so that
* we can reconnect all the particles to their decay vertex (if any).
*/
HepMC::GenParticle*
HepMC::GenParticle*
createGenParticle( const GenParticle_p4& p,
ParticlesMap_t& partToEndVtx ) const;
ParticlesMap_t& partToEndVtx,
HepMC::DataPool* datapools ) const;
/** @brief Method to write a persistent @c GenVertex object. The persistent
* vertex is added to the persistent is added to the persistent
* vertex is added to the persistent is added to the persistent
* @c GenEvent.
*/
void writeGenVertex( const HepMC::GenVertex& vtx,
McEventCollection_p4& persEvt ) const;
McEventCollection_p4& persEvt ) const;
/** @brief Method to write a persistent @c GenParticle object
* It returns the index of the persistent @c GenParticle into the
* collection of persistent of @c GenParticles from the
* collection of persistent of @c GenParticles from the
* persistent @c GenEvent
*/
int writeGenParticle( const HepMC::GenParticle& p,
McEventCollection_p4& persEvt ) const;
McEventCollection_p4& persEvt ) const;
///////////////////////////////////////////////////////////////////
// Protected data:
///////////////////////////////////////////////////////////////////
protected:
///////////////////////////////////////////////////////////////////