#include <OscarMTMasterThread.h>
Public Member Functions | |
void | beginRun (const edm::EventSetup &iSetup) 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 Member Functions | |
void | readES (const edm::EventSetup &iSetup) const |
Private Attributes | |
edm::ESWatcher< IdealGeometryRecord > | idealGeomRcdWatcher_ |
edm::ESWatcher< IdealMagneticFieldRecord > | idealMagRcdWatcher_ |
bool | m_firstRun |
bool | m_mainCanProceed |
bool | m_masterCanProceed |
std::thread | m_masterThread |
ThreadState | m_masterThreadState |
std::condition_variable | m_notifyMainCv |
std::condition_variable | m_notifyMasterCv |
const DDCompactView * | m_pDD |
const cms::DDCompactView * | m_pDD4hep |
const bool | m_pGeoFromDD4hep |
std::mutex | m_protectMutex |
const HepPDT::ParticleDataTable * | m_pTable |
std::shared_ptr< RunManagerMT > | m_runManagerMaster |
bool | m_stopped |
std::mutex | m_threadMutex |
Definition at line 32 of file OscarMTMasterThread.h.
|
strongprivate |
Enumerator | |
---|---|
NotExist | |
BeginRun | |
EndRun | |
Destruct |
Definition at line 47 of file OscarMTMasterThread.h.
|
explicit |
Definition at line 22 of file OscarMTMasterThread.cc.
References BeginRun, Destruct, EndRun, Exception, LogDebug, edm::errors::LogicError, m_mainCanProceed, m_masterCanProceed, m_masterThread, m_masterThreadState, m_notifyMainCv, m_notifyMasterCv, m_pDD, m_pDD4hep, m_pTable, m_runManagerMaster, and m_threadMutex.
OscarMTMasterThread::~OscarMTMasterThread | ( | ) |
Definition at line 116 of file OscarMTMasterThread.cc.
References m_stopped, and stopThread().
void OscarMTMasterThread::beginRun | ( | const edm::EventSetup & | iSetup | ) | const |
Definition at line 122 of file OscarMTMasterThread.cc.
References BeginRun, m_mainCanProceed, m_masterCanProceed, m_masterThreadState, m_notifyMainCv, m_notifyMasterCv, m_protectMutex, m_threadMutex, and readES().
Referenced by OscarMTProducer::globalBeginRun().
void OscarMTMasterThread::endRun | ( | ) | const |
Definition at line 141 of file OscarMTMasterThread.cc.
References EndRun, m_mainCanProceed, m_masterCanProceed, m_masterThreadState, m_notifyMainCv, m_notifyMasterCv, m_protectMutex, and m_threadMutex.
|
private |
Definition at line 180 of file OscarMTMasterThread.cc.
References edm::ESWatcher< T >::check(), edm::errors::Configuration, Exception, edm::EventSetup::get(), get, idealGeomRcdWatcher_, m_firstRun, m_pDD, m_pDD4hep, m_pGeoFromDD4hep, m_pTable, edm::ESTransientHandle< T >::product(), and edm::ESHandle< T >::product().
Referenced by beginRun().
|
inline |
|
inline |
Definition at line 42 of file OscarMTMasterThread.h.
References m_runManagerMaster.
Referenced by OscarMTProducer::beginRun().
void OscarMTMasterThread::stopThread | ( | ) |
Definition at line 155 of file OscarMTMasterThread.cc.
References Destruct, LogDebug, m_masterCanProceed, m_masterThread, m_masterThreadState, m_notifyMasterCv, m_runManagerMaster, m_stopped, and m_threadMutex.
Referenced by OscarMTProducer::globalEndJob(), and ~OscarMTMasterThread().
|
mutableprivate |
Definition at line 55 of file OscarMTMasterThread.h.
Referenced by readES().
|
mutableprivate |
Definition at line 56 of file OscarMTMasterThread.h.
|
mutableprivate |
Definition at line 70 of file OscarMTMasterThread.h.
Referenced by readES().
|
mutableprivate |
Definition at line 69 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 68 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().
|
private |
Definition at line 52 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), and stopThread().
|
mutableprivate |
Definition at line 66 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().
|
mutableprivate |
Definition at line 64 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), and OscarMTMasterThread().
|
mutableprivate |
Definition at line 63 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().
|
mutableprivate |
Definition at line 57 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), and readES().
|
mutableprivate |
Definition at line 58 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), and readES().
|
private |
Definition at line 49 of file OscarMTMasterThread.h.
Referenced by readES().
|
mutableprivate |
Definition at line 61 of file OscarMTMasterThread.h.
Referenced by beginRun(), and endRun().
|
mutableprivate |
Definition at line 59 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), and readES().
|
private |
Definition at line 51 of file OscarMTMasterThread.h.
Referenced by OscarMTMasterThread(), runManagerMaster(), runManagerMasterPtr(), and stopThread().
|
mutableprivate |
Definition at line 71 of file OscarMTMasterThread.h.
Referenced by stopThread(), and ~OscarMTMasterThread().
|
mutableprivate |
Definition at line 62 of file OscarMTMasterThread.h.
Referenced by beginRun(), endRun(), OscarMTMasterThread(), and stopThread().