1 #ifndef EVF_FASTMONITORINGTHREAD
2 #define EVF_FASTMONITORINGTHREAD
14 class FastMonitoringService;
22 enum InputState {
inIgnore = 0,
inInit,
inWaitInput,
inNewLumi,
inNewLumiBusyEndingLS,
inNewLumiIdleEndingLS,
inRunEnd,
inProcessingFile,
inWaitChunk ,
inChunkReceived,
102 for (
unsigned int i=0;
i<nStreams;
i++) {
118 if (nThreads<=nStreams)
143 if (fastMicroStateDefPath.size())
144 jsonMonitor_->addFastPathDefinition(fastMicroStateDefPath,defGroup,
false);
149 m_thread = boost::shared_ptr<std::thread>(
new std::thread(fp,cp));
void registerFastGlobalMonitorable(JsonMonitorable *newMonitorable)
jsoncollector::IntJ fastEventsProcessedJ_
void start(void(FastMonitoringService::*fp)(), FastMonitoringService *cp)
static boost::mutex mutex
unsigned int microstateBins_
void registerStreamMonitorableUIntVecAtomic(std::string const &name, std::vector< AtomicMonUInt * > *inputs, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
jsoncollector::DoubleJ fastThroughputJ_
unsigned int varIndexThrougput_
boost::shared_ptr< std::thread > m_thread
unsigned int inputstateBins_
void registerGlobalMonitorable(JsonMonitorable *newMonitorable, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
jsoncollector::IntJ fastMacrostateJ_
void registerVariables(jsoncollector::FastMonitor *fm, unsigned int nStreams, unsigned int nThreads)
std::vector< unsigned int > threadMicrostateEncoded_
virtual void setName(std::string name)
void registerStreamMonitorableUIntVec(std::string const &name, std::vector< unsigned int > *inputs, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
std::unique_ptr< jsoncollector::FastMonitor > jsonMonitor_
jsoncollector::IntJ fastFilesProcessedJ_
jsoncollector::DoubleJ fastAvgLeadTimeJ_
void resetFastMonitor(std::string const µStateDefPath, std::string const &fastMicroStateDefPath)
jsoncollector::DoubleJ fastLockWaitJ_
void commit(std::vector< unsigned int > *streamLumisPtr)
unsigned int AtomicMonUInt
std::vector< unsigned int > microstateEncoded_
jsoncollector::IntJ fastPathProcessedJ_
jsoncollector::IntJ fastLockCountJ_
std::atomic< bool > m_stoprequest
std::vector< jsoncollector::AtomicMonUInt * > processed_
volatile std::atomic< bool > shutdown_flag false
unsigned int macrostateBins_
std::vector< unsigned int > streamLumi_
unsigned int ministateBins_
std::vector< unsigned int > inputState_
std::vector< unsigned int > ministateEncoded_