ATLAS Offline Software
Loading...
Searching...
No Matches
PixelRDO_ContainerCnv_p0.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
10
11#include "MsgUtil.h"
12
13#include <string>
14#include <iostream>
15#include <sstream>
16
17
18//================================================================
20 std::unique_ptr<PixelRDO_Container> trans(std::make_unique<PixelRDO_Container>(m_pixId->wafer_hash_max()));
21
22 MSG_DEBUG(log,"Read RDO vector, size " << persObj->size());
23
26 for (; it != last; ++it) {
27
28 // Old persistent format used collection templated on the specific raw data type
29 const InDetRawDataCollection<Pixel1RawData>* rdoCollOld = *it;
30
31 if(!rdoCollOld) {
32 throw std::runtime_error("Got NULL collection reading old format PixelRDO_Container");
33 }
34
35 // Ugly cast... The new format does not need it in its converters.
36 const InDetRawDataCollection<PixelRDORawData>* rdoColl = reinterpret_cast<const InDetRawDataCollection<PixelRDORawData> *>(rdoCollOld);
37
38 // Add to the container
39 if (trans->addCollection( rdoColl, rdoColl->identifyHash() ).isFailure()) {
40 log << MSG::FATAL << "[p0] Pixel RDOs could not be added to the container!" << endmsg;
41 throw std::runtime_error("PixelRDO_ContainerCnv_p0::createTransient(): Pixel RDOs could not be added to the container!");
42 }
43 }
44
45 return(trans.release());
46}
47
48//================================================================
49
50
#define endmsg
#define MSG_DEBUG(log, x)
Definition MsgUtil.h:15
This is an Identifier helper class for the Pixel subdetector.
DataVector< InDetRawDataCollection< Pixel1RawData > > PixelRDO_Container_p0
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_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.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual IdentifierHash identifyHash() const override final
virtual PixelRDO_Container * createTransient(const PixelRDO_Container_p0 *persObj, MsgStream &log)