CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ThreadSafeStringCut< F, T > Class Template Reference

#include <ThreadSafeStringCut.h>

Public Member Functions

std::invoke_result_t< F, Toperator() (const T &t) const
 
 ThreadSafeStringCut (const std::string &expr)
 
 ThreadSafeStringCut (ThreadSafeStringCut &&other) noexcept
 

Private Attributes

const std::string expr_
 
const F func_
 
std::mutex mutex_
 

Detailed Description

template<class F, class T>
class ThreadSafeStringCut< F, T >

Definition at line 17 of file ThreadSafeStringCut.h.

Constructor & Destructor Documentation

◆ ThreadSafeStringCut() [1/2]

template<class F, class T>
ThreadSafeStringCut< F, T >::ThreadSafeStringCut ( const std::string &  expr)
inline

Definition at line 19 of file ThreadSafeStringCut.h.

20  : func_(expr), expr_(expr) {}

◆ ThreadSafeStringCut() [2/2]

template<class F, class T>
ThreadSafeStringCut< F, T >::ThreadSafeStringCut ( ThreadSafeStringCut< F, T > &&  other)
inlinenoexcept

Definition at line 22 of file ThreadSafeStringCut.h.

23  : func_(std::move(other.func_)), expr_(std::move(other.expr_)) {}

Member Function Documentation

◆ operator()()

template<class F, class T>
std::invoke_result_t<F, T> ThreadSafeStringCut< F, T >::operator() ( const T t) const
inline

Definition at line 25 of file ThreadSafeStringCut.h.

25  {
26  std::lock_guard<std::mutex> guard(mutex_);
27  return func_(t);
28  }

Member Data Documentation

◆ expr_

template<class F, class T>
const std::string ThreadSafeStringCut< F, T >::expr_
private

Definition at line 32 of file ThreadSafeStringCut.h.

◆ func_

template<class F, class T>
const F ThreadSafeStringCut< F, T >::func_
private

◆ mutex_

template<class F, class T>
std::mutex ThreadSafeStringCut< F, T >::mutex_
mutableprivate
trackingPlots.other
other
Definition: trackingPlots.py:1465
OrderedSet.t
t
Definition: OrderedSet.py:90
ThreadSafeStringCut::func_
const F func_
Definition: ThreadSafeStringCut.h:31
eostools.move
def move(src, dest)
Definition: eostools.py:511
jets_cff.expr
expr
Definition: jets_cff.py:449
ThreadSafeStringCut::mutex_
std::mutex mutex_
Definition: ThreadSafeStringCut.h:33
ThreadSafeStringCut::expr_
const std::string expr_
Definition: ThreadSafeStringCut.h:32