39 TRANS::const_iterator it_Coll = transCont->
begin();
40 TRANS::const_iterator it_CollEnd = transCont->
end();
48 for (
size_t collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
52 chanEnd += collection.
size();
53 if(collIndex >= numColl) log << MSG::ERROR <<
"Accessing collIndex " << collIndex <<
"/" << numColl <<
endmsg;
58 pcollection.
m_begin = chanBegin;
59 pcollection.
m_end = chanEnd;
62 for (
size_t i = 0; i < collection.
size(); ++i) {
65 if (
nullptr == chan) {
66 throw std::runtime_error(
67 "Pixel1RawDataContainerCnv_p2::transToPers: *** UNABLE TO "
68 "DYNAMIC CAST TO Pixel1RawData");
73 MSG_DEBUG(log,
" *** Writing PixelRDO_Container (Pixel1RawData concrete type)");
95 std::vector<size_t> chans_per_collection{};
96 chans_per_collection.reserve(numCollections);
97 size_t totalChannels = 0;
99 MSG_DEBUG(log,
" Reading " << numCollections <<
"Collections");
102 chans_per_collection.push_back(nchans);
103 totalChannels += nchans;
106 dataItems.
reserve(totalChannels);
108 for (
size_t icoll = 0; icoll < numCollections; ++icoll) {
116 size_t nchans = chans_per_collection[icoll];
119 for (
size_t ichan = 0; ichan < nchans; ++ichan) {
124 (*coll)[ichan] = chan;
128 if (
sc.isFailure()) {
129 throw std::runtime_error(
130 "Failed to add collection to ID Container");
135 " *** Reading PixelRDO_Container (Pixel1RawData concrete type)");
140 std::unique_ptr<PixelRDO_Container> trans(std::make_unique<PixelRDO_Container>(
m_pixId->wafer_hash_max()));
142 return(trans.release());
#define MSG_DEBUG(log, x)
This is an Identifier helper class for the Pixel subdetector.
InDetRawDataCollection< PixelRDORawData > PixelRDO_Collection
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
a typed memory pool that saves time spent allocation small object.
void reserve(unsigned int size)
Set the desired capacity.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
void resize(size_type sz)
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
value_type get_compact() const
Get the compact id.
This is a "hash" representation of an Identifier.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Identifier32::value_type m_id
IdentifierHash::value_type m_hashId
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
void setIdentifier(Identifier id)
std::vector< InDetRawDataCollection_p1 > m_collections
std::vector< InDetRawData_p2 > m_rawdata
virtual void transToPers(const Pixel1RawData *transObj, InDetRawData_p2 *persObj, MsgStream &log)
virtual void persToTrans(const InDetRawData_p2 *persObj, Pixel1RawData *transObj, MsgStream &log)
virtual void persToTrans(const InDetRawDataContainer_p2 *persCont, PixelRDO_Container *transCont, MsgStream &log)
virtual void transToPers(const PixelRDO_Container *transCont, InDetRawDataContainer_p2 *persCont, MsgStream &log)
virtual PixelRDO_Container * createTransient(const InDetRawDataContainer_p2 *persObj, MsgStream &log)
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts