ATLAS Offline Software
Loading...
Searching...
No Matches
EventShapeStoreCnv_p2.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
9
11
13
14void
15EventShapeStoreCnv_p2::transToPers(const EventShapeStore* transObj,
16 EventShapeStore_p2* persObj,
17 MsgStream &reporter )
18{
19 reporter << MSG::DEBUG << "EventShapeStoreCnv_p2 toPers()" << endmsg;
20
21 persObj->m_mvalM.resize(transObj->m_store.size());
22 // for ( EventShapeStore::store_Citer it = transObj->m_store.begin();
23 // it != transObj->m_store.end(); ++it )
24 for ( unsigned int index(0); index < transObj->m_store.size(); ++index )
25 {
26 persObj->m_mtypV.push_back( transObj->m_store[index].getType() );
27 persObj->m_mvalM[index].resize(transObj->m_store[index].m_values.size());
28 for( unsigned int i=0; i < transObj->m_store[index].m_values.size(); ++i )
29 persObj->m_mvalM[index][i] = transObj->m_store[index].getValue(i);
30 }
31}
32
33void
34EventShapeStoreCnv_p2::persToTrans(const EventShapeStore_p2* persObj,
35 EventShapeStore* transObj,
36 MsgStream &reporter )
37{
38 reporter << MSG::DEBUG << "EventShapeStoreCnv toTrans()" << endmsg;
39
40 // make coverity happy
41 // if ( ! bool(transObj) )
42 // transObj = new EventShapeStore();
43 transObj->m_store.clear();
44
45 // if ( persObj->m_mtypV.size() != persObj->m_mvalV.size() )
46 // reporter << MSG::WARNING << "EventShapeStore_p2 different sizes !!" << endmsg;
47 std::vector<double> tmp;
48
49 for ( unsigned int i = 0; i < persObj->m_mtypV.size(); ++i ) // loop through every ES type for type and value vectors
50 {
51 tmp.resize(persObj->m_mvalM[i].size());
52 for (unsigned int j(0); j < persObj->m_mvalM[i].size(); ++j)
53 tmp[j] = persObj->m_mvalM[i][j];
54 transObj->insert(EventShapes::EventShapeType(persObj->m_mtypV.at(i)), tmp, true);
55 }
56}
#define endmsg
This file contains the class definition for the DataLinkCnv_p1 class and DataLinkVectorCnv_p1 class.
This file contains the class definition for the ElementLinkCnv_p1 class.
This file contains the class definition for the ElementLinkVectorCnv_p1 class.
std::vector< std::vector< float > > m_mvalM
std::vector< unsigned int > m_mtypV
void insert(EventShapes &es)
str index
Definition DeMoScan.py:362