ATLAS Offline Software
AtlasBComponent.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "CLHEP/GenericFunctions/AbsFunction.hh"
7 
8 // Real magnetic field svc
10 
11 // This class is an adaptor:
12 namespace Genfun {
13 
14  class AtlasBComponent: public AbsFunction {
15 
16  FUNCTION_OBJECT_DEF(AtlasBComponent)
17 
18  public:
19 
20  // Constructor:
21  AtlasBComponent(unsigned int index, MagField::AtlasFieldCache* fieldCache);
22 
23  // Destructor:
24  virtual ~AtlasBComponent();
25 
26  // Copy Constructor:
27  AtlasBComponent(const AtlasBComponent &right);
28 
29  // Dimensionality:
30  virtual unsigned int dimensionality() const override;
31 
32  virtual double operator () (double argument) const override;
33  virtual double operator () (const Argument & a) const override;
34 
35  private:
36 
37  unsigned int m_index;
38 
39  // Don't allow assignment (avoid coverity warning).
41 
42  /* Mag field accessor.
43  *
44  * For this to be thread-safe the caller needs to have a local instance
45  * of AtlasFieldCache as the cache is being mutated by operator(). We have
46  * no way of knowing if this is the case, but this class is used only in
47  * one place.
48  */
50 
51  };
52 
53 }
Genfun::AtlasBComponent::~AtlasBComponent
virtual ~AtlasBComponent()
Definition: AtlasBComponent.cxx:23
AtlasFieldCacheCondObj.h
index
Definition: index.py:1
Genfun::AtlasBComponent::AtlasBComponent
AtlasBComponent(unsigned int index, MagField::AtlasFieldCache *fieldCache)
Definition: AtlasBComponent.cxx:17
python.acmdlib.argument
def argument(*args, **kwargs)
Definition: acmdlib.py:181
Genfun::AtlasBComponent::dimensionality
virtual unsigned int dimensionality() const override
Definition: AtlasBComponent.cxx:32
Genfun::AtlasBComponent
Definition: AtlasBComponent.h:14
Genfun::AtlasBComponent::operator=
AtlasBComponent & operator=(const AtlasBComponent &)
a
TList * a
Definition: liststreamerinfos.cxx:10
Genfun::AtlasBComponent::operator()
virtual double operator()(double argument) const override
Definition: AtlasBComponent.cxx:34
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
Genfun::AtlasBComponent::m_index
unsigned int m_index
Definition: AtlasBComponent.h:37
checker_macros.h
Define macros for attributes used to control the static checker.
Genfun::AtlasBComponent::ATLAS_THREAD_SAFE
MagField::AtlasFieldCache *m_fieldCache ATLAS_THREAD_SAFE
Definition: AtlasBComponent.h:49
Genfun
Definition: AtlasBComponent.cxx:12