|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/ISvcLocator.h"
17 #include "GaudiKernel/Bootstrap.h"
18 #include "GaudiKernel/StatusCode.h"
19 #include "GaudiKernel/Service.h"
20 #include "GaudiKernel/MsgStream.h"
51 TRANS::const_iterator it_Coll = transCont->begin();
52 TRANS::const_iterator it_CollEnd = transCont->end();
53 unsigned int collIndex;
54 unsigned int chanBegin = 0;
55 unsigned int chanEnd = 0;
56 persCont->
m_collections.resize(transCont->numberOfCollections());
59 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
63 chanEnd += collection.size();
65 pcollection.
m_id = collection.identify().get_compact();
66 pcollection.
m_hashId = (
unsigned int) collection.identifyHash();
67 pcollection.
m_begin = chanBegin;
68 pcollection.
m_end = chanEnd;
70 persCont->
m_PRD.resize(chanEnd);
71 for (
unsigned int i = 0;
i < collection.size(); ++
i) {
103 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
113 coll->resize(nchans);
126 StatusCode sc = transCont->addCollection(coll, collIDHash);
127 if (
sc.isFailure()) {
128 throw std::runtime_error(
"Failed to add collection to ID Container");
144 if (this->
initialize(log) != StatusCode::SUCCESS) {
148 std::unique_ptr<InDet::TRT_DriftCircleContainer> trans(std::make_unique<InDet::TRT_DriftCircleContainer>(
m_trtId->
module_hash_max()));
150 return(trans.release());
157 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
161 return StatusCode::SUCCESS;
std::vector< TPObjRef > m_PRD
virtual InDet::TRT_DriftCircleContainer * createTransient(const InDet::InDetPRD_Container_p1 *persObj, MsgStream &log)
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
std::vector< InDet::InDetPRD_Collection_p1 > m_collections
const InDetDD::TRT_DetectorManager * m_trtMgr
StatusCode initialize(MsgStream &log)
size_type module_hash_max(void) const
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
InDet::TRT_DriftCircleContainer TRANS
Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
const TRT_BaseElement * getElement(Identifier id) const
Access Elements Generically---------------------------------------------—.
Helpers for checking error return status codes and reporting errors.
Trk::PrepRawDataCollection< TRT_DriftCircle > TRT_DriftCircleCollection
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log)
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Create transient representation of a persistent object, stored in the the top-level persistent object...