ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
EventShapes
EventShapeEvent
EventShapeEvent
EventShapeStore.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef EVENTSHAPES_EVENTSHAPESTORE_H
8
#define EVENTSHAPES_EVENTSHAPESTORE_H
9
10
#include "
EventShapeEvent/EventShapes.h
"
11
12
#include <vector>
13
14
class
EventShapeStore
15
{
16
public
:
17
18
template
<
class
T>
19
friend
class
EventShapeStoreConverterBase
;
20
21
EventShapeStore
() {};
22
23
~EventShapeStore
() {};
24
25
bool
get
(
const
EventShapes::EventShapeType
&
type
,
double
& value,
unsigned
int
index
= 0)
const
;
26
27
// bool get(const EventShapes::EventShapeType& type,
28
// std::vector<double>& values, unsigned int index = 0);
29
// bool get(const EventShapes::EventShapeType& type,
30
// std::vector<std::vector<double> >& valueBlock);
31
32
void
insert
(
EventShapes
&es)
33
{
34
for
(
store_iter
it=
m_store
.begin(); it!=
m_store
.end(); it++ )
35
if
(it->getType()==es.
getType
())
36
{
37
it->swapValues( es );
38
return
;
39
}
40
m_store
.push_back(es);
41
};
42
43
void
insert
(
EventShapes::EventShapeType
type
,
double
value)
44
{
45
for
(
store_iter
it=
m_store
.begin(); it!=
m_store
.end(); it++ )
46
if
(it->getType()==
type
)
47
{
48
it->setValue(value);
49
return
;
50
}
51
m_store
.push_back(
EventShapes
(
type
,value));
52
};
53
54
void
insert
(
EventShapes::EventShapeType
type
, std::vector<double>& values,
bool
canSwap =
false
)
55
{
56
for
(
store_iter
it=
m_store
.begin(); it!=
m_store
.end(); it++ )
57
if
(it->getType()==
type
)
58
{
59
it->setValues(values, canSwap);
60
return
;
61
}
62
m_store
.push_back(
EventShapes
(
type
, values, canSwap));
63
};
64
65
private
:
66
67
typedef
std::vector<EventShapes>
store_type
;
68
69
typedef
store_type::iterator
store_iter
;
70
71
typedef
store_type::const_iterator
store_Citer
;
72
73
store_type
m_store
;
74
75
};
76
77
#include "
AthenaKernel/CLASS_DEF.h
"
78
CLASS_DEF
(
EventShapeStore
, 79242525, 1)
79
80
#endif
81
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
EventShapes.h
EventShapeStore
Definition
EventShapeStore.h:15
EventShapeStore::get
bool get(const EventShapes::EventShapeType &type, double &value, unsigned int index=0) const
Definition
EventShapeStore.cxx:8
EventShapeStore::store_Citer
store_type::const_iterator store_Citer
Definition
EventShapeStore.h:71
EventShapeStore::store_type
std::vector< EventShapes > store_type
Definition
EventShapeStore.h:67
EventShapeStore::insert
void insert(EventShapes &es)
Definition
EventShapeStore.h:32
EventShapeStore::EventShapeStoreConverterBase
friend class EventShapeStoreConverterBase
Definition
EventShapeStore.h:19
EventShapeStore::m_store
store_type m_store
Definition
EventShapeStore.h:73
EventShapeStore::insert
void insert(EventShapes::EventShapeType type, double value)
Definition
EventShapeStore.h:43
EventShapeStore::EventShapeStore
EventShapeStore()
Definition
EventShapeStore.h:21
EventShapeStore::store_iter
store_type::iterator store_iter
Definition
EventShapeStore.h:69
EventShapeStore::~EventShapeStore
~EventShapeStore()
Definition
EventShapeStore.h:23
EventShapeStore::insert
void insert(EventShapes::EventShapeType type, std::vector< double > &values, bool canSwap=false)
Definition
EventShapeStore.h:54
EventShapes
Definition
EventShapes.h:12
EventShapes::EventShapeType
EventShapeType
Definition
EventShapes.h:18
EventShapes::getType
EventShapeType getType() const
Definition
EventShapes.h:64
index
Definition
index.py:1
type
Generated on
for ATLAS Offline Software by
1.17.0