ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODEventInfo
xAODEventInfo
EventInfoLockHelper.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
/*
3
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4
*/
5
6
#ifndef XAODEVENTINFO_EVENTINFOLOCKHELPER
7
#define XAODEVENTINFO_EVENTINFOLOCKHELPER
8
9
#include <stdint.h>
10
#include <functional>
11
#include <vector>
12
#include "
CxxUtils/checker_macros.h
"
13
14
//Helper class to avoid locking EventInfo flags (such as ErrorState or detectorFlags)
15
//when reading xAOD::EventInfo from a POOL file
16
//Useful only in the context of AODFixes involving these flags.
17
18
19
class
EventInfoLockHelper
{
20
public
:
21
EventInfoLockHelper
()=
default
;
22
typedef
std::function<bool(uint32_t, uint32_t,uint64_t)>
unlockFunc_t
;
23
30
static
void
addUnlockFunc
(
unlockFunc_t
fn)
ATLAS_NOT_THREAD_SAFE
;
31
32
41
bool
evalUnlockFunc
(uint32_t runNbr, uint32_t lbNrb, uint64_t evtNbr)
const
;
42
43
private
:
44
static
std::vector<unlockFunc_t> s_unlockFuncs
ATLAS_THREAD_SAFE
;
45
46
47
};
48
49
50
51
52
53
54
#endif
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
EventInfoLockHelper::unlockFunc_t
std::function< bool(uint32_t, uint32_t, uint64_t)> unlockFunc_t
Definition
EventInfoLockHelper.h:22
EventInfoLockHelper::addUnlockFunc
static void addUnlockFunc(unlockFunc_t fn) ATLAS_NOT_THREAD_SAFE
Add a function defining if the flags are to be locked.
Definition
EventInfoLockHelper.cxx:7
EventInfoLockHelper::ATLAS_THREAD_SAFE
static std::vector< unlockFunc_t > s_unlockFuncs ATLAS_THREAD_SAFE
Definition
EventInfoLockHelper.h:44
EventInfoLockHelper::EventInfoLockHelper
EventInfoLockHelper()=default
EventInfoLockHelper::evalUnlockFunc
bool evalUnlockFunc(uint32_t runNbr, uint32_t lbNrb, uint64_t evtNbr) const
Check if the lock should happen or not.
Definition
EventInfoLockHelper.cxx:12
Generated on
for ATLAS Offline Software by
1.17.0