|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/Bootstrap.h"
20 #include "GaudiKernel/ISvcLocator.h"
21 #include "GaudiKernel/MsgStream.h"
22 #include "GaudiKernel/Service.h"
23 #include "GaudiKernel/StatusCode.h"
47 TRANS::const_iterator it_Coll = transCont->begin();
48 TRANS::const_iterator it_CollEnd = transCont->end();
49 unsigned int collIndex;
50 unsigned int chanBegin = 0;
51 unsigned int chanEnd = 0;
52 persCont->
m_collections.resize(transCont->numberOfCollections());
55 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
60 chanEnd += collection.size();
62 pcollection.
m_id = collection.identify().get_compact();
63 pcollection.
m_hashId = (
unsigned int) collection.identifyHash();
64 pcollection.
m_begin = chanBegin;
65 pcollection.
m_end = chanEnd;
67 persCont->
m_PRD.resize(chanEnd);
68 for (
unsigned int i = 0;
i < collection.size(); ++
i) {
96 elements = *sctDetEleHandle;
97 if (not sctDetEleHandle.
isValid() or elements==
nullptr) {
109 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
119 coll->resize(nchans);
132 StatusCode sc = transCont->addCollection(coll, collIDHash);
133 if (
sc.isFailure()) {
134 throw std::runtime_error(
"Failed to add collection to ID Container");
151 if (this->
initialize(log) != StatusCode::SUCCESS) {
155 std::unique_ptr<InDet::SCT_ClusterContainer> trans(std::make_unique<InDet::SCT_ClusterContainer>(
m_sctId->
wafer_hash_max()));
157 return(trans.release());
167 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
175 return StatusCode::SUCCESS;
std::vector< TPObjRef > m_PRD
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
void setUseDetectorElement(const bool useDetectorElement)
InDet::SCT_ClusterContainer TRANS
Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
std::vector< InDet::InDetPRD_Collection_p1 > m_collections
ServiceHandle< StoreGateSvc > m_storeGate
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
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...
size_type wafer_hash_max(void) const
Helpers for checking error return status codes and reporting errors.
StatusCode initialize(bool used=true)
virtual InDet::SCT_ClusterContainer * createTransient(const InDet::InDetPRD_Container_p1 *persObj, MsgStream &log)
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log)
StatusCode initialize(MsgStream &log)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Trk::PrepRawDataCollection< SCT_Cluster > SCT_ClusterCollection
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
bool m_useDetectorElement
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...