10#include "Identifier/Identifier.h"
18 persCont->
m_simdata.resize(transCont->size());
20 unsigned int collIndex(0);
21 for (
const auto& transSimDataPair : *transCont) {
23 (persCont->
m_simdata[collIndex]).first = transSimDataPair.first.get_identifier32().get_compact();
29 MSG_DEBUG(log,
" *** Writing InDetSimdataCollection");
36 if (this->
initialize(log) != StatusCode::SUCCESS) {
37 log << MSG::FATAL <<
"Could not initialize InDetSimDataCollectionCnv_p1 " <<
endmsg;
42 for (
const auto& persSimDataPair : persCont->
m_simdata) {
51 if (
m_pixId->is_shortened_pixel_id(persSimDataPair.first)) {
52 id =
m_pixId->pixel_id_from_shortened(persSimDataPair.first); }
53 else {
id = persSimDataPair.first; }
54 transCont->insert( transCont->end(), std :: make_pair(
id,
simData ) );
55 transCont->insert( transCont->end(), std :: make_pair(
Identifier( persSimDataPair.first ),
simData ) );
57 MSG_DEBUG(log,
" *** Reading InDetSimdataCollection");
66 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
67 CHECK( detStore.isValid() );
72 return StatusCode::SUCCESS;
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
#define MSG_DEBUG(log, x)
virtual void transToPers(const InDetSimData *transObj, InDetSimData_p1 *persObj, MsgStream &log)
void setCurrentStore(IProxyDict *store)
virtual void persToTrans(const InDetSimData_p1 *persObj, InDetSimData *transObj, MsgStream &log)
StatusCode initialize(MsgStream &log)
virtual void transToPers(const InDetSimDataCollection *transCont, InDetSimDataCollection_p1 *persCont, MsgStream &log)
virtual void persToTrans(const InDetSimDataCollection_p1 *persCont, InDetSimDataCollection *transCont, MsgStream &log)
std::vector< std::pair< Identifier32::value_type, InDetSimData_p1 > > m_simdata
static IProxyDict * store()
Fetch the current store.