|
ATLAS Offline Software
|
Go to the documentation of this file.
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);
80 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
83 if (
nullptr ==
chan)
throw std::runtime_error(
"SCT_RawDataContainerCnv_p3::transToPers: *** UNABLE TO DYNAMIC CAST TO SCT1_RawData");
91 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
94 if (
nullptr ==
chan)
throw std::runtime_error(
"SCT_RawDataContainerCnv_p3::transToPers: *** UNABLE TO DYNAMIC CAST TO SCT3_RawData");
96 const std::vector<int>& errHit =
chan->getErrorCondensedHit();
105 MSG_DEBUG(
log,
" *** Writing SCT_RDO_Container (SCT1/3_RawData concrete type)");
132 log <<
MSG::FATAL <<
"The collection has mixed SCT1 and SCT3 elements, this is not allowed " <<
endmsg;
140 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
147 std::unique_ptr<SCT_RDO_Collection> coll = std::make_unique<SCT_RDO_Collection>(
IdentifierHash(collIDHash));
154 <<
" and num el= " << nchans <<
" m_type is "<<
m_type);
160 std::unique_ptr<SCT1_RawData>
chan = std::make_unique<SCT1_RawData>();
167 std::vector<int> errorCondensedHit;
169 for ( ; errCount < errEnd ; ++errCount) {
174 std::move (errorCondensedHit));
181 if (
sc.isFailure()) {
182 throw std::runtime_error(
"Failed to add collection to ID Container");
184 MSG_VERBOSE(
log,
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = "
185 << collIDHash.
value() <<
" / " << collID.
get_compact() <<
", added to Identifiable container.");
189 MSG_DEBUG(
log,
" *** Reading SCT_RDO_Container (SCT1/3_RawData concrete type)");
198 std::unique_ptr<SCT_RDO_Container> trans(std::make_unique<SCT_RDO_Container>(
m_sctId->
wafer_hash_max()));
200 return trans.release();
virtual void transToPers(const SCT_RDO_Container *transCont, SCT_RawDataContainer_p3 *persCont, MsgStream &log)
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
void setIdentifier(Identifier id)
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,...
unsigned int value() const
virtual void transToPers(const SCT1_RawData *transObj, InDetRawData_p2 *persObj, MsgStream &log)
virtual Identifier identify() const override final
virtual void persToTrans(const SCT_RawDataContainer_p3 *persCont, SCT_RDO_Container *transCont, MsgStream &log)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
value_type get_compact() const
Get the compact id.
IdentifierHash::value_type m_hashId
virtual void persToTrans(const InDetRawData_p2 *persObj, SCT1_RawData *transObj, MsgStream &log)
std::vector< InDetRawData_p2 > m_rawdata
value_type get_compact() const
Get the compact id.
Identifier32::value_type m_id
std::vector< InDetRawDataCollection_p1 > m_collections
virtual IdentifierHash identifyHash() const override final
virtual size_t numberOfCollections() const override final
return number of collections
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual void transToPers(const SCT3_RawData *transObj, SCT3_RawData_p3 *persObj, MsgStream &log)
std::vector< int > m_numErrorsInRDO
std::vector< SCT3_RawData_p3 > m_sct3data
virtual SCT_RDO_Container * createTransient(const SCT_RawDataContainer_p3 *persObj, MsgStream &log)
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
std::vector< int > m_allErrorsInContainer
because ROOT isn't good at storing vectors of vectors, store the individual strip errors in the persi...
void resize(size_type sz)
Resizes the collection to the specified number of elements.
size_type wafer_hash_max(void) const
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
#define MSG_VERBOSE(log, x)
#define MSG_DEBUG(log, x)
N.Barlow, Apr 2008 replace float[20] with vector<int> to represent strips with errors.
Identifier::value_type m_rdoId
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Persistent represenation of an SCT_RawDataContainer.
size_type size() const noexcept
Returns the number of elements in the collection.