CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
evf::FastMonitoringService Class Reference

#include <FastMonitoringService.h>

Inheritance diagram for evf::FastMonitoringService:
evf::MicroStateService

Classes

struct  Encoding
 

Public Member Functions

void accumulateFileSize (unsigned int lumi, unsigned long fileSize)
 
 FastMonitoringService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
bool getAbortFlagForLumi (unsigned int lumi)
 
unsigned int getEventsProcessedForLumi (unsigned int lumi, bool *abortFlag=0)
 
std::string getRunDirName () const
 
void jobFailure ()
 
std::string makeInputLegendaJson ()
 
std::string makeModuleLegendaJson ()
 
std::string makePathLegendaJson ()
 
void postBeginJob ()
 
void postEndJob ()
 
void postEvent (edm::StreamContext const &)
 
void postGlobalBeginRun (edm::GlobalContext const &)
 
void postGlobalEndLumi (edm::GlobalContext const &)
 
void postModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void postSourceEvent (edm::StreamID)
 
void postStreamBeginLumi (edm::StreamContext const &)
 
void postStreamEndLumi (edm::StreamContext const &)
 
void preallocate (edm::service::SystemBounds const &)
 
void preBeginJob (edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &pc)
 
void preEvent (edm::StreamContext const &)
 
void preGlobalBeginLumi (edm::GlobalContext const &)
 
void preGlobalEarlyTermination (edm::GlobalContext const &, edm::TerminationOrigin)
 
void preGlobalEndLumi (edm::GlobalContext const &)
 
void preModuleBeginJob (edm::ModuleDescription const &)
 
void preModuleEvent (edm::StreamContext const &, edm::ModuleCallingContext const &)
 
void prePathEvent (edm::StreamContext const &, edm::PathContext const &)
 
void preSourceEarlyTermination (edm::TerminationOrigin)
 
void preSourceEvent (edm::StreamID)
 
void preStreamBeginLumi (edm::StreamContext const &)
 
void preStreamEarlyTermination (edm::StreamContext const &, edm::TerminationOrigin)
 
void preStreamEndLumi (edm::StreamContext const &)
 
void reportLockWait (unsigned int ls, double waitTime, unsigned int lockCount)
 
void setExceptionDetected (unsigned int ls)
 
void setInputSource (FedRawDataInputSource *inputSource)
 
void setInState (FastMonitoringThread::InputState inputState)
 
void setInStateSup (FastMonitoringThread::InputState inputState)
 
void setMicroState (MicroStateService::Microstate)
 
void setMicroState (edm::StreamID, MicroStateService::Microstate)
 
bool shouldWriteFiles (unsigned int lumi, unsigned int *proc=0)
 
void startedLookingForFile ()
 
void stoppedLookingForFile (unsigned int lumi)
 
 ~FastMonitoringService ()
 
- Public Member Functions inherited from evf::MicroStateService
virtual std::string getMicroState1 ()
 
virtual std::string const & getMicroState2 ()
 
 MicroStateService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
virtual ~MicroStateService ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Static Public Attributes

static const std::string inputStateNames [FastMonitoringThread::inCOUNT]
 
static const std::string macroStateNames [FastMonitoringThread::MCOUNT]
 
static const std::string nopath_ = "NoPath"
 
- Static Public Attributes inherited from evf::MicroStateService
static const edm::ModuleDescription reservedMicroStateNames [mCOUNT]
 

Private Member Functions

void doSnapshot (const unsigned int ls, const bool isGlobalEOL)
 
void doStreamEOLSnapshot (const unsigned int ls, const unsigned int streamID)
 
void dowork ()
 

Private Attributes

std::map< unsigned int,
unsigned long > 
accuSize_
 
std::map< unsigned int, double > avgLeadTime_
 
std::vector< std::atomic< bool > * > collectedPathList_
 
bool emptyLumisectionMode_ = false
 
Encoding encModule_
 
std::vector< EncodingencPath_
 
std::vector< unsigned int > eventCountForPathInit_
 
bool exception_detected_ = false
 
std::vector< unsigned int > exceptionInLS_
 
std::string fastMicrostateDefPath_
 
unsigned int fastMonIntervals_
 
std::string fastName_
 
std::string fastPath_
 
std::vector< std::string > fastPathList_
 
timeval fileLookStart_
 
timeval fileLookStop_
 
bool filePerFwkStream_
 
std::map< unsigned int,
unsigned int > 
filesProcessedDuringLumi_
 
std::vector< unsigned long > firstEventId_
 
FastMonitoringThread fmt_
 
std::string inputLegendFileJson_
 
FedRawDataInputSourceinputSource_ = 0
 
FastMonitoringThread::InputState inputState_
 
FastMonitoringThread::InputState inputSupervisorState_
 
bool isGlobalLumiTransition_
 
bool isInitTransition_
 
unsigned int lastGlobalLumi_
 
std::queue< unsigned int > lastGlobalLumisClosed_
 
std::vector< double > leadTimes_
 
std::map< unsigned int,
std::pair< double, unsigned
int > > 
lockStatsDuringLumi_
 
unsigned int lumiFromSource_
 
std::map< unsigned int, timeval > lumiStartTime_
 
FastMonitoringThread::Macrostate macrostate_
 
std::vector< const void * > microstate_
 
std::string microstateDefPath_
 
std::vector< const void * > ministate_
 
std::string moduleLegendFile_
 
std::string moduleLegendFileJson_
 
std::atomic< bool > monInit_
 
unsigned int nOutputModules_ =0
 
unsigned int nStreams_
 
unsigned int nThreads_
 
std::string pathLegendFile_
 
std::string pathLegendFileJson_
 
bool pathLegendWritten_ = false
 
std::vector< bool > pathNamesReady_
 
std::map< unsigned int,
std::pair< unsigned int, bool > > 
processedEventsPerLumi_
 
boost::filesystem::path runDirectory_
 
int sleepTime_
 
std::string slowName_
 
unsigned int snapCounter_ = 0
 
std::vector< std::atomic< bool > * > streamCounterUpdating_
 
bool threadIDAvailable_ = false
 
std::vector< const void * > threadMicrostate_
 
std::atomic< unsigned long > totalEventsProcessed_
 
boost::filesystem::path workingDirectory_
 

Additional Inherited Members

- Public Types inherited from evf::MicroStateService
enum  Microstate {
  mInvalid = 0, mIdle, mFwkOvhSrc, mFwkOvhMod,
  mFwkEoL, mInput, mDqm, mBoL,
  mEoL, mGlobEoL, mCOUNT
}
 
- Static Protected Attributes inherited from evf::MicroStateService
static const std::string default_return_ ="NotImplemented"
 

Detailed Description

Definition at line 57 of file FastMonitoringService.h.

Constructor & Destructor Documentation

evf::FastMonitoringService::FastMonitoringService ( const edm::ParameterSet iPS,
edm::ActivityRegistry reg 
)

Definition at line 60 of file FastMonitoringService.cc.

evf::FastMonitoringService::~FastMonitoringService ( )

Definition at line 120 of file FastMonitoringService.cc.

Member Function Documentation

void evf::FastMonitoringService::accumulateFileSize ( unsigned int  lumi,
unsigned long  fileSize 
)

Definition at line 655 of file FastMonitoringService.cc.

void evf::FastMonitoringService::doSnapshot ( const unsigned int  ls,
const bool  isGlobalEOL 
)
private

Definition at line 739 of file FastMonitoringService.cc.

void evf::FastMonitoringService::doStreamEOLSnapshot ( const unsigned int  ls,
const unsigned int  streamID 
)
inlineprivate

Definition at line 181 of file FastMonitoringService.h.

void evf::FastMonitoringService::dowork ( )
inlineprivate

Definition at line 186 of file FastMonitoringService.h.

void evf::FastMonitoringService::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 124 of file FastMonitoringService.cc.

bool evf::FastMonitoringService::getAbortFlagForLumi ( unsigned int  lumi)

Definition at line 725 of file FastMonitoringService.cc.

unsigned int evf::FastMonitoringService::getEventsProcessedForLumi ( unsigned int  lumi,
bool *  abortFlag = 0 
)

Definition at line 709 of file FastMonitoringService.cc.

std::string evf::FastMonitoringService::getRunDirName ( ) const
inline

Definition at line 172 of file FastMonitoringService.h.

void evf::FastMonitoringService::jobFailure ( )

Definition at line 347 of file FastMonitoringService.cc.

std::string evf::FastMonitoringService::makeInputLegendaJson ( )

Definition at line 164 of file FastMonitoringService.cc.

std::string evf::FastMonitoringService::makeModuleLegendaJson ( )

Definition at line 148 of file FastMonitoringService.cc.

std::string evf::FastMonitoringService::makePathLegendaJson ( )

Definition at line 136 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postBeginJob ( )

Definition at line 369 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postEndJob ( )

Definition at line 384 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postEvent ( edm::StreamContext const &  sc)

Definition at line 590 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postGlobalBeginRun ( edm::GlobalContext const &  gc)

Definition at line 390 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postGlobalEndLumi ( edm::GlobalContext const &  gc)

Definition at line 507 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 632 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postSourceEvent ( edm::StreamID  sid)

Definition at line 622 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postStreamBeginLumi ( edm::StreamContext const &  sc)

Definition at line 526 of file FastMonitoringService.cc.

void evf::FastMonitoringService::postStreamEndLumi ( edm::StreamContext const &  sc)

Definition at line 547 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preallocate ( edm::service::SystemBounds const &  bounds)

Definition at line 174 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preBeginJob ( edm::PathsAndConsumesOfModulesBase const &  ,
edm::ProcessContext const &  pc 
)

Definition at line 183 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preEvent ( edm::StreamContext const &  sc)

Definition at line 586 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preGlobalBeginLumi ( edm::GlobalContext const &  gc)

Definition at line 396 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preGlobalEarlyTermination ( edm::GlobalContext const &  gc,
edm::TerminationOrigin  to 
)

Definition at line 319 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preGlobalEndLumi ( edm::GlobalContext const &  gc)

Definition at line 420 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preModuleBeginJob ( edm::ModuleDescription const &  desc)

Definition at line 353 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preModuleEvent ( edm::StreamContext const &  sc,
edm::ModuleCallingContext const &  mcc 
)

Definition at line 627 of file FastMonitoringService.cc.

void evf::FastMonitoringService::prePathEvent ( edm::StreamContext const &  sc,
edm::PathContext const &  pc 
)

Definition at line 553 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preSourceEarlyTermination ( edm::TerminationOrigin  to)

Definition at line 331 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preSourceEvent ( edm::StreamID  sid)

Definition at line 617 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preStreamBeginLumi ( edm::StreamContext const &  sc)

Definition at line 513 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preStreamEarlyTermination ( edm::StreamContext const &  sc,
edm::TerminationOrigin  to 
)

Definition at line 307 of file FastMonitoringService.cc.

void evf::FastMonitoringService::preStreamEndLumi ( edm::StreamContext const &  sc)

Definition at line 531 of file FastMonitoringService.cc.

void evf::FastMonitoringService::reportLockWait ( unsigned int  ls,
double  waitTime,
unsigned int  lockCount 
)

Definition at line 701 of file FastMonitoringService.cc.

void evf::FastMonitoringService::setExceptionDetected ( unsigned int  ls)

Definition at line 342 of file FastMonitoringService.cc.

void evf::FastMonitoringService::setInputSource ( FedRawDataInputSource inputSource)
inline

Definition at line 173 of file FastMonitoringService.h.

void evf::FastMonitoringService::setInState ( FastMonitoringThread::InputState  inputState)
inline

Definition at line 174 of file FastMonitoringService.h.

void evf::FastMonitoringService::setInStateSup ( FastMonitoringThread::InputState  inputState)
inline

Definition at line 175 of file FastMonitoringService.h.

void evf::FastMonitoringService::setMicroState ( MicroStateService::Microstate  m)
virtual

Implements evf::MicroStateService.

Definition at line 642 of file FastMonitoringService.cc.

void evf::FastMonitoringService::setMicroState ( edm::StreamID  sid,
MicroStateService::Microstate  m 
)
virtual

Implements evf::MicroStateService.

Definition at line 649 of file FastMonitoringService.cc.

bool evf::FastMonitoringService::shouldWriteFiles ( unsigned int  lumi,
unsigned int *  proc = 0 
)
inline

Definition at line 166 of file FastMonitoringService.h.

void evf::FastMonitoringService::startedLookingForFile ( )

Definition at line 667 of file FastMonitoringService.cc.

void evf::FastMonitoringService::stoppedLookingForFile ( unsigned int  lumi)

Definition at line 675 of file FastMonitoringService.cc.

Member Data Documentation

std::map<unsigned int, unsigned long> evf::FastMonitoringService::accuSize_
private

Definition at line 270 of file FastMonitoringService.h.

std::map<unsigned int, double> evf::FastMonitoringService::avgLeadTime_
private

Definition at line 267 of file FastMonitoringService.h.

std::vector<std::atomic<bool>*> evf::FastMonitoringService::collectedPathList_
private

Definition at line 282 of file FastMonitoringService.h.

bool evf::FastMonitoringService::emptyLumisectionMode_ = false
private

Definition at line 303 of file FastMonitoringService.h.

Encoding evf::FastMonitoringService::encModule_
private

Definition at line 231 of file FastMonitoringService.h.

std::vector<Encoding> evf::FastMonitoringService::encPath_
private

Definition at line 232 of file FastMonitoringService.h.

std::vector<unsigned int> evf::FastMonitoringService::eventCountForPathInit_
private

Definition at line 283 of file FastMonitoringService.h.

bool evf::FastMonitoringService::exception_detected_ = false
private

Definition at line 301 of file FastMonitoringService.h.

std::vector<unsigned int> evf::FastMonitoringService::exceptionInLS_
private

Definition at line 302 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::fastMicrostateDefPath_
private

Definition at line 242 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::fastMonIntervals_
private

Definition at line 240 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::fastName_
private

Definition at line 243 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::fastPath_
private

Definition at line 243 of file FastMonitoringService.h.

std::vector<std::string> evf::FastMonitoringService::fastPathList_
private

Definition at line 304 of file FastMonitoringService.h.

timeval evf::FastMonitoringService::fileLookStart_
private

Definition at line 249 of file FastMonitoringService.h.

timeval evf::FastMonitoringService::fileLookStop_
private

Definition at line 249 of file FastMonitoringService.h.

bool evf::FastMonitoringService::filePerFwkStream_
private

Definition at line 244 of file FastMonitoringService.h.

std::map<unsigned int, unsigned int> evf::FastMonitoringService::filesProcessedDuringLumi_
private

Definition at line 268 of file FastMonitoringService.h.

std::vector<unsigned long> evf::FastMonitoringService::firstEventId_
private

Definition at line 281 of file FastMonitoringService.h.

FastMonitoringThread evf::FastMonitoringService::fmt_
private

Definition at line 230 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::inputLegendFileJson_
private

Definition at line 296 of file FastMonitoringService.h.

FedRawDataInputSource* evf::FastMonitoringService::inputSource_ = 0
private

Definition at line 233 of file FastMonitoringService.h.

FastMonitoringThread::InputState evf::FastMonitoringService::inputState_
private

Definition at line 234 of file FastMonitoringService.h.

const std::string evf::FastMonitoringService::inputStateNames
static
Initial value:
=
{"Ignore","Init","WaitInput","NewLumi","NewLumiBusyEndingLS","NewLumiIdleEndingLS","RunEnd","ProcessingFile","WaitChunk","ChunkReceived",
"ChecksumEvent","CachedEvent","ReadEvent","ReadCleanup","NoRequest","NoRequestWithIdleThreads",
"NoRequestWithGlobalEoL","NoRequestWithEoLThreads",
"SupFileLimit", "SupWaitFreeChunk","SupWaitFreeChunkCopying", "SupWaitFreeThread","SupWaitFreeThreadCopying",
"SupBusy", "SupLockPolling","SupLockPollingCopying",
"SupNoFile", "SupNewFile", "SupNewFileWaitThreadCopying", "SupNewFileWaitThread",
"SupNewFileWaitChunkCopying", "SupNewFileWaitChunk",
"WaitInput_fileLimit","WaitInput_waitFreeChunk","WaitInput_waitFreeChunkCopying","WaitInput_waitFreeThread","WaitInput_waitFreeThreadCopying",
"WaitInput_busy","WaitInput_lockPolling","WaitInput_lockPollingCopying","WaitInput_runEnd",
"WaitInput_noFile","WaitInput_newFile","WaitInput_newFileWaitThreadCopying","WaitInput_newFileWaitThread",
"WaitInput_newFileWaitChunkCopying","WaitInput_newFileWaitChunk",
"WaitChunk_fileLimit","WaitChunk_waitFreeChunk","WaitChunk_waitFreeChunkCopying","WaitChunk_waitFreeThread","WaitChunk_waitFreeThreadCopying",
"WaitChunk_busy","WaitChunk_lockPolling","WaitChunk_lockPollingCopying","WaitChunk_runEnd",
"WaitChunk_noFile","WaitChunk_newFile","WaitChunk_newFileWaitThreadCopying","WaitChunk_newFileWaitThread",
"WaitChunk_newFileWaitChunkCopying","WaitChunk_newFileWaitChunk"
}

Definition at line 115 of file FastMonitoringService.h.

FastMonitoringThread::InputState evf::FastMonitoringService::inputSupervisorState_
private

Definition at line 235 of file FastMonitoringService.h.

bool evf::FastMonitoringService::isGlobalLumiTransition_
private

Definition at line 253 of file FastMonitoringService.h.

bool evf::FastMonitoringService::isInitTransition_
private

Definition at line 254 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::lastGlobalLumi_
private

Definition at line 251 of file FastMonitoringService.h.

std::queue<unsigned int> evf::FastMonitoringService::lastGlobalLumisClosed_
private

Definition at line 252 of file FastMonitoringService.h.

std::vector<double> evf::FastMonitoringService::leadTimes_
private

Definition at line 271 of file FastMonitoringService.h.

std::map<unsigned int, std::pair<double,unsigned int> > evf::FastMonitoringService::lockStatsDuringLumi_
private

Definition at line 272 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::lumiFromSource_
private

Definition at line 255 of file FastMonitoringService.h.

std::map<unsigned int, timeval> evf::FastMonitoringService::lumiStartTime_
private

Definition at line 248 of file FastMonitoringService.h.

FastMonitoringThread::Macrostate evf::FastMonitoringService::macrostate_
private

Definition at line 258 of file FastMonitoringService.h.

const std::string evf::FastMonitoringService::macroStateNames
static
Initial value:
=
{"Init","JobReady","RunGiven","Running",
"Stopping","Done","JobEnded","Error","ErrorEnded","End",
"Invalid"}

Definition at line 114 of file FastMonitoringService.h.

std::vector<const void*> evf::FastMonitoringService::microstate_
private

Definition at line 262 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::microstateDefPath_
private

Definition at line 242 of file FastMonitoringService.h.

std::vector<const void*> evf::FastMonitoringService::ministate_
private

Definition at line 261 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::moduleLegendFile_
private

Definition at line 292 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::moduleLegendFileJson_
private

Definition at line 293 of file FastMonitoringService.h.

std::atomic<bool> evf::FastMonitoringService::monInit_
private

Definition at line 300 of file FastMonitoringService.h.

const std::string evf::FastMonitoringService::nopath_ = "NoPath"
static

Definition at line 118 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::nOutputModules_ =0
private

Definition at line 298 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::nStreams_
private

Definition at line 237 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::nThreads_
private

Definition at line 238 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::pathLegendFile_
private

Definition at line 294 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::pathLegendFileJson_
private

Definition at line 295 of file FastMonitoringService.h.

bool evf::FastMonitoringService::pathLegendWritten_ = false
private

Definition at line 297 of file FastMonitoringService.h.

std::vector<bool> evf::FastMonitoringService::pathNamesReady_
private

Definition at line 284 of file FastMonitoringService.h.

std::map<unsigned int, std::pair<unsigned int,bool> > evf::FastMonitoringService::processedEventsPerLumi_
private

Definition at line 275 of file FastMonitoringService.h.

boost::filesystem::path evf::FastMonitoringService::runDirectory_
private

Definition at line 286 of file FastMonitoringService.h.

int evf::FastMonitoringService::sleepTime_
private

Definition at line 239 of file FastMonitoringService.h.

std::string evf::FastMonitoringService::slowName_
private

Definition at line 243 of file FastMonitoringService.h.

unsigned int evf::FastMonitoringService::snapCounter_ = 0
private

Definition at line 241 of file FastMonitoringService.h.

std::vector<std::atomic<bool>*> evf::FastMonitoringService::streamCounterUpdating_
private

Definition at line 279 of file FastMonitoringService.h.

bool evf::FastMonitoringService::threadIDAvailable_ = false
private

Definition at line 288 of file FastMonitoringService.h.

std::vector<const void*> evf::FastMonitoringService::threadMicrostate_
private

Definition at line 263 of file FastMonitoringService.h.

std::atomic<unsigned long> evf::FastMonitoringService::totalEventsProcessed_
private

Definition at line 290 of file FastMonitoringService.h.

boost::filesystem::path evf::FastMonitoringService::workingDirectory_
private

Definition at line 286 of file FastMonitoringService.h.