Skip to content
Snippets Groups Projects
Commit 1f4b27b6 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'templatedConverter.EventAthenaPool-20210914' into 'master'

EventAthenaPool: Use templated Athena pool converters.

See merge request !46470
parents 22582b3d 2129ed2a
No related branches found
No related tags found
9 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!46538Draft: Added missing xAOD::TrigConfKeys from DESDM_MCP,!46514TGC Digitization: Implementation of signal propagation time between the sensor edge and ASD,!46470EventAthenaPool: Use templated Athena pool converters.
......@@ -8,47 +8,3 @@
* $Id: EventStreamInfoCnv.cxx,v 1.3 2009-03-18 17:48:03 gemmeren Exp $
**/
#include "EventStreamInfoCnv.h"
#include "EventTPCnv/EventStreamInfo_p1.h"
#include "EventTPCnv/EventStreamInfo_p2.h"
#include "EventTPCnv/EventStreamInfo_p3.h"
#include "EventTPCnv/EventStreamInfoCnv_p1.h"
#include "EventTPCnv/EventStreamInfoCnv_p2.h"
#include "EventTPCnv/EventStreamInfoCnv_p3.h"
#include "EventTPCnv/EventInfoCnv_p1.h"
//______________________________________________________________________________
EventStreamInfo_PERS* EventStreamInfoCnv::createPersistent(EventStreamInfo* transObj) {
MsgStream log(msgSvc(), "EventStreamInfoConverter");
EventStreamInfoCnv_p3 tPconverter_p3;
EventStreamInfo_PERS *persObj = tPconverter_p3.createPersistent(transObj, log);
log << MSG::DEBUG << "Success" << endmsg;
return(persObj);
}
//______________________________________________________________________________
EventStreamInfo* EventStreamInfoCnv::createTransient() {
static const pool::Guid p3_guid("11DF1B8C-0DEE-4687-80D7-E74B520ACBB4");
static const pool::Guid p2_guid("9AD4889D-C8EB-4F3B-9920-D37FF092CAB6");
static const pool::Guid p1_guid("9998C282-403B-4EA5-A795-C8C9BA9909C3");
if (compareClassGuid(p3_guid)) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr<EventStreamInfo_p3> esi_p3(poolReadObject<EventStreamInfo_p3>());
MsgStream log(msgSvc(), "EventStreamInfoConverter");
EventStreamInfoCnv_p3 tPconverter_p3;
return(tPconverter_p3.createTransient(esi_p3.get(), log));
} else if (compareClassGuid(p2_guid)) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr<EventStreamInfo_p2> esi_p2(poolReadObject<EventStreamInfo_p2>());
MsgStream log(msgSvc(), "EventStreamInfoConverter");
EventStreamInfoCnv_p2 tPconverter_p2;
return(tPconverter_p2.createTransient(esi_p2.get(), log));
} else if (compareClassGuid(p1_guid)) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr<EventStreamInfo_p1> esi_p1(poolReadObject<EventStreamInfo_p1>());
MsgStream log(msgSvc(), "EventStreamInfoConverter");
EventStreamInfoCnv_p1 tPconverter_p1;
return(tPconverter_p1.createTransient(esi_p1.get(), log));
}
EventStreamInfo* esi = poolReadObject<EventStreamInfo>();
return(esi);
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef EVENTSTREAMINFOCNV_H
......@@ -11,28 +11,20 @@
* $Id: EventStreamInfoCnv.h,v 1.3 2009-03-18 17:48:04 gemmeren Exp $
**/
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "EventInfo/EventStreamInfo.h"
#include "EventTPCnv/EventStreamInfo_p3.h"
/// the latest persistent representation type of EventStreamInfo
typedef EventStreamInfo_p3 EventStreamInfo_PERS;
typedef T_AthenaPoolCustomCnv<EventStreamInfo, EventStreamInfo_PERS> EventStreamInfoCnvBase;
/** @class EventStreamInfoCnv
* @brief This class provides a converter for the EventStreamInfo class.
**/
class EventStreamInfoCnv : public EventStreamInfoCnvBase {
#include "AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h"
#include "EventInfo/EventStreamInfo.h"
#include "EventTPCnv/EventStreamInfoCnv_p1.h"
#include "EventTPCnv/EventStreamInfoCnv_p2.h"
#include "EventTPCnv/EventStreamInfoCnv_p3.h"
friend class CnvFactory<EventStreamInfoCnv>;
protected:
public:
EventStreamInfoCnv(ISvcLocator* svcloc) : EventStreamInfoCnvBase(svcloc) {}
protected:
typedef T_AthenaPoolTPCnvCnv<EventStreamInfo,
EventStreamInfoCnv_p3,
EventStreamInfoCnv_p2,
EventStreamInfoCnv_p1,
T_TPCnvNull<EventStreamInfo> >
EventStreamInfoCnv;
virtual EventStreamInfo_PERS* createPersistent(EventStreamInfo* transObj);
virtual EventStreamInfo* createTransient();
};
#endif
......@@ -8,39 +8,3 @@
* @author Marcin.Nowak@cern.ch
*/
#include "MergedEventInfoCnv.h"
MergedEventInfo_PERS* MergedEventInfoCnv::createPersistent(MergedEventInfo* transObj) {
MsgStream log(msgSvc(), "MergedEventInfoConverter" );
static const MergedEventInfoCnv_p2 TPconv;
MergedEventInfo_PERS *persObj = TPconv.createPersistentConst( transObj, log );
//log << MSG::DEBUG << "Success" << endmsg;
return persObj;
}
MergedEventInfo* MergedEventInfoCnv::createTransient() {
static const pool::Guid p2_guid("5B0C1A92-6836-4B3C-9EE6-5E69792A28B5");
static const pool::Guid p1_guid("9540DED6-51E8-48A3-8F86-05CB1D9CC812");
static const pool::Guid p0_guid("FA93B80D-82C7-4096-8A04-62885A679A6F");
if( compareClassGuid(p2_guid) ) {
std::unique_ptr< MergedEventInfo_p2 > col_vect( poolReadObject< MergedEventInfo_p2 >() );
MsgStream log(msgSvc(), "MergedEventInfoConverter" );
//log << MSG::DEBUG << "Reading MergedEventInfo_p2" << endmsg;
static const MergedEventInfoCnv_p2 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
} else
if( compareClassGuid(p1_guid) ) {
std::unique_ptr< MergedEventInfo_p1 > col_vect( poolReadObject< MergedEventInfo_p1 >() );
MsgStream log(msgSvc(), "MergedEventInfoConverter" );
//log << MSG::DEBUG << "Reading MergedEventInfo_p1" << endmsg;
static const MergedEventInfoCnv_p1 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
}
else if( compareClassGuid(p0_guid) ) {
// regular object from before TP separation, just return it
//MsgStream log(msgSvc(), "MergedEventInfoConverter" );
//log << MSG::DEBUG << "Reading MergedEventInfo (original)" << endmsg;
return poolReadObject< MergedEventInfo >();
}
throw std::runtime_error("Unsupported persistent version of MergedEventInfo");
}
......@@ -19,20 +19,12 @@
#include "EventTPCnv/MergedEventInfo_p2.h"
#include "EventTPCnv/MergedEventInfoCnv_p2.h"
// the latest persistent representation type of MergedEventInfo
typedef MergedEventInfo_p2 MergedEventInfo_PERS;
typedef T_AthenaPoolCustomCnv<MergedEventInfo, MergedEventInfo_PERS > MergedEventInfoCnvBase;
class MergedEventInfoCnv : public MergedEventInfoCnvBase {
friend class CnvFactory<MergedEventInfoCnv >;
protected:
public:
MergedEventInfoCnv (ISvcLocator* svcloc) : MergedEventInfoCnvBase(svcloc) {}
protected:
virtual MergedEventInfo_PERS* createPersistent (MergedEventInfo* transObj);
virtual MergedEventInfo* createTransient ();
};
typedef T_AthenaPoolTPCnvCnv<MergedEventInfo,
MergedEventInfoCnv_p2,
MergedEventInfoCnv_p1,
T_TPCnvNull<MergedEventInfo> >
MergedEventInfoCnv;
#endif
......@@ -8,70 +8,3 @@
* @author Marcin.Nowak@cern.ch
*/
#include "PileUpEventInfoCnv.h"
PileUpEventInfo_PERS* PileUpEventInfoCnv::createPersistent(PileUpEventInfo* transObj) {
MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
static const PileUpEventInfoCnv_p5 TPconverter;
PileUpEventInfo_PERS *persObj = TPconverter.createPersistentConst( transObj, log );
//log << MSG::DEBUG << "Success" << endmsg;
return persObj;
}
PileUpEventInfo* PileUpEventInfoCnv::createTransient() {
static const pool::Guid p5_guid("F53A1735-F61A-4CA4-B25F-DB0E277E2DDC");
static const pool::Guid p4_guid("7D72CE05-E814-4A70-B3B2-B54B05069103");
static const pool::Guid p3_guid("32A54198-BCDF-0AB5-DC0B-542CAE9866C2");
static const pool::Guid p2_guid("C2A54FC3-759C-4F01-AF7E-668D9198E10F");
static const pool::Guid p1_guid("1A399605-8E31-4150-B766-2049FD689485");
static const pool::Guid p0_guid("6A58157B-6B6E-430F-A72A-EAAA4BDC4AE2");
if( compareClassGuid(p5_guid) ) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr< PileUpEventInfo_p5 > col_vect( poolReadObject< PileUpEventInfo_p5 >() );
MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
//log << MSG::DEBUG << "Reading PileUpEventInfo_p5" << endmsg;
static const PileUpEventInfoCnv_p5 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
}
else if( compareClassGuid(p4_guid) ) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr< PileUpEventInfo_p4 > col_vect( poolReadObject< PileUpEventInfo_p4 >() );
MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
//log << MSG::DEBUG << "Reading PileUpEventInfo_p4" << endmsg;
static const PileUpEventInfoCnv_p4 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
}
if( compareClassGuid(p3_guid) ) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr< PileUpEventInfo_p3 > col_vect( poolReadObject< PileUpEventInfo_p3 >() );
MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
//log << MSG::DEBUG << "Reading PileUpEventInfo_p3" << endmsg;
static const PileUpEventInfoCnv_p3 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
}
else if( compareClassGuid(p2_guid) ) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr< PileUpEventInfo_p2 > col_vect( poolReadObject< PileUpEventInfo_p2 >() );
MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
//log << MSG::DEBUG << "Reading PileUpEventInfo_p2" << endmsg;
static const PileUpEventInfoCnv_p2 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
}
else if( compareClassGuid(p1_guid) ) {
// using unique_ptr ensures deletion of the persistent object
std::unique_ptr< PileUpEventInfo_p1 > col_vect( poolReadObject< PileUpEventInfo_p1 >() );
MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
//log << MSG::DEBUG << "Reading PileUpEventInfo_p1" << endmsg;
static const PileUpEventInfoCnv_p1 TPconverter;
return TPconverter.createTransientConst( col_vect.get(), log );
}
else if( compareClassGuid(p0_guid) ) {
// regular object from before TP separation, just return it
//MsgStream log(msgSvc(), "PileUpEventInfoConverter" );
//log << MSG::DEBUG << "Reading PileUpEventInfo (original)" << endmsg;
return poolReadObject< PileUpEventInfo >();
}
throw std::runtime_error("Unsupported persistent version of PileUpEventInfo");
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -27,20 +27,14 @@
#include "EventTPCnv/PileUpEventInfo_p5.h"
#include "EventTPCnv/PileUpEventInfoCnv_p5.h"
// the latest persistent representation type of PileUpEventInfo
typedef PileUpEventInfo_p5 PileUpEventInfo_PERS;
typedef T_AthenaPoolTPCnvCnv<PileUpEventInfo,
PileUpEventInfoCnv_p5,
PileUpEventInfoCnv_p4,
PileUpEventInfoCnv_p3,
PileUpEventInfoCnv_p2,
PileUpEventInfoCnv_p1,
T_TPCnvNull<PileUpEventInfo> >
PileUpEventInfoCnv;
typedef T_AthenaPoolCustomCnv<PileUpEventInfo, PileUpEventInfo_PERS > PileUpEventInfoCnvBase;
class PileUpEventInfoCnv : public PileUpEventInfoCnvBase {
friend class CnvFactory<PileUpEventInfoCnv >;
protected:
public:
PileUpEventInfoCnv (ISvcLocator* svcloc) : PileUpEventInfoCnvBase(svcloc) {}
protected:
virtual PileUpEventInfo_PERS* createPersistent (PileUpEventInfo* transObj);
virtual PileUpEventInfo* createTransient ();
};
#endif
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