ATLAS Offline Software
Tracking
Acts
ActsGeometry
ActsGeometry
ActsElementVector.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
/*
3
* Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
4
*/
13
#ifndef ACTSGEOMETRY_ACTSELEMENTVECTOR_H
14
#define ACTSGEOMETRY_ACTSELEMENTVECTOR_H
15
16
17
#include "
ActsGeometry/ActsDetectorElement.h
"
18
#include "
CxxUtils/checker_macros.h
"
19
#include <mutex>
20
21
29
class
ActsElementVector
30
{
31
public
:
32
// The only thing we can do is add another element to the list.
33
// Declared const so that the thread-safety checker won't complain ---
34
// we lock the vector internally.
35
void
push_back
(std::shared_ptr<const ActsDetectorElement>
p
)
const
36
{
37
std::scoped_lock lock (
m_mutex
);
38
m_vec.push_back (
p
);
39
}
40
41
42
private
:
43
mutable
std::vector<std::shared_ptr<const ActsDetectorElement>> m_vec
ATLAS_THREAD_SAFE
;
44
mutable
std::mutex
m_mutex
;
45
};
46
47
48
#endif // not ACTSGEOMETRY_ACTSELEMENTVECTOR_H
BeamSpot::mutex
std::mutex mutex
Definition:
InDetBeamSpotVertex.cxx:18
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
ActsElementVector::m_mutex
std::mutex m_mutex
Definition:
ActsElementVector.h:44
ActsDetectorElement.h
ActsElementVector::ATLAS_THREAD_SAFE
std::vector< std::shared_ptr< const ActsDetectorElement > > m_vec ATLAS_THREAD_SAFE
Definition:
ActsElementVector.h:43
ActsElementVector
Helper to hold elements for deletion.
Definition:
ActsElementVector.h:30
ActsElementVector::push_back
void push_back(std::shared_ptr< const ActsDetectorElement > p) const
Definition:
ActsElementVector.h:35
checker_macros.h
Define macros for attributes used to control the static checker.
Generated on Sun Dec 22 2024 21:06:36 for ATLAS Offline Software by
1.8.18