ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_RDO_ContainerCnv_p0.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8
12
13//================================================================
15 std::unique_ptr<SCT_RDO_Container> trans(std::make_unique<SCT_RDO_Container>(m_sctId->wafer_hash_max()));
16
19 for (; it != last; ++it) {
20
21 // Old persistent format used collection templated on the specific raw data type
22 const InDetRawDataCollection<SCT1_RawData>* rdoCollOld = *it;
23
24 if (rdoCollOld==nullptr) {
25 throw std::runtime_error("Got nullptr of collection reading old format SCT_RDO_Container");
26 }
27
28 // Ugly cast... The new format does not need it in its converters.
29 const InDetRawDataCollection<SCT_RDORawData>* rdoColl = reinterpret_cast<const InDetRawDataCollection<SCT_RDORawData> *>(rdoCollOld);
30
31 // Add to the container
32 if (trans->addCollection( rdoColl, rdoColl->identifyHash() ).isFailure()) {
33 log << MSG::FATAL << "[p0] SCT RDOs could not be added to the container!" << endmsg;
34 throw std::runtime_error("SCT_RDO_ContainerCnv_p0::createTransient(): SCT RDOs could not be added to the container!");
35 }
36 }
37
38 return trans.release();
39}
40
41//================================================================
#define endmsg
This is an Identifier helper class for the SCT subdetector.
DataVector< InDetRawDataCollection< SCT1_RawData > > SCT_RDO_Container_p0
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual IdentifierHash identifyHash() const override final
virtual SCT_RDO_Container * createTransient(const SCT_RDO_Container_p0 *persObj, MsgStream &log)