ATLAS Offline Software
Loading...
Searching...
No Matches
EventInfoLockHelper Class Reference

#include <EventInfoLockHelper.h>

Collaboration diagram for EventInfoLockHelper:

Public Types

typedef std::function< bool(uint32_t, uint32_t, uint64_t)> unlockFunc_t

Public Member Functions

 EventInfoLockHelper ()=default
bool evalUnlockFunc (uint32_t runNbr, uint32_t lbNrb, uint64_t evtNbr) const
 Check if the lock should happen or not.

Static Public Member Functions

static void addUnlockFunc (unlockFunc_t fn) ATLAS_NOT_THREAD_SAFE
 Add a function defining if the flags are to be locked.

Static Private Attributes

static std::vector< unlockFunc_t > s_unlockFuncs ATLAS_THREAD_SAFE

Detailed Description

Definition at line 19 of file EventInfoLockHelper.h.

Member Typedef Documentation

◆ unlockFunc_t

typedef std::function<bool(uint32_t, uint32_t,uint64_t)> EventInfoLockHelper::unlockFunc_t

Definition at line 22 of file EventInfoLockHelper.h.

Constructor & Destructor Documentation

◆ EventInfoLockHelper()

EventInfoLockHelper::EventInfoLockHelper ( )
default

Member Function Documentation

◆ addUnlockFunc()

void EventInfoLockHelper::addUnlockFunc ( unlockFunc_t fn)
static

Add a function defining if the flags are to be locked.

Should be called from initialize() of the AODFix algorithm

Parameters
fnA std::function taking a run-number, a lumiblock number and an event number as paramenter. Should return true if the lock should be avoided

This (static) method should be called from initialize() of the AODFix algorithm

Definition at line 7 of file EventInfoLockHelper.cxx.

7 {
8 s_unlockFuncs.push_back(fn);
9 }

◆ evalUnlockFunc()

bool EventInfoLockHelper::evalUnlockFunc ( uint32_t runNbr,
uint32_t lbNrb,
uint64_t evtNbr ) const

Check if the lock should happen or not.

Parameters
runNbrRunNumber of the current event
lbNbrLumiBlock number of the current event
evtNbrEventNumber of the current event

To be called in EventAuxInfo_vN::toTransient()

Definition at line 12 of file EventInfoLockHelper.cxx.

12 {
13 for (auto& fn : s_unlockFuncs) {
14 if (fn(runNbr,lbNrb,evtNbr)) return true;
15 }
16 return false;
17 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::vector<unlockFunc_t> s_unlockFuncs EventInfoLockHelper::ATLAS_THREAD_SAFE
staticprivate

Definition at line 44 of file EventInfoLockHelper.h.


The documentation for this class was generated from the following files: