ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
InDetEventAthenaPool
src
TRT_RDO_ContainerCnv_p0.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Andrei Gaponenko <agaponenko@lbl.gov>, 2006
6
7
#include "
TRT_RDO_ContainerCnv_p0.h
"
8
9
#include "
InDetRawData/TRT_RDO_Container.h
"
10
#include "
InDetIdentifier/TRT_ID.h
"
11
#include "
MsgUtil.h
"
12
13
#include <string>
14
#include <iostream>
15
#include <sstream>
16
17
18
//================================================================
19
TRT_RDO_Container
*
TRT_RDO_ContainerCnv_p0::createTransient
(
const
TRT_RDO_Container_p0
* persObj, MsgStream& log) {
20
std::unique_ptr<TRT_RDO_Container> trans(std::make_unique<TRT_RDO_Container>(
m_trtId
->straw_layer_hash_max()));
21
22
MSG_DEBUG
(log,
"Read RDO vector, size "
<< persObj->
size
());
23
24
TRT_RDO_Container_p0::const_iterator
it = persObj->
begin
();
25
TRT_RDO_Container_p0::const_iterator
last = persObj->
end
();
26
for
(; it != last; ++it) {
27
28
// Old persistent format used collection templated on the specific raw data type
29
const
InDetRawDataCollection<TRT_LoLumRawData>
* rdoCollOld = *it;
30
31
if
(!rdoCollOld) {
32
throw
std::runtime_error(
"Got NULL collection reading old format TRT_RDO_Container"
);
33
}
34
35
// Ugly cast... The new format does not need it in its converters.
36
const
InDetRawDataCollection<TRT_RDORawData>
* rdoColl =
reinterpret_cast<
const
InDetRawDataCollection<TRT_RDORawData>
*
>
(rdoCollOld);
37
38
// Add to the container
39
if
(trans->addCollection( rdoColl, rdoColl->
identifyHash
() ).isFailure()) {
40
log << MSG::FATAL <<
"[p0] TRT RDOs could not be added to the container!"
<<
endmsg
;
41
throw
std::runtime_error(
"TRT_RDO_ContainerCnv_p0::createTransient(): TRT RDOs could not be added to the container!"
);
42
}
43
}
44
45
return
(trans.release());
46
}
47
48
//================================================================
49
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MsgUtil.h
MSG_DEBUG
#define MSG_DEBUG(log, x)
Definition
MsgUtil.h:16
TRT_ID.h
This is an Identifier helper class for the TRT subdetector.
TRT_RDO_ContainerCnv_p0.h
TRT_RDO_Container_p0
DataVector< InDetRawDataCollection< TRT_LoLumRawData > > TRT_RDO_Container_p0
Definition
TRT_RDO_ContainerCnv_p0.h:16
TRT_RDO_Container.h
TRT_RDO_Container
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
Definition
TRT_RDO_Container.h:26
DataVector< InDetRawDataCollection< TRT_LoLumRawData > >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
InDetRawDataCollection
Definition
InDetRawDataCollection.h:31
InDetRawDataCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
TRT_RDO_ContainerCnv_p0::m_trtId
const TRT_ID * m_trtId
Definition
TRT_RDO_ContainerCnv_p0.h:20
TRT_RDO_ContainerCnv_p0::createTransient
virtual TRT_RDO_Container * createTransient(const TRT_RDO_Container_p0 *persObj, MsgStream &log)
Definition
TRT_RDO_ContainerCnv_p0.cxx:19
Generated on
for ATLAS Offline Software by
1.17.0