45 TRANS::const_iterator it_Coll = transCont->
begin();
46 TRANS::const_iterator it_CollEnd = transCont->
end();
47 unsigned int collIndex;
48 unsigned int chanBegin = 0;
49 unsigned int chanEnd = 0;
61 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
65 chanEnd += collection.
size();
69 pcollection.
m_begin = chanBegin;
70 pcollection.
m_end = chanEnd;
72 MSG_DEBUG(log,
"Writing collection number " << collIndex <<
" with hash" << pcollection.
m_hashId);
77 MSG_DEBUG(log,
"SCT_RawDataContainerCnv_p2 m_type is 1");
80 for (
unsigned int i = 0; i < collection.
size(); ++i) {
89 MSG_DEBUG(log,
"SCT_RawDataContainerCnv_p2 m_type is 3");
92 for (
unsigned int i = 0; i < collection.
size(); ++i) {
97 const std::vector<int>& errHit = chan->getErrorCondensedHit();
107 MSG_DEBUG(log,
" *** Writing SCT_RDO_Container (SCT1/3_RawData concrete type)");
134 log << MSG::FATAL <<
"The collection has mixed SCT1 and SCT3 elements, this is not allowed " <<
endmsg;
142 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
149 std::unique_ptr<SCT_RDO_Collection> coll = std::make_unique<SCT_RDO_Collection>(
IdentifierHash(collIDHash));
150 coll->setIdentifier(collID);
153 coll->resize(nchans);
156 <<
" and num el= " << nchans <<
" m_type is "<<
m_type);
159 for (
unsigned int ichan = 0; ichan < nchans; ++ ichan) {
162 std::unique_ptr<SCT1_RawData> chan = std::make_unique<SCT1_RawData>();
164 (*coll)[ichan] = chan.release();
169 std::vector<int> errorCondensedHit;
171 for ( ; errCount < errEnd ; ++errCount) {
174 std::unique_ptr<SCT3_RawData> chan = std::make_unique<SCT3_RawData>(
Identifier(pchan->
m_rdoId),
176 std::move(errorCondensedHit));
177 (*coll)[ichan] = chan.release();
183 if (
sc.isFailure()) {
184 throw std::runtime_error(
"Failed to add collection to ID Container");
186 MSG_VERBOSE(log,
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = "
187 << collIDHash.
value() <<
" / " << collID.
get_compact() <<
", added to Identifiable container.");
191 MSG_DEBUG(log,
" *** Reading SCT_RDO_Container (SCT1/3_RawData concrete type)");
198 MSG_DEBUG(log,
"creating transient SCT_RDO_Container");
200 std::unique_ptr<SCT_RDO_Container> trans(std::make_unique<SCT_RDO_Container>(
m_sctId->wafer_hash_max()));
202 return trans.release();
#define MSG_VERBOSE(log, x)
#define MSG_DEBUG(log, x)
This is an Identifier helper class for the SCT subdetector.
InDetRawDataCollection< SCT_RDORawData > SCT_RDO_Collection
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
size_type size() const noexcept
const_iterator end() const
return const_iterator for end of container
virtual size_t numberOfCollections() const override final
return number of collections
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
const_iterator begin() const
return const_iterator for first entry
This is a "hash" representation of an Identifier.
value_type get_compact() const
Get the compact id.
Identifier32::value_type m_id
IdentifierHash::value_type m_hashId
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
virtual void transToPers(const SCT1_RawData *transObj, InDetRawData_p1 *persObj, MsgStream &log)
virtual void persToTrans(const InDetRawData_p1 *persObj, SCT1_RawData *transObj, MsgStream &log)
virtual void transToPers(const SCT3_RawData *transObj, SCT3_RawData_p2 *persObj, MsgStream &log)
N.Barlow, Apr 2008 replace float[20] with vector<int> to represent strips with errors.
Identifier32::value_type m_rdoId
virtual SCT_RDO_Container * createTransient(const SCT_RawDataContainer_p2 *persObj, MsgStream &log)
virtual void transToPers(const SCT_RDO_Container *transCont, SCT_RawDataContainer_p2 *persCont, MsgStream &log)
virtual void persToTrans(const SCT_RawDataContainer_p2 *persCont, SCT_RDO_Container *transCont, MsgStream &log)
Persistent represenation of an SCT_RawDataContainer.
std::vector< SCT3_RawData_p2 > m_sct3data
std::vector< InDetRawDataCollection_p1 > m_collections
std::vector< InDetRawData_p1 > m_rawdata
std::vector< int > m_numErrorsInRDO
std::vector< int > m_allErrorsInContainer
because ROOT isn't good at storing vectors of vectors, store the individual strip errors in the persi...