ATLAS Offline Software
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 
11 
12 #include <vector>
13 
15 {
16  public:
17 
18  template<class T>
20 
22 
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 
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 
70 
71  typedef store_type::const_iterator store_Citer;
72 
74 
75 };
76 
77 #include "AthenaKernel/CLASS_DEF.h"
78 CLASS_DEF(EventShapeStore, 79242525, 1)
79 
80 #endif
81 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
EventShapeStore::store_Citer
store_type::const_iterator store_Citer
Definition: EventShapeStore.h:71
index
Definition: index.py:1
EventShapeStore::insert
void insert(EventShapes::EventShapeType type, std::vector< double > &values, bool canSwap=false)
Definition: EventShapeStore.h:54
skel.it
it
Definition: skel.GENtoEVGEN.py:396
EventShapes.h
athena.value
value
Definition: athena.py:124
EventShapeStore::insert
void insert(EventShapes::EventShapeType type, double value)
Definition: EventShapeStore.h:43
EventShapeStore::EventShapeStore
EventShapeStore()
Definition: EventShapeStore.h:21
EventShapeStore::m_store
store_type m_store
Definition: EventShapeStore.h:73
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
EventShapes
Definition: EventShapes.h:12
EventShapeStore::get
bool get(const EventShapes::EventShapeType &type, double &value, unsigned int index=0) const
Definition: EventShapeStore.cxx:8
EventShapeStore::store_iter
store_type::iterator store_iter
Definition: EventShapeStore.h:69
EventShapes::EventShapeType
EventShapeType
Definition: EventShapes.h:18
EventShapeStore
Definition: EventShapeStore.h:15
EventShapeStore::store_type
std::vector< EventShapes > store_type
Definition: EventShapeStore.h:63
EventShapes::getType
EventShapeType getType() const
Definition: EventShapes.h:64
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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:64
CLASS_DEF.h
macros to associate a CLID to a type
EventShapeStore::~EventShapeStore
~EventShapeStore()
Definition: EventShapeStore.h:23
EventShapeStore::insert
void insert(EventShapes &es)
Definition: EventShapeStore.h:32
EventShapeStoreConverterBase
Definition: EventShapeStoreConverterBase.h:10