CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes | Friends
evf::FastMonitoringThread Class Reference

#include <FastMonitoringThread.h>

Classes

struct  MonitorData
 

Public Types

enum  InputState {
  inIgnore = 0, inInit, inWaitInput, inNewLumi,
  inNewLumiBusyEndingLS, inNewLumiIdleEndingLS, inRunEnd, inProcessingFile,
  inWaitChunk, inChunkReceived, inChecksumEvent, inCachedEvent,
  inReadEvent, inReadCleanup, inNoRequest, inNoRequestWithIdleThreads,
  inNoRequestWithGlobalEoL, inNoRequestWithEoLThreads, inSupFileLimit, inSupWaitFreeChunk,
  inSupWaitFreeChunkCopying, inSupWaitFreeThread, inSupWaitFreeThreadCopying, inSupBusy,
  inSupLockPolling, inSupLockPollingCopying, inSupNoFile, inSupNewFile,
  inSupNewFileWaitThreadCopying, inSupNewFileWaitThread, inSupNewFileWaitChunkCopying, inSupNewFileWaitChunk,
  inWaitInput_fileLimit, inWaitInput_waitFreeChunk, inWaitInput_waitFreeChunkCopying, inWaitInput_waitFreeThread,
  inWaitInput_waitFreeThreadCopying, inWaitInput_busy, inWaitInput_lockPolling, inWaitInput_lockPollingCopying,
  inWaitInput_runEnd, inWaitInput_noFile, inWaitInput_newFile, inWaitInput_newFileWaitThreadCopying,
  inWaitInput_newFileWaitThread, inWaitInput_newFileWaitChunkCopying, inWaitInput_newFileWaitChunk, inWaitChunk_fileLimit,
  inWaitChunk_waitFreeChunk, inWaitChunk_waitFreeChunkCopying, inWaitChunk_waitFreeThread, inWaitChunk_waitFreeThreadCopying,
  inWaitChunk_busy, inWaitChunk_lockPolling, inWaitChunk_lockPollingCopying, inWaitChunk_runEnd,
  inWaitChunk_noFile, inWaitChunk_newFile, inWaitChunk_newFileWaitThreadCopying, inWaitChunk_newFileWaitThread,
  inWaitChunk_newFileWaitChunkCopying, inWaitChunk_newFileWaitChunk, inCOUNT
}
 
enum  Macrostate {
  sInit = 0, sJobReady, sRunGiven, sRunning,
  sStopping, sShuttingDown, sDone, sJobEnded,
  sError, sErrorEnded, sEnd, sInvalid,
  MCOUNT
}
 

Public Member Functions

 FastMonitoringThread ()
 
void resetFastMonitor (std::string const &microStateDefPath, std::string const &fastMicroStateDefPath)
 
void start (void(FastMonitoringService::*fp)(), FastMonitoringService *cp)
 
void stop ()
 

Private Attributes

std::unique_ptr< jsoncollector::FastMonitorjsonMonitor_
 
MonitorData m_data
 
std::atomic< bool > m_stoprequest
 
std::shared_ptr< std::thread > m_thread
 
std::mutex monlock_
 

Friends

class FastMonitoringService
 

Detailed Description

Definition at line 15 of file FastMonitoringThread.h.

Member Enumeration Documentation

◆ InputState

Enumerator
inIgnore 
inInit 
inWaitInput 
inNewLumi 
inNewLumiBusyEndingLS 
inNewLumiIdleEndingLS 
inRunEnd 
inProcessingFile 
inWaitChunk 
inChunkReceived 
inChecksumEvent 
inCachedEvent 
inReadEvent 
inReadCleanup 
inNoRequest 
inNoRequestWithIdleThreads 
inNoRequestWithGlobalEoL 
inNoRequestWithEoLThreads 
inSupFileLimit 
inSupWaitFreeChunk 
inSupWaitFreeChunkCopying 
inSupWaitFreeThread 
inSupWaitFreeThreadCopying 
inSupBusy 
inSupLockPolling 
inSupLockPollingCopying 
inSupNoFile 
inSupNewFile 
inSupNewFileWaitThreadCopying 
inSupNewFileWaitThread 
inSupNewFileWaitChunkCopying 
inSupNewFileWaitChunk 
inWaitInput_fileLimit 
inWaitInput_waitFreeChunk 
inWaitInput_waitFreeChunkCopying 
inWaitInput_waitFreeThread 
inWaitInput_waitFreeThreadCopying 
inWaitInput_busy 
inWaitInput_lockPolling 
inWaitInput_lockPollingCopying 
inWaitInput_runEnd 
inWaitInput_noFile 
inWaitInput_newFile 
inWaitInput_newFileWaitThreadCopying 
inWaitInput_newFileWaitThread 
inWaitInput_newFileWaitChunkCopying 
inWaitInput_newFileWaitChunk 
inWaitChunk_fileLimit 
inWaitChunk_waitFreeChunk 
inWaitChunk_waitFreeChunkCopying 
inWaitChunk_waitFreeThread 
inWaitChunk_waitFreeThreadCopying 
inWaitChunk_busy 
inWaitChunk_lockPolling 
inWaitChunk_lockPollingCopying 
inWaitChunk_runEnd 
inWaitChunk_noFile 
inWaitChunk_newFile 
inWaitChunk_newFileWaitThreadCopying 
inWaitChunk_newFileWaitThread 
inWaitChunk_newFileWaitChunkCopying 
inWaitChunk_newFileWaitChunk 
inCOUNT 

Definition at line 34 of file FastMonitoringThread.h.

34  {
35  inIgnore = 0,
36  inInit,
38  inNewLumi,
41  inRunEnd,
53  //supervisor thread and worker threads state
59  inSupBusy,
68  //combined with inWaitInput
84  //combined with inWaitChunk
100  inCOUNT
101  };

◆ Macrostate

Enumerator
sInit 
sJobReady 
sRunGiven 
sRunning 
sStopping 
sShuttingDown 
sDone 
sJobEnded 
sError 
sErrorEnded 
sEnd 
sInvalid 
MCOUNT 

Definition at line 18 of file FastMonitoringThread.h.

18  {
19  sInit = 0,
20  sJobReady,
21  sRunGiven,
22  sRunning,
23  sStopping,
25  sDone,
26  sJobEnded,
27  sError,
29  sEnd,
30  sInvalid,
31  MCOUNT
32  };

Constructor & Destructor Documentation

◆ FastMonitoringThread()

evf::FastMonitoringThread::FastMonitoringThread ( )
inline

Definition at line 198 of file FastMonitoringThread.h.

198 : m_stoprequest(false) {}

Member Function Documentation

◆ resetFastMonitor()

void evf::FastMonitoringThread::resetFastMonitor ( std::string const &  microStateDefPath,
std::string const &  fastMicroStateDefPath 
)
inline

Definition at line 200 of file FastMonitoringThread.h.

200  {
201  std::string defGroup = "data";
202  jsonMonitor_.reset(new jsoncollector::FastMonitor(microStateDefPath, defGroup, false));
203  if (!fastMicroStateDefPath.empty())
204  jsonMonitor_->addFastPathDefinition(fastMicroStateDefPath, defGroup, false);
205  }

References jsonMonitor_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by evf::FastMonitoringService::preBeginJob().

◆ start()

void evf::FastMonitoringThread::start ( void(FastMonitoringService::*)()  fp,
FastMonitoringService cp 
)
inline

◆ stop()

void evf::FastMonitoringThread::stop ( )
inline

Definition at line 211 of file FastMonitoringThread.h.

211  {
212  assert(m_thread);
213  m_stoprequest = true;
214  m_thread->join();
215  }

References cms::cuda::assert(), m_stoprequest, and m_thread.

Referenced by evf::FastMonitoringService::postEndJob().

Friends And Related Function Documentation

◆ FastMonitoringService

friend class FastMonitoringService
friend

Definition at line 225 of file FastMonitoringThread.h.

Member Data Documentation

◆ jsonMonitor_

std::unique_ptr<jsoncollector::FastMonitor> evf::FastMonitoringThread::jsonMonitor_
private

◆ m_data

MonitorData evf::FastMonitoringThread::m_data
private

◆ m_stoprequest

std::atomic<bool> evf::FastMonitoringThread::m_stoprequest
private

Definition at line 218 of file FastMonitoringThread.h.

Referenced by evf::FastMonitoringService::dowork(), and stop().

◆ m_thread

std::shared_ptr<std::thread> evf::FastMonitoringThread::m_thread
private

Definition at line 219 of file FastMonitoringThread.h.

Referenced by start(), and stop().

◆ monlock_

std::mutex evf::FastMonitoringThread::monlock_
private
evf::FastMonitoringThread::inWaitChunk_newFile
Definition: FastMonitoringThread.h:95
evf::FastMonitoringThread::inNewLumiBusyEndingLS
Definition: FastMonitoringThread.h:39
evf::FastMonitoringThread::inSupFileLimit
Definition: FastMonitoringThread.h:54
evf::FastMonitoringThread::inSupWaitFreeChunk
Definition: FastMonitoringThread.h:55
evf::FastMonitoringThread::inWaitInput_waitFreeChunkCopying
Definition: FastMonitoringThread.h:71
evf::FastMonitoringThread::inRunEnd
Definition: FastMonitoringThread.h:41
cms::cuda::assert
assert(be >=bs)
evf::FastMonitoringThread::sInvalid
Definition: FastMonitoringThread.h:30
evf::FastMonitoringThread::sRunning
Definition: FastMonitoringThread.h:22
evf::FastMonitoringThread::inWaitChunk_newFileWaitThread
Definition: FastMonitoringThread.h:97
evf::FastMonitoringThread::sJobReady
Definition: FastMonitoringThread.h:20
personalPlayback.fp
fp
Definition: personalPlayback.py:523
evf::FastMonitoringThread::inCachedEvent
Definition: FastMonitoringThread.h:46
evf::FastMonitoringThread::inWaitChunk_newFileWaitThreadCopying
Definition: FastMonitoringThread.h:96
evf::FastMonitoringThread::sJobEnded
Definition: FastMonitoringThread.h:26
evf::FastMonitoringThread::sEnd
Definition: FastMonitoringThread.h:29
evf::FastMonitoringThread::inWaitChunk
Definition: FastMonitoringThread.h:43
evf::FastMonitoringThread::inWaitChunk_fileLimit
Definition: FastMonitoringThread.h:85
evf::FastMonitoringThread::inProcessingFile
Definition: FastMonitoringThread.h:42
evf::FastMonitoringThread::inSupWaitFreeChunkCopying
Definition: FastMonitoringThread.h:56
evf::FastMonitoringThread::inWaitInput_lockPolling
Definition: FastMonitoringThread.h:75
evf::FastMonitoringThread::sInit
Definition: FastMonitoringThread.h:19
evf::FastMonitoringThread::inWaitChunk_newFileWaitChunkCopying
Definition: FastMonitoringThread.h:98
evf::FastMonitoringThread::inWaitChunk_waitFreeThreadCopying
Definition: FastMonitoringThread.h:89
evf::FastMonitoringThread::inSupWaitFreeThread
Definition: FastMonitoringThread.h:57
evf::FastMonitoringThread::inWaitInput
Definition: FastMonitoringThread.h:37
evf::FastMonitoringThread::inWaitChunk_noFile
Definition: FastMonitoringThread.h:94
evf::FastMonitoringThread::inReadCleanup
Definition: FastMonitoringThread.h:48
evf::FastMonitoringThread::inWaitInput_lockPollingCopying
Definition: FastMonitoringThread.h:76
evf::FastMonitoringThread::inNoRequestWithEoLThreads
Definition: FastMonitoringThread.h:52
evf::FastMonitoringThread::inChecksumEvent
Definition: FastMonitoringThread.h:45
evf::FastMonitoringThread::inNewLumi
Definition: FastMonitoringThread.h:38
evf::FastMonitoringThread::inSupNewFileWaitThreadCopying
Definition: FastMonitoringThread.h:64
evf::FastMonitoringThread::sShuttingDown
Definition: FastMonitoringThread.h:24
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
evf::FastMonitoringThread::sError
Definition: FastMonitoringThread.h:27
evf::FastMonitoringThread::inWaitInput_runEnd
Definition: FastMonitoringThread.h:77
evf::FastMonitoringThread::m_stoprequest
std::atomic< bool > m_stoprequest
Definition: FastMonitoringThread.h:218
evf::FastMonitoringThread::inWaitChunk_lockPolling
Definition: FastMonitoringThread.h:91
evf::FastMonitoringThread::inWaitInput_newFileWaitChunkCopying
Definition: FastMonitoringThread.h:82
evf::FastMonitoringThread::MCOUNT
Definition: FastMonitoringThread.h:31
evf::FastMonitoringThread::inChunkReceived
Definition: FastMonitoringThread.h:44
evf::FastMonitoringThread::inSupNewFileWaitChunk
Definition: FastMonitoringThread.h:67
evf::FastMonitoringThread::inSupNewFile
Definition: FastMonitoringThread.h:63
evf::FastMonitoringThread::inWaitChunk_newFileWaitChunk
Definition: FastMonitoringThread.h:99
evf::FastMonitoringThread::inNewLumiIdleEndingLS
Definition: FastMonitoringThread.h:40
evf::FastMonitoringThread::inSupNewFileWaitThread
Definition: FastMonitoringThread.h:65
evf::FastMonitoringThread::inSupLockPolling
Definition: FastMonitoringThread.h:60
jsoncollector::FastMonitor
Definition: FastMonitor.h:19
evf::FastMonitoringThread::m_thread
std::shared_ptr< std::thread > m_thread
Definition: FastMonitoringThread.h:219
evf::FastMonitoringThread::inInit
Definition: FastMonitoringThread.h:36
evf::FastMonitoringThread::sStopping
Definition: FastMonitoringThread.h:23
evf::FastMonitoringThread::inWaitInput_noFile
Definition: FastMonitoringThread.h:78
evf::FastMonitoringThread::inNoRequest
Definition: FastMonitoringThread.h:49
evf::FastMonitoringThread::inWaitChunk_busy
Definition: FastMonitoringThread.h:90
evf::FastMonitoringThread::inWaitInput_newFileWaitThread
Definition: FastMonitoringThread.h:81
evf::FastMonitoringThread::jsonMonitor_
std::unique_ptr< jsoncollector::FastMonitor > jsonMonitor_
Definition: FastMonitoringThread.h:223
evf::FastMonitoringThread::inNoRequestWithGlobalEoL
Definition: FastMonitoringThread.h:51
evf::FastMonitoringThread::inSupBusy
Definition: FastMonitoringThread.h:59
evf::FastMonitoringThread::sErrorEnded
Definition: FastMonitoringThread.h:28
evf::FastMonitoringThread::inReadEvent
Definition: FastMonitoringThread.h:47
evf::FastMonitoringThread::inWaitChunk_waitFreeChunk
Definition: FastMonitoringThread.h:86
evf::FastMonitoringThread::inNoRequestWithIdleThreads
Definition: FastMonitoringThread.h:50
evf::FastMonitoringThread::inSupNoFile
Definition: FastMonitoringThread.h:62
evf::FastMonitoringThread::inSupLockPollingCopying
Definition: FastMonitoringThread.h:61
evf::FastMonitoringThread::inWaitInput_waitFreeChunk
Definition: FastMonitoringThread.h:70
evf::FastMonitoringThread::inSupNewFileWaitChunkCopying
Definition: FastMonitoringThread.h:66
evf::FastMonitoringThread::inWaitChunk_runEnd
Definition: FastMonitoringThread.h:93
evf::FastMonitoringThread::inIgnore
Definition: FastMonitoringThread.h:35
evf::FastMonitoringThread::inWaitInput_waitFreeThread
Definition: FastMonitoringThread.h:72
evf::FastMonitoringThread::inWaitInput_newFileWaitThreadCopying
Definition: FastMonitoringThread.h:80
evf::FastMonitoringThread::inSupWaitFreeThreadCopying
Definition: FastMonitoringThread.h:58
evf::FastMonitoringThread::inCOUNT
Definition: FastMonitoringThread.h:100
evf::FastMonitoringThread::inWaitInput_fileLimit
Definition: FastMonitoringThread.h:69
evf::FastMonitoringThread::inWaitChunk_waitFreeChunkCopying
Definition: FastMonitoringThread.h:87
evf::FastMonitoringThread::inWaitChunk_lockPollingCopying
Definition: FastMonitoringThread.h:92
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
evf::FastMonitoringThread::inWaitInput_newFile
Definition: FastMonitoringThread.h:79
evf::FastMonitoringThread::inWaitInput_newFileWaitChunk
Definition: FastMonitoringThread.h:83
evf::FastMonitoringThread::sRunGiven
Definition: FastMonitoringThread.h:21
evf::FastMonitoringThread::inWaitChunk_waitFreeThread
Definition: FastMonitoringThread.h:88
evf::FastMonitoringThread::inWaitInput_waitFreeThreadCopying
Definition: FastMonitoringThread.h:73
evf::FastMonitoringThread::inWaitInput_busy
Definition: FastMonitoringThread.h:74
evf::FastMonitoringThread::sDone
Definition: FastMonitoringThread.h:25