19#ifndef ATHCONTAINERS_THREAD_SPECIFIC_PTR_H
20#define ATHCONTAINERS_THREAD_SPECIFIC_PTR_H
23#ifdef ATHCONTAINERS_NO_THREADS
33class thread_specific_ptr
36 thread_specific_ptr() : m_ptr(0) {}
37 ~thread_specific_ptr() {
delete m_ptr; }
38 thread_specific_ptr (
const thread_specific_ptr&) =
delete;
39 thread_specific_ptr& operator= (
const thread_specific_ptr&) =
delete;
40 T*
get() {
return m_ptr; }
41 T* operator->() {
return m_ptr; }
43 const T*
get()
const {
return m_ptr; }
44 const T* operator->()
const {
return m_ptr; }
46 void reset (T* new_value=0) {
delete m_ptr; m_ptr = new_value; }
47 T*
release() {
T* ret = m_ptr; m_ptr = 0;
return ret; }
60#include "boost/thread/tss.hpp"
66using boost::thread_specific_ptr;
xAOD::MissingET_v1 operator*(const xAOD::MissingET_v1 &met, float scale)
Create new MET object from source with scaled (weighted) kinematics.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.