#include <OscarMTMasterThread.h>
Public Member Functions | |
void | beginRun (const edm::EventSetup &iSetup) const |
void | callConsumes (edm::ConsumesCollector &&iC) const |
void | endRun () const |
OscarMTMasterThread (const edm::ParameterSet &iConfig) | |
RunManagerMT & | runManagerMaster () const |
RunManagerMT * | runManagerMasterPtr () const |
void | stopThread () |
~OscarMTMasterThread () | |
Private Types | |
enum | ThreadState { ThreadState::NotExist = 0, ThreadState::BeginRun = 1, ThreadState::EndRun = 2, ThreadState::Destruct = 3 } |
Private Attributes | |
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > | m_DD4hep |
edm::ESGetToken< DDCompactView, IdealGeometryRecord > | m_DDD |
bool | m_firstRun = true |
bool | m_hasToken = false |
bool | m_mainCanProceed = false |
bool | m_masterCanProceed = false |
std::thread | m_masterThread |
ThreadState | m_masterThreadState |
std::condition_variable | m_notifyMainCv |
std::condition_variable | m_notifyMasterCv |
const cms::DDCompactView * | m_pDD4hep = nullptr |
const DDCompactView * | m_pDDD = nullptr |
edm::ESGetToken< HepPDT::ParticleDataTable, PDTRecord > | m_PDT |
const bool | m_pGeoFromDD4hep |
std::mutex | m_protectMutex |
const HepPDT::ParticleDataTable * | m_pTable = nullptr |
std::shared_ptr< RunManagerMT > | m_runManagerMaster |
bool | m_stopped = false |
std::mutex | m_threadMutex |
Definition at line 37 of file OscarMTMasterThread.h.
|
strongprivate |
|
explicit |
Definition at line 12 of file OscarMTMasterThread.cc.
References BeginRun, Destruct, EndRun, Exception, LogDebug, m_mainCanProceed, m_masterCanProceed, m_masterThread, m_masterThreadState, m_notifyMainCv, m_notifyMasterCv, m_pDD4hep, m_pDDD, m_pGeoFromDD4hep, m_pTable, m_runManagerMaster, and m_threadMutex.
OscarMTMasterThread::~OscarMTMasterThread | ( | ) |
void OscarMTMasterThread::beginRun | ( | const edm::EventSetup & | iSetup | ) | const |
Definition at line 120 of file OscarMTMasterThread.cc.
References BeginRun, edm::EventSetup::getData(), edm::EventSetup::getTransientHandle(), m_DD4hep, m_DDD, m_firstRun, m_mainCanProceed, m_masterCanProceed, m_masterThreadState, m_notifyMainCv, m_notifyMasterCv, m_pDD4hep, m_pDDD, m_PDT, m_pGeoFromDD4hep, m_protectMutex, m_pTable, and m_threadMutex.
Referenced by OscarMTProducer::globalBeginRun().
void OscarMTMasterThread::callConsumes | ( | edm::ConsumesCollector && | iC | ) | const |
Definition at line 107 of file OscarMTMasterThread.cc.
References edm::BeginRun, m_DD4hep, m_DDD, m_hasToken, m_PDT, and m_pGeoFromDD4hep.
void OscarMTMasterThread::endRun | ( | ) | const |
Definition at line 145 of file OscarMTMasterThread.cc.
References EndRun, m_mainCanProceed, m_masterCanProceed, m_masterThreadState, m_notifyMainCv, m_notifyMasterCv, m_protectMutex, and m_threadMutex.
|
inline |
Definition at line 48 of file OscarMTMasterThread.h.
References m_runManagerMaster.
Referenced by OscarMTProducer::produce().
|
inline |
Definition at line 49 of file OscarMTMasterThread.h.
References m_runManagerMaster.
Referenced by OscarMTProducer::beginRun().
void OscarMTMasterThread::stopThread | ( | ) |
Definition at line 159 of file OscarMTMasterThread.cc.
References Destruct, m_masterCanProceed, m_masterThread, m_masterThreadState, m_notifyMasterCv, m_stopped, and m_threadMutex.
Referenced by OscarMTProducer::globalEndJob(), and ~OscarMTMasterThread().
|
mutableprivate |
Definition at line 64 of file OscarMTMasterThread.h.
Referenced by beginRun(), and callConsumes().
|
mutableprivate |
Definition at line 63 of file OscarMTMasterThread.h.
Referenced by beginRun(), and callConsumes().
|
mutableprivate |
Definition at line 78 of file OscarMTMasterThread.h.
Referenced by beginRun().
|
mutableprivate |
Definition at line 75 of file OscarMTMasterThread.h.
Referenced by callConsumes().
|
mutableprivate |
Definition at line 77 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 76 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().
|
private |
Definition at line 57 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), and stopThread().
|
mutableprivate |
Definition at line 73 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().
|
mutableprivate |
Definition at line 71 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 70 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().
|
mutableprivate |
Definition at line 61 of file OscarMTMasterThread.h.
Referenced by beginRun(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 60 of file OscarMTMasterThread.h.
Referenced by beginRun(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 65 of file OscarMTMasterThread.h.
Referenced by beginRun(), and callConsumes().
|
private |
Definition at line 54 of file OscarMTMasterThread.h.
Referenced by beginRun(), callConsumes(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 68 of file OscarMTMasterThread.h.
Referenced by beginRun(), and endRun().
|
mutableprivate |
Definition at line 62 of file OscarMTMasterThread.h.
Referenced by beginRun(), and OscarMTMasterThread().
|
private |
Definition at line 56 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), runManagerMaster(), and runManagerMasterPtr().
|
mutableprivate |
Definition at line 79 of file OscarMTMasterThread.h.
Referenced by stopThread(), and ~OscarMTMasterThread().
|
mutableprivate |
Definition at line 69 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().