ATLAS Offline Software
Reconstruction
EventShapes
EventShapeTPCnv
src
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
6
#include "
DataModelAthenaPool/ElementLinkCnv_p1.h
"
7
#include "
DataModelAthenaPool/ElementLinkVectorCnv_p1.h
"
8
#include "
DataModelAthenaPool/DataLinkCnv_p1.h
"
9
10
#include "
EventShapeTPCnv/EventShapeStoreCnv_p2.h
"
11
12
#include "
EventShapeEvent/EventShapeStore.h
"
13
14
void
15
EventShapeStoreCnv_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
33
void
34
EventShapeStoreCnv_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
}
ElementLinkCnv_p1.h
This file contains the class definition for the ElementLinkCnv_p1 class.
EventShapeStoreConverterBase< EventShapeStore_p2 >::persToTrans
void persToTrans(const EventShapeStore_p2 *persObj, EventShapeStore *transObj, MsgStream &reporter)
Definition:
EventShapeStoreCnv_p2.cxx:34
DataLinkCnv_p1.h
This file contains the class definition for the DataLinkCnv_p1 class and DataLinkVectorCnv_p1 class.
index
Definition:
index.py:1
EventShapeStore_p2::m_mtypV
std::vector< unsigned int > m_mtypV
Definition:
EventShapeStore_p2.h:18
ElementLinkVectorCnv_p1.h
This file contains the class definition for the ElementLinkVectorCnv_p1 class. NOTE: it should be inc...
EventShapeStore_p2
Definition:
EventShapeStore_p2.h:11
EventShapeStoreConverterBase< EventShapeStore_p2 >::transToPers
void transToPers(const EventShapeStore *transObj, EventShapeStore_p2 *persObj, MsgStream &reporter)
Method creating the persistent representation EventShapeStore_p2 from its transient representation Ev...
Definition:
EventShapeStoreCnv_p2.cxx:15
EventShapeStore::m_store
store_type m_store
Definition:
EventShapeStore.h:73
lumiFormat.i
int i
Definition:
lumiFormat.py:85
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
EventShapeStoreCnv_p2.h
EventShapeStore_p2::m_mvalM
std::vector< std::vector< float > > m_mvalM
Definition:
EventShapeStore_p2.h:23
EventShapes::EventShapeType
EventShapeType
Definition:
EventShapes.h:18
DeMoUpdate.tmp
string tmp
Definition:
DeMoUpdate.py:1167
EventShapeStore
Definition:
EventShapeStore.h:15
DeMoScan.index
string index
Definition:
DeMoScan.py:364
EventShapeStore.h
DEBUG
#define DEBUG
Definition:
page_access.h:11
EventShapeStore::insert
void insert(EventShapes &es)
Definition:
EventShapeStore.h:32
Generated on Mon Dec 23 2024 21:10:21 for ATLAS Offline Software by
1.8.18