1 #ifndef EvFFastMonitoringService_H 2 #define EvFFastMonitoringService_H 1 23 #include <unordered_map> 24 #include "oneapi/tbb/task_arena.h" 25 #include "oneapi/tbb/task_scheduler_observer.h" 52 namespace FastMonState {
212 void reportLockWait(
unsigned int ls,
double waitTime,
unsigned int lockCount);
231 static unsigned int getTID() {
return tbb::this_task_arena::current_thread_index(); }
234 void doSnapshot(
const unsigned int ls,
const bool isGlobalEOL);
243 std::unique_ptr<FastMonitoringThread>
fmt_;
244 std::unique_ptr<ConcurrencyTracker>
ct_;
std::atomic< bool > has_data_exception_
void prePathEvent(edm::StreamContext const &, edm::PathContext const &)
std::atomic< FastMonState::InputState > inputState_
static const std::string inputStateNames[FastMonState::inCOUNT]
void postModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::vector< ContainableAtomic< const void * > > microstate_
void postSourceEvent(edm::StreamID)
std::atomic< bool > isInitTransition_
void startedLookingForFile()
void setExceptionDetected(unsigned int ls)
void preallocate(edm::service::SystemBounds const &)
std::map< unsigned int, timeval > lumiStartTime_
void preGlobalBeginLumi(edm::GlobalContext const &)
void postGlobalEndLumi(edm::GlobalContext const &)
void postEvent(edm::StreamContext const &)
void accumulateFileSize(unsigned int lumi, unsigned long fileSize)
std::map< unsigned int, unsigned long > accuSize_
std::filesystem::path workingDirectory_
unsigned int snapCounter_
std::vector< std::atomic< bool > * > streamCounterUpdating_
bool tbbConcurrencyTracker_
unsigned int nOutputModules_
std::map< unsigned int, unsigned int > filesProcessedDuringLumi_
void preGlobalEndLumi(edm::GlobalContext const &)
unsigned int lastGlobalLumi_
bool isExceptionOnData(unsigned int ls)
std::unique_ptr< FastMonitoringThread > fmt_
void preGlobalEarlyTermination(edm::GlobalContext const &, edm::TerminationOrigin)
constexpr int nSpecialModules
std::string inputLegendFileJson_
unsigned int fastMonIntervals_
std::atomic< bool > monInit_
std::string makeModuleLegendaJson()
void preModuleBeginJob(edm::ModuleDescription const &)
std::string makeInputLegendaJson()
std::map< unsigned int, std::pair< unsigned int, bool > > processedEventsPerLumi_
unsigned int lumiFromSource_
std::string microstateDefPath_
void preStreamEndLumi(edm::StreamContext const &)
std::vector< ContainableAtomic< unsigned char > > tmicrostateAcqFlag_
std::map< unsigned int, double > avgLeadTime_
std::string moduleLegendFile_
void doSnapshot(const unsigned int ls, const bool isGlobalEOL)
void preStreamEarlyTermination(edm::StreamContext const &, edm::TerminationOrigin)
std::atomic< FastMonState::InputState > inputSupervisorState_
unsigned int nMonThreads_
StreamID const & streamID() const
static unsigned int getTID()
std::string fastMicrostateDefPath_
std::filesystem::path runDirectory_
std::string moduleLegendFileJson_
std::vector< ContainableAtomic< unsigned char > > microstateAcqFlag_
void preModuleEventAcquire(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void postStreamBeginLumi(edm::StreamContext const &)
static unsigned int getSID(edm::StreamContext const &sc)
void setInputSource(FedRawDataInputSource *inputSource)
std::unique_ptr< ConcurrencyTracker > ct_
void setInputSource(DAQSource *inputSource)
std::string getRunDirName() const
void preSourceEvent(edm::StreamID)
void postStreamEndLumi(edm::StreamContext const &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void preStreamBeginLumi(edm::StreamContext const &)
void setInStateSup(FastMonState::InputState inputState)
std::atomic< unsigned long > totalEventsProcessed_
FedRawDataInputSource * inputSource_
std::map< unsigned int, std::pair< double, unsigned int > > lockStatsDuringLumi_
void setTMicrostate(FastMonState::Microstate m)
constexpr int nReservedModules
std::vector< double > leadTimes_
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &pc)
void stoppedLookingForFile(unsigned int lumi)
static const std::string macroStateNames[FastMonState::MCOUNT]
static unsigned int getSID(edm::StreamID const &sid)
std::atomic< bool > has_source_exception_
DAQSource * daqInputSource_
void postGlobalBeginRun(edm::GlobalContext const &)
void preEvent(edm::StreamContext const &)
unsigned int getEventsProcessedForLumi(unsigned int lumi, bool *abortFlag=nullptr)
void preSourceEarlyTermination(edm::TerminationOrigin)
unsigned int value() const
bool getAbortFlagForLumi(unsigned int lumi)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
static const edm::ModuleDescription specialMicroStateNames[FastMonState::mCOUNT]
bool shouldWriteFiles(unsigned int lumi, unsigned int *proc=nullptr)
bool exceptionDetected() const
FastMonitoringService(const edm::ParameterSet &, edm::ActivityRegistry &)
void reportLockWait(unsigned int ls, double waitTime, unsigned int lockCount)
std::vector< unsigned int > exceptionInLS_
void setInState(FastMonState::InputState inputState)
std::vector< ContainableAtomic< const void * > > tmicrostate_