ATLAS Offline Software
Reconstruction
eflowRec
src
eflowLookupExp.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
* eflowLookupExp.cxx
7
*
8
* Created on: 20.08.2013
9
* Author: tlodd
10
*/
11
12
#include "
eflowRec/eflowLookupExp.h
"
13
#include "
CxxUtils/CachedUniquePtr.h
"
14
#include "
CxxUtils/checker_macros.h
"
15
16
17
const
eflowLookupExp
*
eflowLookupExp::getInstance
(
int
nExpBins
/*= 50*/
,
18
int
nExpSubBins
/*= 1000*/
)
19
{
20
static
CxxUtils::CachedUniquePtr<eflowLookupExp>
cached
ATLAS_THREAD_SAFE
;
21
if
(!
cached
) {
22
cached
.set (std::make_unique<eflowLookupExp>(nExpBins, nExpSubBins));
23
}
24
25
if
( (
cached
->m_nExpBins != nExpBins) || (
cached
->m_nExpSubBins != nExpSubBins) )
26
{
27
throw
std::runtime_error(
"eflowLookupExp: Instance with different bin numbers than existing requested!"
);
28
}
29
return
cached
.get();
30
}
eflowLookupExp.h
eflowLookupExp::getInstance
static const eflowLookupExp * getInstance(int nExpBins=50, int nExpSubBins=1000)
Definition:
eflowLookupExp.cxx:17
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition:
CachedUniquePtr.h:54
eflowLookupExp
Lookup-table based exponential function to save CPU time, which is used by eflowCellIntegrator.
Definition:
eflowLookupExp.h:22
CachedUniquePtr.h
Cached unique_ptr with atomic update.
python.decorators.cached.cached
def cached(func)
Decorator to cache function return value.
Definition:
cached.py:6
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition:
checker_macros.h:211
checker_macros.h
Define macros for attributes used to control the static checker.
Generated on Sun Dec 22 2024 21:09:43 for ATLAS Offline Software by
1.8.18