Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "Identifier/Identifier.h"
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"
46 unsigned int idLast(0);
50 TRANS::const_iterator it_Coll = transCont->begin();
51 TRANS::const_iterator it_CollEnd = transCont->end();
52 unsigned int collIndex;
53 unsigned int chanBegin = 0;
54 unsigned int chanEnd = 0;
58 if (this->
initialize(log) != StatusCode::SUCCESS) {
65 persCont->
m_collections.resize(transCont->numberOfCollections());
70 for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++it_Coll) {
72 totSize+=collection.size();
79 for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
83 chanEnd += collection.size();
85 unsigned int deltaId = (collection.identifyHash()-idLast);
88 idLast=collection.identifyHash();
89 pcollection.
m_size = collection.size();
92 for (
unsigned int i = 0;
i < collection.size(); ++
i) {
106 if (this->
initialize(log) != StatusCode::SUCCESS) {
107 log <<
MSG::FATAL <<
"Could not initialize SCT_ClusterContainerCnv_p3 from persToTrans" <<
endmsg;
129 elements = sctDetEleHandle1.
cptr();
135 elements = sctDetEleHandle2.
cptr();
147 unsigned int collBegin(0);
150 unsigned int idLast(0);
152 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
163 unsigned int nchans = pcoll.
m_size;
164 coll->resize(nchans);
183 collBegin += pcoll.
m_size;
186 StatusCode sc = transCont->addCollection(coll, collIDHash);
187 if (
sc.isFailure()) {
188 throw std::runtime_error(
"Failed to add collection to ID Container");
202 if (this->
initialize(log) != StatusCode::SUCCESS) {
206 std::unique_ptr<InDet::SCT_ClusterContainer> trans(std::make_unique<InDet::SCT_ClusterContainer>(
m_sctId->
wafer_hash_max()));
208 return(trans.release());
217 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
226 return StatusCode::SUCCESS;
virtual void transToPers(const InDet::SCT_ClusterContainer *transCont, InDet::SCT_ClusterContainer_p3 *persCont, MsgStream &log)
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
std::vector< InDet::SCT_Cluster_p3 > m_rawdata
std::vector< Identifier::diff_type > m_prdDeltaId
Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer
std::vector< InDet::InDetPRD_Collection_p2 > m_collections
Exception — Can't retrieve CondCont from ReadCondHandle.
Identifier::diff_type calc_offset(const Identifier &base, const Identifier &target) const
Calculate a channel offset between the two identifiers.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(MsgStream &log)
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_ITkStripDetEleCollKey
void transToPers(const InDet::SCT_Cluster *, InDet::SCT_Cluster_p3 *, MsgStream &)
void setUseDetectorElement(const bool useDetectorElement)
#define CHECK(...)
Evaluate an expression and check for errors.
bool m_useDetectorElement
size_type wafer_hash_max(void) const
Helpers for checking error return status codes and reporting errors.
StatusCode initialize(bool used=true)
void setIdHelper(const SCT_ID *sct_id)
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
InDet::SCT_Cluster createSCT_Cluster(const InDet::SCT_Cluster_p3 *persObj, Identifier clusId, const InDetDD::SiDetectorElement *detEl, MsgStream &log)
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
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
virtual InDet::SCT_ClusterContainer * createTransient(const InDet::SCT_ClusterContainer_p3 *persObj, MsgStream &log)
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
virtual void persToTrans(const InDet::SCT_ClusterContainer_p3 *persCont, InDet::SCT_ClusterContainer *transCont, MsgStream &log)
const_pointer_type cptr()
Identifier strip_id_offset(const Identifier &base, Identifier::diff_type offset) const
Create an identifier with a given base and channel offset.