ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
DataLinkCnv_p1.h
This file contains the class definition for the DataLinkCnv_p1 class and DataLinkVectorCnv_p1 class.
ElementLinkCnv_p1.h
This file contains the class definition for the ElementLinkCnv_p1 class.
ElementLinkVectorCnv_p1.h
This file contains the class definition for the ElementLinkVectorCnv_p1 class.
EventShapeStoreCnv_p2.h
EventShapeStore.h
EventShapeStoreConverterBase< EventShapeStore_p2 >::persToTrans
void persToTrans(const EventShapeStore_p2 *persObj, EventShapeStore *transObj, MsgStream &reporter)
Definition
EventShapeStoreCnv_p2.cxx:34
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_p2
Definition
EventShapeStore_p2.h:11
EventShapeStore_p2::m_mvalM
std::vector< std::vector< float > > m_mvalM
Definition
EventShapeStore_p2.h:23
EventShapeStore_p2::m_mtypV
std::vector< unsigned int > m_mtypV
Definition
EventShapeStore_p2.h:22
EventShapeStore
Definition
EventShapeStore.h:15
EventShapeStore::insert
void insert(EventShapes &es)
Definition
EventShapeStore.h:32
EventShapeStore::m_store
store_type m_store
Definition
EventShapeStore.h:73
EventShapes::EventShapeType
EventShapeType
Definition
EventShapes.h:18
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0