ATLAS Offline Software
HAuxContainerCnv_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
14 #include "HAuxContainerCnv_v1.h"
18 
19 
20 namespace DMTest {
21 
22 
24 {
25 }
26 
27 
29  DMTest::HAuxContainer* newObj,
30  MsgStream& /*log*/ )
31 {
32  newObj->resize(0);
33 
34  DMTest::HVec_v1 oldInt;
35  for (size_t i = 0; i < oldObj->size(); i++)
36  oldInt.push_back (new DMTest::H_v1);
37  oldInt.setStore (oldObj);
38 
39  DMTest::HVec newInt;
40  newInt.setStore (newObj);
41 
42  for( const DMTest::H_v1* oldh : oldInt ) {
43  DMTest::H* newh = new DMTest::H;
44  newInt.push_back( newh );
45 
46  newh->setAFloat (oldh->anInt() + 0.5);
47  }
48 }
49 
50 
53  MsgStream& )
54 {
55  std::abort();
56 }
57 
58 
59 } // namespace DMTest
DMTest::HAuxContainerCnv_v1::transToPers
virtual void transToPers(const DMTest::HAuxContainer *, DMTest::HAuxContainer_v1 *, MsgStream &log) override
Definition: HAuxContainerCnv_v1.cxx:51
DMTest::H_v2::setAFloat
void setAFloat(float i)
DMTest::HAuxContainer_v2
Definition: HAuxContainer_v2.h:28
H.h
Test for xAOD schema evolution.
DMTest::HAuxContainerCnv_v1::HAuxContainerCnv_v1
HAuxContainerCnv_v1()
Definition: HAuxContainerCnv_v1.cxx:23
DMTest::H_v1
Definition: DataModelTestDataRead/DataModelTestDataRead/versions/H_v1.h:30
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: AuxContainerBase.cxx:504
DMTest::HAuxContainer_v1
Definition: DataModelTestDataRead/DataModelTestDataRead/versions/HAuxContainer_v1.h:27
DMTest::HAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const DMTest::HAuxContainer_v1 *oldObj, DMTest::HAuxContainer *newObj, MsgStream &log) override
Definition: HAuxContainerCnv_v1.cxx:28
HVec.h
xAOD::AuxContainerBase::size
virtual size_t size() const override
Get the size of the container.
Definition: AuxContainerBase.cxx:429
HVec_v1.h
Test for xAOD schema evolution.
lumiFormat.i
int i
Definition: lumiFormat.py:85
HAuxContainerCnv_v1.h
Test for xAOD schema evolution.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DMTest::H
H_v2 H
Definition: DataModelTestDataRead/DataModelTestDataRead/H.h:26
DMTest
Definition: B.h:23
DMTest::H_v2
Definition: H_v2.h:30