ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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 "
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
}
CachedUniquePtr.h
Cached unique_ptr with atomic update.
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition
checker_macros.h:211
eflowLookupExp::getInstance
static const eflowLookupExp * getInstance(int nExpBins=50, int nExpSubBins=1000)
Definition
eflowLookupExp.cxx:17
eflowLookupExp::eflowLookupExp
eflowLookupExp(int nExpBins, int nExpSubBins)
Definition
eflowLookupExp.h:27
eflowLookupExp.h
CxxUtils::CachedUniquePtr
CachedUniquePtrT< const T > CachedUniquePtr
Definition
CachedUniquePtr.h:114
Generated on
for ATLAS Offline Software by
1.17.0