ATLAS Offline Software
|
Lock to be used for thread unsafe histogram operations. More...
#include <OHLockedHist.h>
Public Member Functions | |
oh_lock_histogram (H *h) | |
Lock. More... | |
H * | operator-> () |
Access to histogram pointer. More... | |
~oh_lock_histogram () | |
Unlock. More... | |
Static Public Member Functions | |
static void | set_histogram_mutex (std::mutex &mutex) |
Set mutex to be used in oh_lock_histogram. More... | |
static void | reset_histogram_mutex () |
Reset (disable) histogram mutex. More... | |
Static Protected Attributes | |
static std::mutex *m_mutex | ATLAS_THREAD_SAFE |
Private Member Functions | |
void * | operator new (size_t) |
Do not allow dynamic allocation to avoid accidental deadlocks. More... | |
Private Attributes | |
H * | m_hist |
Lock to be used for thread unsafe histogram operations.
The TH1::Fill and other operations may sometimes involve ROOT global variables access. This usually leads to crashes as the histogram may be accessed at the same time for OH publication.
This usually happens when histograms have labeled bins, but may also happen in other cases involving re-binning, cloning etc. For those (and only those) operations one should lock the histogram access via the OH mutex:
Definition at line 69 of file OHLockedHist.h.
|
inline |
Lock.
Definition at line 72 of file OHLockedHist.h.
|
inline |
|
private |
Do not allow dynamic allocation to avoid accidental deadlocks.
|
inline |
|
inlinestaticinherited |
Reset (disable) histogram mutex.
Definition at line 39 of file OHLockedHist.h.
|
inlinestaticinherited |
|
staticprotectedinherited |
Definition at line 46 of file OHLockedHist.h.
|
private |
Definition at line 90 of file OHLockedHist.h.