Skip to content
Snippets Groups Projects
Commit 62a50406 authored by Siarhei Harkusha's avatar Siarhei Harkusha Committed by Graeme Stewart
Browse files

fixed requirements (TileEventAthenaPool-00-04-30)

	* cmt/requirements: removed dependency on TileSimEventTPCnv
	* Tagging TileEventAthenaPool-00-04-30

2015-06-12  Siarhei Harkusha  <Siarhei.Harkusha@cern.ch>

	* TileHitVectorCnv: moved to seperate package TileSimEventAthenaPool
	* Tagging TileEventAthenaPool-00-04-29
parent 113b6697
No related branches found
No related tags found
No related merge requests found
......@@ -9,17 +9,16 @@ use StoreGate StoreGate-* Control
use AthenaPoolCnvSvc AthenaPoolCnvSvc-* Database/AthenaPOOL
use CaloIdentifier CaloIdentifier-* Calorimeter
use CaloDetDescr CaloDetDescr-* Calorimeter
use TileSimEvent TileSimEvent-* TileCalorimeter
use TileTPCnv TileTPCnv-* TileCalorimeter/TileSvc
use TileEvent TileEvent-* TileCalorimeter
use TileTPCnv TileTPCnv-* TileCalorimeter/TileSvc
public
use AtlasPolicy AtlasPolicy-*
use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
apply_pattern poolcnv files="-s=${TileSimEvent_root}/TileSimEvent TileHitVector.h \
-s=${TileEvent_root}/TileEvent TileHitContainer.h TileDigitsContainer.h TileRawChannelContainer.h TileBeamElemContainer.h \
apply_pattern poolcnv files="-s=${TileEvent_root}/TileEvent TileHitContainer.h TileDigitsContainer.h TileRawChannelContainer.h TileBeamElemContainer.h \
TileCellContainer.h TileMuContainer.h TileL2Container.h TileTTL1Container.h \
TileTriggerContainer.h TileCosmicMuonContainer.h TileCosmicMuon.h TileMuonReceiverContainer.h"
......
......@@ -33,7 +33,6 @@ TileEvent/TileMuContainer
The other Tile EDM classes have custom converters, defined in this package.
TileSimEvent/TileHitVector
TileEvent/TileHitContainer.h
TileDigitsContainer.h
TileRawChannelContainer.h
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "TileTPCnv/TileHitVectorCnv_p1.h"
#include "TileHitVectorCnv.h"
#include "TileTPCnv/TileHit_p1.h"
TileHitVector_PERS* TileHitVectorCnv::createPersistent(TileHitVector* transCont) {
MsgStream mlog(messageService(), "TileHitVectorConverter" );
TileHitVectorCnv_p1 converter;
TileHitVector_PERS *persObj = converter.createPersistent( transCont, mlog );
return persObj;
}
TileHitVector* TileHitVectorCnv::createTransient() {
MsgStream mlog(messageService(), "TileHitVectorConverter" );
TileHitVectorCnv_p1 converter_p1;
TileHitVector *trans_cont(0);
static const pool::Guid p1_guid("65AD597A-BF97-46EE-B9E3-203B35218EA7");
static const pool::Guid p0_guid("EA2209D1-C339-453D-AEAD-21C026F0735E");
if( this->compareClassGuid(p1_guid)) {
std::auto_ptr< TileHitVector_p1 > col_vect( this->poolReadObject< TileHitVector_p1 >() );
trans_cont = converter_p1.createTransient( col_vect.get(), mlog );
}
else if( this->compareClassGuid(p0_guid)) {
// old version from before TP separation
TileOldHitVector* oldVec = this->poolReadObject<TileOldHitVector>();
size_t size = oldVec->size();
trans_cont = new TileHitVector();
trans_cont->reserve(size);
// copy all hits to new vector
TileOldHitVector::const_iterator it = oldVec->begin(), itEnd=oldVec->end();
for (;it!=itEnd;++it) {
trans_cont->push_back(**it);
}
delete oldVec;
} else {
throw std::runtime_error("Unsupported persistent version of Data container");
}
return trans_cont;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TILEHITVECTORCNV
#define TILEHITVECTORCNV
#include "TileSimEvent/TileHitVector.h"
#include "TileTPCnv/TileHitVector_p1.h"
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
// Gaudi
#include "GaudiKernel/MsgStream.h"
// typedef to the latest persistent version
typedef TileHitVector_p1 TileHitVector_PERS;
class TileHitVectorCnv : public T_AthenaPoolCustomCnv<TileHitVector, TileHitVector_PERS > {
friend class CnvFactory<TileHitVectorCnv>;
protected:
TileHitVectorCnv(ISvcLocator* svcloc) :
T_AthenaPoolCustomCnv<TileHitVector, TileHitVector_PERS >( svcloc) {}
TileHitVector_PERS* createPersistent(TileHitVector* transCont);
TileHitVector* 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