ATLAS Offline Software
Loading...
Searching...
No Matches
MissingETContainer_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7#include <functional>
8
9using namespace xAOD;
10
14
19
22
23
24const MissingET_v1* MissingETContainer_v1::operator[](const std::string& name) const
25{
26 const_iterator fObj(this->find(name));
27 return fObj != this->end() ? *fObj : (const MissingET_v1*)nullptr;
28}
29
31{
32 iterator fObj(this->find(name));
33 return fObj != this->end() ? *fObj : (MissingET_v1*)nullptr;
34}
35
36// MissingETContainer_v1::const_iterator MissingETContainer_v1::find(const std::string& name) const
37// {
38// const_iterator fObj(this->begin());
39// const_iterator lObj(this->end());
40// while ( fObj != lObj && (*fObj)->name() != name ) { ++fObj; }
41// return fObj;
42// }
43
44// MissingETContainer_v1::iterator MissingETContainer_v1::find(const std::string& name)
45// {
46// iterator fObj(this->begin());
47// iterator lObj(this->end());
48// while ( fObj != lObj && (*fObj)->name() != name ) { ++fObj; }
49// return fObj;
50// }
51
53{
54 const_iterator fObj(this->begin());
55 const_iterator lObj(this->end());
56 size_t hash_tmp = std::hash<std::string>()(name);
57 while ( fObj != lObj && (*fObj)->nameHash() != hash_tmp ) { ++fObj; }
58 return fObj;
59}
60
62{
63 iterator fObj(this->begin());
64 iterator lObj(this->end());
65 size_t hash_tmp = std::hash<std::string>()(name);
66 while ( fObj != lObj && (*fObj)->nameHash() != hash_tmp ) { ++fObj; }
67 return fObj;
68}
69
71{
72 const_iterator fObj(this->begin());
73 const_iterator lObj(this->end());
74 while ( fObj != lObj && !MissingETBase::Source::hasPattern((*fObj)->source(),src) ) { ++fObj; }
75 return fObj;
76}
77
79{
80 iterator fObj(this->begin());
81 iterator lObj(this->end());
82 while ( fObj != lObj && !MissingETBase::Source::hasPattern((*fObj)->source(),src) ) { ++fObj; }
83 return fObj;
84}
85
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
const_iterator end() const noexcept
const_iterator begin() const noexcept
SG::OwnershipPolicy ownPolicy() const
const_iterator find(const std::string &name) const
Find non-modifiable MET object by name.
const MissingET_v1 * operator[](const std::string &name) const
Allocate a non-modifiable xAOD::MissingET_v1 object by name.
MissingETContainer_v1(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
Default constructor.
virtual ~MissingETContainer_v1()
Base class destructor.
Principal data object for Missing ET.
uint64_t bitmask_t
Type for status word bit mask.
OwnershipPolicy
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static bool hasPattern(E bits, F mask)
Generic check for given pattern.