ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloEvent
CaloEvent
CaloCellClusterWeights.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
3
4
#ifndef CALOEVENT_CALOCELLCLUSTERWEIGHTS_H
5
#define CALOEVENT_CALOCELLCLUSTERWEIGHTS_H
6
7
#include "
AthenaKernel/CLASS_DEF.h
"
8
9
#include <string>
10
#include <vector>
11
#include <tuple>
12
13
class
CaloCell
;
14
22
class
CaloCellClusterWeights
23
{
24
public
:
25
28
typedef
std::vector<double>
weight_t
;
29
typedef
std::tuple<bool,weight_t>
value_t
;
30
typedef
std::vector<value_t>
store_t
;
31
typedef
store_t::const_iterator
const_iterator
;
32
typedef
store_t::iterator
iterator
;
34
39
CaloCellClusterWeights
();
45
CaloCellClusterWeights
(
size_t
size
);
47
CaloCellClusterWeights
(
const
CaloCellClusterWeights
& cellClusterWeights);
49
virtual
~CaloCellClusterWeights
();
50
57
const
weight_t
&
operator[]
(
size_t
hash)
const
;
62
const
weight_t
&
at
(
size_t
hash)
const
;
67
const
weight_t
&
at
(
const
CaloCell
* pCell)
const
;
71
bool
check
(
size_t
hash)
const
;
75
bool
check
(
const
CaloCell
* pCell)
const
;
79
bool
fastCheck
(
size_t
hash)
const
;
83
bool
fastCheck
(
const
CaloCell
* pCell)
const
;
85
93
void
set
(
size_t
hash,
double
value);
99
void
set
(
const
CaloCell
* pCell,
double
value);
103
void
reset
();
107
void
clear
();
112
void
clear
(
size_t
hash);
114
117
size_t
size
()
const
;
118
size_t
reserve
()
const
;
120
123
const_iterator
begin
()
const
;
124
const_iterator
end
()
const
;
125
iterator
begin
();
126
iterator
end
();
128
131
const
store_t
&
store
()
const
;
132
store_t
&
store
();
134
136
static
std::string
key
(
const
std::string&
pref
);
137
138
private
:
139
140
store_t
m_hashTable
;
141
weight_t
m_defaultValue
{
weight_t
() };
142
};
143
144
//CLASS_DEF( CaloCellClusterWeights, 249044352, 1 )
145
146
inline
CaloCellClusterWeights::const_iterator
CaloCellClusterWeights::begin
()
const
{
return
m_hashTable
.begin(); }
147
inline
CaloCellClusterWeights::iterator
CaloCellClusterWeights::begin
() {
return
m_hashTable
.begin(); }
148
149
inline
CaloCellClusterWeights::const_iterator
CaloCellClusterWeights::end
()
const
{
return
m_hashTable
.end(); }
150
inline
CaloCellClusterWeights::iterator
CaloCellClusterWeights::end
() {
return
m_hashTable
.end(); }
151
152
inline
size_t
CaloCellClusterWeights::size
()
const
{
return
m_hashTable
.size(); }
153
inline
size_t
CaloCellClusterWeights::reserve
()
const
{
return
m_hashTable
.capacity(); }
154
155
inline
const
CaloCellClusterWeights::store_t
&
CaloCellClusterWeights::store
()
const
{
return
m_hashTable
; }
156
inline
CaloCellClusterWeights::store_t
&
CaloCellClusterWeights::store
() {
return
m_hashTable
; }
157
158
inline
std::string
CaloCellClusterWeights::key
(
const
std::string&
pref
) {
return
pref
+std::string(
"_CCW"
); }
159
#endif
CLASS_DEF.h
macros to associate a CLID to a type
pref
static Double_t * pref
Definition
LArPhysWaveHECTool.cxx:39
CaloCellClusterWeights::check
bool check(size_t hash) const
Safe checking if cell is used by any cluster.
Definition
CaloCellClusterWeights.cxx:38
CaloCellClusterWeights::CaloCellClusterWeights
CaloCellClusterWeights()
Default constructor.
Definition
CaloCellClusterWeights.cxx:18
CaloCellClusterWeights::key
static std::string key(const std::string &pref)
Construct a SG key for this object.
Definition
CaloCellClusterWeights.h:158
CaloCellClusterWeights::value_t
std::tuple< bool, weight_t > value_t
Type of payload.
Definition
CaloCellClusterWeights.h:29
CaloCellClusterWeights::reset
void reset()
Reset the store.
Definition
CaloCellClusterWeights.cxx:59
CaloCellClusterWeights::const_iterator
store_t::const_iterator const_iterator
Iterator type for const access.
Definition
CaloCellClusterWeights.h:31
CaloCellClusterWeights::iterator
store_t::iterator iterator
Iterator type.
Definition
CaloCellClusterWeights.h:32
CaloCellClusterWeights::fastCheck
bool fastCheck(size_t hash) const
Fast checking if cell is used by any cluster.
Definition
CaloCellClusterWeights.cxx:36
CaloCellClusterWeights::weight_t
std::vector< double > weight_t
Type of weight.
Definition
CaloCellClusterWeights.h:28
CaloCellClusterWeights::reserve
size_t reserve() const
Reserved memory.
Definition
CaloCellClusterWeights.h:153
CaloCellClusterWeights::m_defaultValue
weight_t m_defaultValue
Default (empty) entry.
Definition
CaloCellClusterWeights.h:141
CaloCellClusterWeights::begin
const_iterator begin() const
Constant access iterator pointing to beginning of the store.
Definition
CaloCellClusterWeights.h:146
CaloCellClusterWeights::end
const_iterator end() const
Constant iterator indicating the end of the store.
Definition
CaloCellClusterWeights.h:149
CaloCellClusterWeights::~CaloCellClusterWeights
virtual ~CaloCellClusterWeights()
Destructor.
CaloCellClusterWeights::size
size_t size() const
Store size.
Definition
CaloCellClusterWeights.h:152
CaloCellClusterWeights::store
const store_t & store() const
Read-only access to underlying store.
Definition
CaloCellClusterWeights.h:155
CaloCellClusterWeights::at
const weight_t & at(size_t hash) const
Accessing value using function and hash.
Definition
CaloCellClusterWeights.cxx:31
CaloCellClusterWeights::m_hashTable
store_t m_hashTable
Store implementation.
Definition
CaloCellClusterWeights.h:140
CaloCellClusterWeights::clear
void clear()
Clear the store.
Definition
CaloCellClusterWeights.cxx:55
CaloCellClusterWeights::store_t
std::vector< value_t > store_t
Store type.
Definition
CaloCellClusterWeights.h:30
CaloCellClusterWeights::set
void set(size_t hash, double value)
Definition
CaloCellClusterWeights.cxx:41
CaloCellClusterWeights::operator[]
const weight_t & operator[](size_t hash) const
Definition
CaloCellClusterWeights.cxx:29
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
Generated on
for ATLAS Offline Software by
1.17.0