diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHitCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHitCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..072e385e7f78085256eee7dead09f0d8bd1f0e2d --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHitCnv_p1.h @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDC_SIMPIXELHITCNV_P1_H +#define ZDC_SIMPIXELHITCNV_P1_H + +#include "ZDC_SimEvent/ZDC_SimPixelHit.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_p1.h" + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +class MsgStream; + +class ZDC_SimPixelHitCnv_p1: public T_AthenaPoolTPCnvBase<ZDC_SimPixelHit, ZDC_SimPixelHit_p1> { + + public: + + ZDC_SimPixelHitCnv_p1() {} + + virtual void persToTrans(const ZDC_SimPixelHit_p1* persObj, ZDC_SimPixelHit* transObj, MsgStream& log); + virtual void transToPers(const ZDC_SimPixelHit* transObj, ZDC_SimPixelHit_p1* persObj, MsgStream& log); + + +}; + + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_CollectionCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_CollectionCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..29d5581a8ca53ca3e3dc389479d14b32921c9b18 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_CollectionCnv_p1.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDC_SimPixelHit_CollectionCnv_p1_H +#define ZDC_SimPixelHit_CollectionCnv_p1_H + +#include <vector> + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "ZDC_SimEvent/ZDC_SimPixelHit_Collection.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_p1.h" + +#define private public +#include "ZdcEventTPCnv/ZDC_SimPixelHit_Collection_p1.h" +#undef private + +class MsgStream; + +class ZDC_SimPixelHit_CollectionCnv_p1: public T_AthenaPoolTPCnvBase<ZDC_SimPixelHit_Collection, ZDC_SimPixelHit_Collection_p1> { + +public: + + ZDC_SimPixelHit_CollectionCnv_p1() {} + + virtual void persToTrans(const ZDC_SimPixelHit_Collection_p1* persObj, ZDC_SimPixelHit_Collection* transObj, MsgStream& log); + virtual void transToPers(const ZDC_SimPixelHit_Collection* transObj, ZDC_SimPixelHit_Collection_p1* persObj, MsgStream& log); +}; + + +template<> +class T_TPCnv<ZDC_SimPixelHit_Collection, ZDC_SimPixelHit_Collection_p1> + : public ZDC_SimPixelHit_CollectionCnv_p1 +{ +public: +}; + + + +/* +// First attempt +typedef T_AtlasHitsVectorCnv< ZDC_SimPixelHit_Collection, ZDC_SimPixelHit_Collection_p1, ZDC_SimPixelHit_p1 > ZDC_SimPixelHit_CollectionCnv_p1; +*/ + +#endif + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_Collection_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_Collection_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..b67b8956c3eccd12e54c6b17b277ab3889d3a0bc --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_Collection_p1.h @@ -0,0 +1,30 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZDC_SimPixelHit_Collection_p1.h +// Persistent represenation of a ZDC_SimPixelHit_Collection +/////////////////////////////////////////////////////////////////// +#ifndef ZDC_SIMPIXELHIT_COLLECTION_P1_H +#define ZDC_SIMPIXELHIT_COLLECTION_P1_H + +#include "ZdcEventTPCnv/ZDC_SimPixelHit_p1.h" +#include <vector> + +class ZDC_SimPixelHit_Collection_p1 : public std::vector<ZDC_SimPixelHit_p1> +{ +public: + /// typedefs + typedef std::vector<ZDC_SimPixelHit_p1> PixelHitVector; + typedef PixelHitVector::const_iterator const_iterator; + typedef PixelHitVector::iterator iterator; + + /// Default constructor + ZDC_SimPixelHit_Collection_p1 () {} + +private: +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..9cca1eb5bdedfbfe80a6f44e7c217c3b842af82f --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimPixelHit_p1.h @@ -0,0 +1,31 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDC_SIMPIXELHIT_P1_H +#define ZDC_SIMPIXELHIT_P1_H + +class ZDC_SimPixelHit_p1 { + + public: + + ZDC_SimPixelHit_p1() { + Side=0; + ModNo=0; + PixNo=0; + Nphotons=0; + Edep=0; + }; + + friend class ZDC_SimPixelHitCnv_p1; + + private: + + int Side; + int ModNo; + int PixNo; + int Nphotons; + float Edep; +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHitCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHitCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..b27ddbced517db6a0da917589f2f19645eb3869d --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHitCnv_p1.h @@ -0,0 +1,28 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDC_SIMSTRIPHITCNV_P1_H +#define ZDC_SIMSTRIPHITCNV_P1_H + +#include "ZDC_SimEvent/ZDC_SimStripHit.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_p1.h" + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +class MsgStream; + +class ZDC_SimStripHitCnv_p1: public T_AthenaPoolTPCnvBase<ZDC_SimStripHit, ZDC_SimStripHit_p1> { + + public: + + ZDC_SimStripHitCnv_p1() {} + + virtual void persToTrans(const ZDC_SimStripHit_p1* persObj, ZDC_SimStripHit* transObj, MsgStream& log); + virtual void transToPers(const ZDC_SimStripHit* transObj, ZDC_SimStripHit_p1* persObj, MsgStream& log); + + +}; + + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_CollectionCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_CollectionCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..c58a326c4348899667955683cc57bc8f64bb9d20 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_CollectionCnv_p1.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDC_SimStripHit_CollectionCnv_p1_H +#define ZDC_SimStripHit_CollectionCnv_p1_H + +#include <vector> + +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "ZDC_SimEvent/ZDC_SimStripHit_Collection.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_p1.h" + +#define private public +#include "ZdcEventTPCnv/ZDC_SimStripHit_Collection_p1.h" +#undef private + +class MsgStream; + +class ZDC_SimStripHit_CollectionCnv_p1: public T_AthenaPoolTPCnvBase<ZDC_SimStripHit_Collection, ZDC_SimStripHit_Collection_p1> { + +public: + + ZDC_SimStripHit_CollectionCnv_p1() {} + + virtual void persToTrans(const ZDC_SimStripHit_Collection_p1* persObj, ZDC_SimStripHit_Collection* transObj, MsgStream& log); + virtual void transToPers(const ZDC_SimStripHit_Collection* transObj, ZDC_SimStripHit_Collection_p1* persObj, MsgStream& log); +}; + + +template<> +class T_TPCnv<ZDC_SimStripHit_Collection, ZDC_SimStripHit_Collection_p1> + : public ZDC_SimStripHit_CollectionCnv_p1 +{ +public: +}; + + + + + +/* +// First attempt +typedef T_AtlasHitsVectorCnv< ZDC_SimStripHit_Collection, ZDC_SimStripHit_Collection_p1, ZDC_SimStripHit_p1 > ZDC_SimStripHit_CollectionCnv_p1; +*/ + +#endif + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_Collection_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_Collection_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..01212ef828a3487ace758c2a5717ebd24a673ccf --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_Collection_p1.h @@ -0,0 +1,30 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZDC_SimStripHit_Collection_p1.h +// Persistent represenation of a ZDC_SimStripHit_Collection +/////////////////////////////////////////////////////////////////// +#ifndef ZDC_SIMSTRIPHIT_COLLECTION_P1_H +#define ZDC_SIMSTRIPHIT_COLLECTION_P1_H + +#include "ZdcEventTPCnv/ZDC_SimStripHit_p1.h" +#include <vector> + +class ZDC_SimStripHit_Collection_p1 : public std::vector<ZDC_SimStripHit_p1> +{ +public: + /// typedefs + typedef std::vector<ZDC_SimStripHit_p1> StripHitVector; + typedef StripHitVector::const_iterator const_iterator; + typedef StripHitVector::iterator iterator; + + /// Default constructor + ZDC_SimStripHit_Collection_p1 () {} + +private: +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..43a6d36cea46cb0faab6cb8deb39dfe245543eef --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZDC_SimStripHit_p1.h @@ -0,0 +1,29 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDC_SIMSTRIPHIT_P1_H +#define ZDC_SIMSTRIPHIT_P1_H + +class ZDC_SimStripHit_p1 { + + public: + + ZDC_SimStripHit_p1() { + Side=0; + ModNo=0; + Nphotons=0; + Edep=0; + }; + + friend class ZDC_SimStripHitCnv_p1; + + private: + + int Side; + int ModNo; + int Nphotons; + float Edep; +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..c113cbbfc2ad1837070fbd2fbe1647b5d50866c4 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCnv_p1.h @@ -0,0 +1,46 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcDigitsCnv_p1.h +// Transient/Persistent converter for ZdcDigits class +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCTPCNV_ZDCDIGITSCNV_P1_H +#define ZDCTPCNV_ZDCDIGITSCNV_P1_H + +// AthenaPoolCnvSvc includes +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +// ZdcEventTPCnv includes +#include "ZdcEventTPCnv/ZdcDigits_p1.h" + +// ZdcEvent includes +#include "ZdcEvent/ZdcDigits.h" + +class MsgStream; + +class ZdcDigitsCnv_p1 : public T_AthenaPoolTPCnvBase<ZdcDigits, ZdcDigits_p1> { + +public: + + /** Default constructor: + */ + ZdcDigitsCnv_p1() {} + + /** Method creating the transient representation ZdcDigits + * from its persistent representation ZdcDigits_p1 + */ + virtual void persToTrans(const ZdcDigits_p1* persObj, ZdcDigits* transObj, MsgStream &log); + + /** Method creating the persistent representation ZdcDigits_p1 + * from its transient representation ZdcDigits + */ + virtual void transToPers(const ZdcDigits* transObj, ZdcDigits_p1* persObj, MsgStream &log); + +}; + +#endif //> ZDCTPCNV_ZDCDIGITSCNV_P1_H diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCollectionCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCollectionCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..9845a18ab76464edd223a28a6c9468725e3bee34 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCollectionCnv_p1.h @@ -0,0 +1,46 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcDigitsCollectionCnv_p1.h +// Header file for class ZdcDigitsCollectionCnv_p1 +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCTPCNV_ZDCDIGITSCOLLECTIONCNV_P1_H +#define ZDCTPCNV_ZDCDIGITSCOLLECTIONCNV_P1_H + +// ZdcEventTPCnv includes +#define private public +#include "ZdcEventTPCnv/ZdcDigitsCollection_p1.h" +#undef private +#include "ZdcEventTPCnv/ZdcDigitsCnv_p1.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +// Zdc includes +#include "ZdcEvent/ZdcDigitsCollection.h" + +class MsgStream; + +class ZdcDigitsCollectionCnv_p1: public T_AthenaPoolTPCnvBase<ZdcDigitsCollection, ZdcDigitsCollection_p1> { + +public: + + ZdcDigitsCollectionCnv_p1() {} + + virtual void persToTrans(const ZdcDigitsCollection_p1* persObj, ZdcDigitsCollection* transObj, MsgStream& log); + virtual void transToPers(const ZdcDigitsCollection* transObj, ZdcDigitsCollection_p1* persObj, MsgStream& log); +}; + + +template<> +class T_TPCnv<ZdcDigitsCollection, ZdcDigitsCollection_p1> + : public ZdcDigitsCollectionCnv_p1 +{ +public: +}; + +#endif //> ZDCTPCNV_ZDCDIGITSCOLLECTIONCNV_P1_H + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCollection_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCollection_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..108a0e200a60ec81364aabb67eee77dfd2157b7f --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigitsCollection_p1.h @@ -0,0 +1,33 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcDigitsCollection_p1.h +// Persistent represenation of a ZdcDigitsCollection +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCDIGITSCOLLECTION_P1_H +#define ZDCDIGITSCOLLECTION_P1_H + +#include "ZdcEventTPCnv/ZdcDigits_p1.h" +#include <vector> + +class ZdcDigitsCollection_p1 : public std::vector<ZdcDigits_p1> +{ +public: + /// typedefs + typedef std::vector<ZdcDigits_p1> ElemVector; + typedef ElemVector::const_iterator const_iterator; + typedef ElemVector::iterator iterator; + + /// Default constructor + ZdcDigitsCollection_p1 () {} + + +private: +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigits_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigits_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..046563598abc8832d36aecb577d4e5069ee830c4 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcDigits_p1.h @@ -0,0 +1,42 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcDigits_p1.h +// Header file for class ZdcDigits_p1 +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCTPCNV_ZDCDIGITS_P1_H +#define ZDCTPCNV_ZDCDIGITS_P1_H + +#include <vector> + +// forward declarations +class ZdcDigitsCnv_p1; + +class ZdcDigits_p1 { + + // Make the AthenaPoolCnv class our friend + friend class ZdcDigitsCnv_p1; + +public: + + /** Default constructor: + */ + ZdcDigits_p1() {m_id=0;} + +private: + + unsigned int m_id; + std::vector<int> m_digits_gain0_delay0; + std::vector<int> m_digits_gain0_delay1; + std::vector<int> m_digits_gain1_delay0; + std::vector<int> m_digits_gain1_delay1; + +}; + +#endif //> ZDCTPCNV_ZDCDIGITS_P1_H + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcEventTPCnvDict.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcEventTPCnvDict.h new file mode 100644 index 0000000000000000000000000000000000000000..942327dc2443c3c244ca9809ceb8798cd64959c4 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcEventTPCnvDict.h @@ -0,0 +1,43 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDCTPCNV_ZDCTPCNVDICT_H +#define ZDCTPCNV_ZDCTPCNVDICT_H + +#include "ZdcEventTPCnv/ZdcDigits_p1.h" +#include "ZdcEventTPCnv/ZdcDigitsCnv_p1.h" +#include "ZdcEventTPCnv/ZdcDigitsCollection_p1.h" +#include "ZdcEventTPCnv/ZdcDigitsCollectionCnv_p1.h" +#include "ZdcEventTPCnv/ZdcRawChannel_p1.h" +#include "ZdcEventTPCnv/ZdcRawChannelCnv_p1.h" +#include "ZdcEventTPCnv/ZdcRawChannelCollection_p1.h" +#include "ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_p1.h" +#include "ZdcEventTPCnv/ZDC_SimStripHitCnv_p1.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_Collection_p1.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_CollectionCnv_p1.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_p1.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHitCnv_p1.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_Collection_p1.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_CollectionCnv_p1.h" + +/* +namespace ZDC_EventTPCnv_Dict { + std::vector<ZDC_SimStripHit_p1> zdc0; + std::vector<ZDC_SimPixelHit_p1> zdc1; + std::vector<ZdcDigits_p1> zdc2; + std::vector<ZdcRawChannel_p1> zdc3; + +} +*/ + + +struct dummy { + T_TPCnv<ZdcDigitsCollection, ZdcDigitsCollection_p1> m_zdcDigitsCnv; + T_TPCnv<ZdcRawChannelCollection, ZdcRawChannelCollection_p1> m_zdcRawChannelCnv; + T_TPCnv<ZDC_SimStripHit_Collection, ZDC_SimStripHit_Collection_p1> m_zdc_SimStripHitCnv; + T_TPCnv<ZDC_SimPixelHit_Collection, ZDC_SimPixelHit_Collection_p1> m_zdc_SimPixelHitCnv; +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..7a3e445ded68877f19e37d7723dda3145a5f73fe --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCnv_p1.h @@ -0,0 +1,46 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcRawChannelCnv_p1.h +// Transient/Persistent converter for ZdcRawChannel class +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCTPCNV_ZDCRAWCHANNELCNV_P1_H +#define ZDCTPCNV_ZDCRAWCHANNELCNV_P1_H + +// AthenaPoolCnvSvc includes +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +// ZdcEventTPCnv includes +#include "ZdcEventTPCnv/ZdcRawChannel_p1.h" + +// ZdcEvent includes +#include "ZdcEvent/ZdcRawChannel.h" + +class MsgStream; + +class ZdcRawChannelCnv_p1 : public T_AthenaPoolTPCnvBase<ZdcRawChannel, ZdcRawChannel_p1> { + +public: + + /** Default constructor: + */ + ZdcRawChannelCnv_p1() {} + + /** Method creating the transient representation ZdcRawChannel + * from its persistent representation ZdcRawChannel_p1 + */ + virtual void persToTrans(const ZdcRawChannel_p1* persObj, ZdcRawChannel* transObj, MsgStream &log); + + /** Method creating the persistent representation ZdcRawChannel_p1 + * from its transient representation ZdcRawChannel + */ + virtual void transToPers(const ZdcRawChannel* transObj, ZdcRawChannel_p1* persObj, MsgStream &log); + +}; + +#endif //> ZDCTPCNV_ZDCRAWCHANNELCNV_P1_H diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..6188ab3e6f4f6bb10d2a59d3c66d8f946cdb5607 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h @@ -0,0 +1,46 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcRawChannelCollectionCnv_p1.h +// Header file for class ZdcRawChannelCollectionCnv_p1 +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCTPCNV_ZDCRAWCHANNELCOLLECTIONCNV_P1_H +#define ZDCTPCNV_ZDCRAWCHANNELCOLLECTIONCNV_P1_H + +// ZdcEventTPCnv includes +#define private public +#include "ZdcEventTPCnv/ZdcRawChannelCollection_p1.h" +#undef private +#include "ZdcEventTPCnv/ZdcRawChannelCnv_p1.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" + +// Zdc includes +#include "ZdcEvent/ZdcRawChannelCollection.h" + +class MsgStream; + +class ZdcRawChannelCollectionCnv_p1: public T_AthenaPoolTPCnvBase<ZdcRawChannelCollection, ZdcRawChannelCollection_p1> { + +public: + + ZdcRawChannelCollectionCnv_p1() {} + + virtual void persToTrans(const ZdcRawChannelCollection_p1* persObj, ZdcRawChannelCollection* transObj, MsgStream& log); + virtual void transToPers(const ZdcRawChannelCollection* transObj, ZdcRawChannelCollection_p1* persObj, MsgStream& log); +}; + + +template<> +class T_TPCnv<ZdcRawChannelCollection, ZdcRawChannelCollection_p1> + : public ZdcRawChannelCollectionCnv_p1 +{ +public: +}; + +#endif //> ZDCTPCNV_ZDCRAWCHANNELCOLLECTIONCNV_P1_H + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCollection_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCollection_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..30dda46bc4e2de60c796bfb9a72cef2aa8b0becc --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannelCollection_p1.h @@ -0,0 +1,33 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcRawChannelCollection_p1.h +// Persistent represenation of a ZdcRawChannelCollection +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCRAWCHANNELCOLLECTION_P1_H +#define ZDCRAWCHANNELCOLLECTION_P1_H + +#include "ZdcEventTPCnv/ZdcRawChannel_p1.h" +#include <vector> + +class ZdcRawChannelCollection_p1 : public std::vector<ZdcRawChannel_p1> +{ +public: + /// typedefs + typedef std::vector<ZdcRawChannel_p1> ElemVector; + typedef ElemVector::const_iterator const_iterator; + typedef ElemVector::iterator iterator; + + /// Default constructor + ZdcRawChannelCollection_p1 () {} + + +private: +}; + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannel_p1.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannel_p1.h new file mode 100644 index 0000000000000000000000000000000000000000..f89eff885ba64f19c4d865d4e2ed78bf9fc163a7 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/ZdcRawChannel_p1.h @@ -0,0 +1,41 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcRawChannel_p1.h +// Header file for class ZdcRawChannel_p1 +// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// +#ifndef ZDCTPCNV_ZDCRAWCHANNEL_P1_H +#define ZDCTPCNV_ZDCRAWCHANNEL_P1_H + +#include <vector> + +// forward declarations +class ZdcRawChannelCnv_p1; + +class ZdcRawChannel_p1 { + + // Make the AthenaPoolCnv class our friend + friend class ZdcRawChannelCnv_p1; + +public: + + /** Default constructor: + */ + ZdcRawChannel_p1() {m_id=0;} + +private: + + unsigned int m_id; + std::vector<float> m_energy; + std::vector<float> m_time; + std::vector<float> m_chi; + +}; + +#endif //> ZDCTPCNV_ZDCRAWCHANNEL_P1_H + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/selection.xml b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..192b6b5477b6e50e7976ac645f86c25329c3a904 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/ZdcEventTPCnv/selection.xml @@ -0,0 +1,19 @@ +<lcgdict> + + <class name="ZdcDigits_p1" /> + <class name="std::vector<ZdcDigits_p1>" /> + <class name="ZdcDigitsCollection_p1" id="B77B5F9A-1C29-4D74-A107-B3C71680C029" /> + + <class name="ZdcRawChannel_p1" /> + <class name="std::vector<ZdcRawChannel_p1>" /> + <class name="ZdcRawChannelCollection_p1" id="A2BDA733-7A0A-459D-9237-33DFF3DC9982"/> + + <class name="ZDC_SimStripHit_p1" /> + <class name="std::vector<ZDC_SimStripHit_p1>" /> + <class name="ZDC_SimStripHit_Collection_p1" id="1082F8C1-BA19-47AF-83D7-4669BD12E9AC" /> + + <class name="ZDC_SimPixelHit_p1" /> + <class name="std::vector<ZDC_SimPixelHit_p1>" /> + <class name="ZDC_SimPixelHit_Collection_p1" id="EBCA37BF-38FF-4F19-B577-E5D0EFFA51D0" /> + +</lcgdict> diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/cmt/requirements b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..602821134ac1363d93e1f41cd062b6bb1cc6ba1a --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/cmt/requirements @@ -0,0 +1,22 @@ +package ZdcEventTPCnv + +author Peter Steinberg <peter.steinberg@bnl.gov + +public +use AtlasPolicy AtlasPolicy-* +use AtlasReflex AtlasReflex-* External +use ZdcEvent ZdcEvent-* ForwardDetectors/ZDC +use ZDC_SimEvent ZDC_SimEvent-* ForwardDetectors/ZDC +#use EventContainers EventContainers-* Event +use AthenaPoolCnvSvc AthenaPoolCnvSvc-* Database/AthenaPOOL + +private +use GaudiInterface GaudiInterface-* External +use Identifier Identifier-* DetectorDescription + +public + +library ZdcEventTPCnv *.cxx +apply_pattern installed_library + +apply_pattern lcgdict dict=ZdcEventTPCnv selectionfile=selection.xml headerfiles="../ZdcEventTPCnv/ZdcEventTPCnvDict.h" diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimPixelHitCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimPixelHitCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c0b7bebdbff1452e0411432a9f1e66b104baf1dd --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimPixelHitCnv_p1.cxx @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#define private public +#define protected public +#include "ZDC_SimEvent/ZDC_SimPixelHit.h" +#undef private +#undef protected + +#include "Identifier/Identifier.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHitCnv_p1.h" + +void ZDC_SimPixelHitCnv_p1::persToTrans(const ZDC_SimPixelHit_p1* persObj, ZDC_SimPixelHit* transObj, MsgStream& log) { + + log << MSG::DEBUG << " In ZDC_SimPixelHitCnv_p1::persToTrans " << endreq; + + transObj->Side = persObj->Side; + transObj->ModNo = persObj->ModNo; + transObj->PixNo = persObj->PixNo; + transObj->Edep = persObj->Edep; + transObj->Nphotons = persObj->Nphotons; + +} + +void ZDC_SimPixelHitCnv_p1::transToPers(const ZDC_SimPixelHit* transObj, ZDC_SimPixelHit_p1* persObj, MsgStream& log) { + + log << MSG::DEBUG << " In ZDC_SimPixelHitCnv_p1::transToPers " << endreq; + + persObj->Side = transObj->Side; + persObj->ModNo = transObj->ModNo; + persObj->PixNo = transObj->PixNo; + persObj->Edep = transObj->Edep; + persObj->Nphotons = transObj->Nphotons; + +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimPixelHit_CollectionCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimPixelHit_CollectionCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..8e240d9757e1ca81cc60607f4637413485ca0df0 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimPixelHit_CollectionCnv_p1.cxx @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ZdcEventTPCnv/ZDC_SimPixelHitCnv_p1.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_CollectionCnv_p1.h" +#include "GaudiKernel/MsgStream.h" + +static ZDC_SimPixelHitCnv_p1 ZdcPixelHitConv; + +void ZDC_SimPixelHit_CollectionCnv_p1::transToPers(const ZDC_SimPixelHit_Collection* transObj, ZDC_SimPixelHit_Collection_p1* persObj, MsgStream& log) { + + persObj->resize(transObj->size()); + + for (unsigned int i=0; i<transObj->size(); ++i) { + + ZDC_SimPixelHit_p1& pixelhit = (*persObj)[i]; + const ZDC_SimPixelHit& pixelhit_t = (*transObj)[i]; + + ZdcPixelHitConv.transToPers(&pixelhit_t, &pixelhit, log); + } +} + +void ZDC_SimPixelHit_CollectionCnv_p1::persToTrans(const ZDC_SimPixelHit_Collection_p1* persObj, ZDC_SimPixelHit_Collection* transObj, MsgStream& log) { + + //log << MSG::INFO << " size = " << persObj->size() << endreq; + + transObj->reserve(persObj->size()); + + for (unsigned int i=0; i<persObj->size(); ++i) { + + //log << MSG::INFO << " i = " << i << endreq; + const ZDC_SimPixelHit_p1* pixelhit = &((*persObj)[i]); + + transObj->push_back(*ZdcPixelHitConv.createTransient(pixelhit, log)); + } +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimStripHitCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimStripHitCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..cf7d11b8e635886c25bc4941f3c559cf04ad424d --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimStripHitCnv_p1.cxx @@ -0,0 +1,34 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#define private public +#define protected public +#include "ZDC_SimEvent/ZDC_SimStripHit.h" +#undef private +#undef protected + +#include "Identifier/Identifier.h" +#include "ZdcEventTPCnv/ZDC_SimStripHitCnv_p1.h" + +void ZDC_SimStripHitCnv_p1::persToTrans(const ZDC_SimStripHit_p1* persObj, ZDC_SimStripHit* transObj, MsgStream& log) { + + log << MSG::DEBUG << " In ZDC_SimStripHitCnv_p1::persToTrans " << endreq; + + transObj->Side = persObj->Side; + transObj->ModNo = persObj->ModNo; + transObj->Edep = persObj->Edep; + transObj->Nphotons = persObj->Nphotons; + +} + +void ZDC_SimStripHitCnv_p1::transToPers(const ZDC_SimStripHit* transObj, ZDC_SimStripHit_p1* persObj, MsgStream& log) { + + log << MSG::DEBUG << " In ZDC_SimStripHitCnv_p1::transToPers " << endreq; + + persObj->Side = transObj->Side; + persObj->ModNo = transObj->ModNo; + persObj->Edep = transObj->Edep; + persObj->Nphotons = transObj->Nphotons; + +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimStripHit_CollectionCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimStripHit_CollectionCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..8f1b1371f23766f36dd9da77742f61184e7f1229 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZDC_SimStripHit_CollectionCnv_p1.cxx @@ -0,0 +1,37 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ZdcEventTPCnv/ZDC_SimStripHitCnv_p1.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_CollectionCnv_p1.h" +#include "GaudiKernel/MsgStream.h" + +static ZDC_SimStripHitCnv_p1 ZdcStripHitConv; + +void ZDC_SimStripHit_CollectionCnv_p1::transToPers(const ZDC_SimStripHit_Collection* transObj, ZDC_SimStripHit_Collection_p1* persObj, MsgStream& log) { + + persObj->resize(transObj->size()); + + for (unsigned int i=0; i<transObj->size(); ++i) { + + ZDC_SimStripHit_p1& striphit = (*persObj)[i]; + const ZDC_SimStripHit& striphit_t = (*transObj)[i]; + + ZdcStripHitConv.transToPers(&striphit_t, &striphit, log); + } +} + +void ZDC_SimStripHit_CollectionCnv_p1::persToTrans(const ZDC_SimStripHit_Collection_p1* persObj, ZDC_SimStripHit_Collection* transObj, MsgStream& log) { + + //log << MSG::INFO << " size = " << persObj->size() << endreq; + + transObj->reserve(persObj->size()); + + for (unsigned int i=0; i<persObj->size(); ++i) { + + //log << MSG::INFO << " i = " << i << endreq; + const ZDC_SimStripHit_p1* striphit = &((*persObj)[i]); + + transObj->push_back(*ZdcStripHitConv.createTransient(striphit, log)); + } +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcDigitsCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcDigitsCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..53e40de860b8851833f0cb860706657e43c3dedf --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcDigitsCnv_p1.cxx @@ -0,0 +1,93 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcDigitsCnv_p1.cxx +// Implementation file for class ZdcDigitsCnv_p1 +// Author: Peter Steinberg <peter.steinberg@bnl.gov> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// + +#define private public +#define protected public +#include "ZdcEvent/ZdcDigits.h" +#undef private +#undef protected + +#include "ZdcEventTPCnv/ZdcDigitsCnv_p1.h" + + +void +ZdcDigitsCnv_p1::persToTrans(const ZdcDigits_p1* persObj, ZdcDigits* transObj, MsgStream &log) +{ + //log << MSG::INFO << "ZdcDigitsCnv_p1::persToTrans called " << endreq; + log << MSG::VERBOSE << "ZdcDigitsCnv_p1::persToTrans called " << endreq; + + transObj->m_id = Identifier(Identifier32(persObj->m_id)); + + //log << MSG::INFO << "ZdcDigitsCnv_p1::reading in... " << endreq; + + transObj->m_digits_gain0_delay0.reserve(persObj->m_digits_gain0_delay0.size()); + transObj->m_digits_gain0_delay1.reserve(persObj->m_digits_gain0_delay1.size()); + transObj->m_digits_gain1_delay0.reserve(persObj->m_digits_gain1_delay0.size()); + transObj->m_digits_gain1_delay1.reserve(persObj->m_digits_gain1_delay1.size()); + + for (std::vector<int>::const_iterator it = persObj->m_digits_gain0_delay0.begin(); it != persObj->m_digits_gain0_delay0.end(); ++it) { + int val = (*it); + transObj->m_digits_gain0_delay0.push_back( val ); + } + + for (std::vector<int>::const_iterator it = persObj->m_digits_gain0_delay1.begin(); it != persObj->m_digits_gain0_delay1.end(); ++it) { + int val = (*it); + transObj->m_digits_gain0_delay1.push_back( val ); + } + + for (std::vector<int>::const_iterator it = persObj->m_digits_gain1_delay0.begin(); it != persObj->m_digits_gain1_delay0.end(); ++it) { + int val = (*it); + transObj->m_digits_gain1_delay0.push_back( val ); + } + + for (std::vector<int>::const_iterator it = persObj->m_digits_gain1_delay1.begin(); it != persObj->m_digits_gain1_delay1.end(); ++it) { + int val = (*it); + transObj->m_digits_gain1_delay1.push_back( val ); + } + + //log << MSG::INFO << "ZdcDigitsCnv_p1::finished reading in... " << endreq; + +} + + +void +ZdcDigitsCnv_p1::transToPers(const ZdcDigits* transObj, ZdcDigits_p1* persObj, MsgStream &log) +{ + log << MSG::VERBOSE << "ZdcDigitsCnv_p1::transToPers called " << endreq; + + persObj->m_id = transObj->m_id.get_identifier32().get_compact(); + + persObj->m_digits_gain0_delay0.reserve(transObj->m_digits_gain0_delay0.size()); + for (std::vector<int>::const_iterator it = transObj->m_digits_gain0_delay0.begin(); it != transObj->m_digits_gain0_delay0.end(); ++it) { + int val = (*it); + persObj->m_digits_gain0_delay0.push_back( val ); + } + + persObj->m_digits_gain0_delay1.reserve(transObj->m_digits_gain0_delay1.size()); + for (std::vector<int>::const_iterator it = transObj->m_digits_gain0_delay1.begin(); it != transObj->m_digits_gain0_delay1.end(); ++it) { + int val = (*it); + persObj->m_digits_gain0_delay1.push_back( val ); + } + + persObj->m_digits_gain1_delay0.reserve(transObj->m_digits_gain1_delay0.size()); + for (std::vector<int>::const_iterator it = transObj->m_digits_gain1_delay0.begin(); it != transObj->m_digits_gain1_delay0.end(); ++it) { + int val = (*it); + persObj->m_digits_gain1_delay0.push_back( val ); + } + + persObj->m_digits_gain1_delay1.reserve(transObj->m_digits_gain1_delay1.size()); + for (std::vector<int>::const_iterator it = transObj->m_digits_gain1_delay1.begin(); it != transObj->m_digits_gain1_delay1.end(); ++it) { + int val = (*it); + persObj->m_digits_gain1_delay1.push_back( val ); + } + +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcDigitsCollection_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcDigitsCollection_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..963b4d26e5d0299815413e57a6289fdd2f38d404 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcDigitsCollection_p1.cxx @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ZdcEventTPCnv/ZdcDigitsCollectionCnv_p1.h" +#include "GaudiKernel/MsgStream.h" + +static ZdcDigitsCnv_p1 digitConv; + +void ZdcDigitsCollectionCnv_p1::transToPers(const ZdcDigitsCollection* transObj, ZdcDigitsCollection_p1* persObj, MsgStream& log) { + + persObj->resize(transObj->size()); + + for (unsigned int i=0; i<transObj->size(); ++i) { + + ZdcDigits_p1& digit = (*persObj)[i]; + + digitConv.transToPers((*transObj)[i], &digit, log); + } +} + +void ZdcDigitsCollectionCnv_p1::persToTrans(const ZdcDigitsCollection_p1* persObj, ZdcDigitsCollection* transObj, MsgStream& log) { + + //log << MSG::INFO << " size = " << persObj->size() << endreq; + + transObj->reserve(persObj->size()); + + for (unsigned int i=0; i<persObj->size(); ++i) { + + //log << MSG::INFO << " i = " << i << endreq; + const ZdcDigits_p1* digit = &((*persObj)[i]); + + transObj->push_back(digitConv.createTransient(digit, log)); + } +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcRawChannelCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcRawChannelCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..e95ae013d19486da8029ff7b1084ded590ec7a50 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcRawChannelCnv_p1.cxx @@ -0,0 +1,83 @@ +///////////////////////// -*- C++ -*- ///////////////////////////// + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// ZdcRawChannelCnv_p1.cxx +// Implementation file for class ZdcRawChannelCnv_p1 +// Author: Peter Steinberg <peter.steinberg@bnl.gov> +// Date: June 2009 +/////////////////////////////////////////////////////////////////// + +#define private public +#define protected public +#include "ZdcEvent/ZdcRawChannel.h" +#undef private +#undef protected + +#include "ZdcEventTPCnv/ZdcRawChannelCnv_p1.h" + + +void +ZdcRawChannelCnv_p1::persToTrans(const ZdcRawChannel_p1* persObj, ZdcRawChannel* transObj, MsgStream &log) +{ + //log << MSG::INFO << "ZdcRawChannelCnv_p1::persToTrans called " << endreq; + log << MSG::VERBOSE << "ZdcRawChannelCnv_p1::persToTrans called " << endreq; + + transObj->m_id = Identifier(Identifier32(persObj->m_id)); + + transObj->m_energy.reserve(persObj->m_energy.size()); + transObj->m_time.reserve(persObj->m_time.size()); + transObj->m_chi.reserve(persObj->m_chi.size()); + + for (std::vector<float>::const_iterator it = persObj->m_energy.begin(); it != persObj->m_energy.end(); ++it) { + float val = (*it); + transObj->m_energy.push_back( val ); + } + + for (std::vector<float>::const_iterator it = persObj->m_time.begin(); it != persObj->m_time.end(); ++it) { + float val = (*it); + transObj->m_time.push_back( val ); + } + + for (std::vector<float>::const_iterator it = persObj->m_chi.begin(); it != persObj->m_chi.end(); ++it) { + float val = (*it); + transObj->m_chi.push_back( val ); + } + //log << MSG::INFO << "ZdcRawChannelCnv_p1::reading in... " << endreq; + + + + + //log << MSG::INFO << "ZdcRawChannelCnv_p1::finished reading in... " << endreq; + +} + + +void +ZdcRawChannelCnv_p1::transToPers(const ZdcRawChannel* transObj, ZdcRawChannel_p1* persObj, MsgStream &log) +{ + log << MSG::VERBOSE << "ZdcRawChannelCnv_p1::transToPers called " << endreq; + + persObj->m_id = transObj->m_id.get_identifier32().get_compact(); + + persObj->m_energy.reserve(transObj->m_energy.size()); + persObj->m_time.reserve(transObj->m_time.size()); + persObj->m_chi.reserve(transObj->m_chi.size()); + + for (std::vector<float>::const_iterator it = transObj->m_energy.begin(); it != transObj->m_energy.end(); ++it) { + float val = (*it); + persObj->m_energy.push_back( val ); + } + + for (std::vector<float>::const_iterator it = transObj->m_time.begin(); it != transObj->m_time.end(); ++it) { + float val = (*it); + persObj->m_time.push_back( val ); + } + + for (std::vector<float>::const_iterator it = transObj->m_chi.begin(); it != transObj->m_chi.end(); ++it) { + float val = (*it); + persObj->m_chi.push_back( val ); + } +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcRawChannelCollectionCnv_p1.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcRawChannelCollectionCnv_p1.cxx new file mode 100644 index 0000000000000000000000000000000000000000..4346587c4cb9575ae9c9a58c5aa1c3087f2cbe89 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventTPCnv/src/ZdcRawChannelCollectionCnv_p1.cxx @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h" +#include "GaudiKernel/MsgStream.h" + +static ZdcRawChannelCnv_p1 rawchannelConv; + +void ZdcRawChannelCollectionCnv_p1::transToPers(const ZdcRawChannelCollection* transObj, ZdcRawChannelCollection_p1* persObj, MsgStream& log) { + + persObj->resize(transObj->size()); + + for (unsigned int i=0; i<transObj->size(); ++i) { + + ZdcRawChannel_p1& rawchannel = (*persObj)[i]; + + rawchannelConv.transToPers((*transObj)[i], &rawchannel, log); + } +} + +void ZdcRawChannelCollectionCnv_p1::persToTrans(const ZdcRawChannelCollection_p1* persObj, ZdcRawChannelCollection* transObj, MsgStream& log) { + + //log << MSG::INFO << " size = " << persObj->size() << endreq; + + transObj->reserve(persObj->size()); + + for (unsigned int i=0; i<persObj->size(); ++i) { + + //log << MSG::INFO << " i = " << i << endreq; + const ZdcRawChannel_p1* rawchannel = &((*persObj)[i]); + + transObj->push_back(rawchannelConv.createTransient(rawchannel,log)); + } +}