1 #ifndef EVENTFILTER_GOODIES_IDIE_H
2 #define EVENTFILTER_GOODIES_IDIE_H
5 #include "xdaq/Application.h"
7 #include "xdata/String.h"
8 #include "xdata/Double.h"
9 #include "xdata/Float.h"
10 #include "xdata/UnsignedInteger32.h"
11 #include "xdata/Boolean.h"
12 #include "xdata/TimeVal.h"
13 #include "xdata/ActionListener.h"
15 #include "xoap/MessageReference.h"
16 #include "xoap/MessageFactory.h"
17 #include "xoap/Method.h"
19 #include "xgi/Utils.h"
20 #include "xgi/Input.h"
21 #include "xgi/Output.h"
22 #include "xgi/Method.h"
24 #include "toolbox/net/URN.h"
25 #include "toolbox/fsm/exception/Exception.h"
26 #include "toolbox/task/TimerListener.h"
90 typedef std::map<std::string,internal::fu>
fmap;
94 public xdaq::Application,
95 public xdata::ActionListener,
96 public toolbox::task::TimerListener
107 iDie(xdaq::ApplicationStub *
s);
181 const std::vector<std::pair<unsigned int, unsigned int>>& offenders);
316 std::vector<TriggerReportStatic>
trp_;
370 for (
size_t i=0;
i<classes;
i++) {
381 void setBusyForClass(
unsigned int classIdx,
float rate,
float busy,
float busyTheor,
float busyCPU,
float busyCPUTheor,
unsigned int nMachineReports) {
398 double sumMachines=0;
407 return float(sum/sumMachines);
422 return sum/sumMachines;
433 std::ostringstream
info;
467 lsStat(
unsigned int ls,
unsigned int nbSubs,
unsigned int maxreps,
unsigned int nmodulenames):
484 void update(
unsigned int nSampledNonIdle,
unsigned int nSampledIdle,
485 unsigned int nProc,
unsigned int ncpubusy,
unsigned int deltaTms)
533 float nAllInv = 1./sampled;
537 double fracWaitingAvgErr=
sqrt(
538 (
pow(nSampledIdle_,2)*nSampledNonIdleErr2
606 std::vector<std::pair<unsigned int, unsigned int>>
ret;
610 std::pair<unsigned int,unsigned int> *moduleSumsCopy =
new std::pair<unsigned int,unsigned int>[
nmodulenames_];
614 sizeof(std::pair<unsigned int,unsigned int>), modlistSortFunction);
616 unsigned int count=0;
617 unsigned int saveidx=0;
620 if (moduleSumsCopy[count].
first==2) {count++;
continue;}
621 ret.push_back(moduleSumsCopy[count]);
625 delete moduleSumsCopy;
710 std::pair<unsigned int,unsigned int> intOne = *((std::pair<unsigned int,unsigned int>*)a);
711 std::pair<unsigned int,unsigned int> intTwo = *((std::pair<unsigned int,unsigned int>*)b);
712 if (intOne.second > intTwo.second)
714 if (intOne.second == intTwo.second)
720 return val - fmod(val,mod);
xdata::Boolean debugMode_
unsigned int cpuLoadReports12_[4000]
xdata::UnsignedInteger32 flashReports16_
std::vector< std::pair< unsigned int, unsigned int > > getOffendersVector()
MonitorElement * daqTotalRateSummary_
unsigned int cpuLoadReports16_[4000]
void updateDatasetHistos(unsigned int forls, commonLsStat *clst, commonLsStat *prevclst)
timeval runStartDetectedTimeStamp_
std::atomic< unsigned int > cpuLoadSentLs_
xdata::UnsignedInteger32 runNumber_
xdata::Boolean dqmEnabled_
MonitorElement * busySummary2_
std::vector< float > busyCPUVec_
timeval lastModuleLegendaMessageTimeStamp_
MonitorElement * hostNameMe_
void setRunStartTimeStamp()
unsigned int summaryLastLs_
std::vector< float > machineWeightInst
xdata::Float flashLoadPS_
xdata::UnsignedInteger32 instance_
int operator[](size_t ind) const
void parseDatasetLegenda(std::string)
std::deque< commonLsStat * > commonLsHistory
unsigned int cpuLoadReports7_[4000]
float cpuLoadTime24_[4000]
MonitorElement * busyModules_
unsigned int nbSubsClasses
int nModuleLegendaMessageWithDataReceived_
iDie(xdaq::ApplicationStub *s)
void setBusyForClass(unsigned int classIdx, float rate, float busy, float busyTheor, float busyCPU, float busyCPUTheor, unsigned int nMachineReports)
int nPathHistoMessageReceived_
MonitorElement * busySummaryUncorr2_
xdata::UnsignedInteger32 flashLoadLs_
float cpuLoadRate16_[4000]
MonitorElement * processStartTimeStampMe_
xdata::UnsignedInteger32 flashReports32_
MonitorElement * daqBusySummary_
std::pair< unsigned int, unsigned int > * moduleSamplingSums
void updateRollingHistos(unsigned int nbsIdx, unsigned int lsid, lsStat *lst, commonLsStat *clst, bool roll)
xdata::Float flashLoadTime7_
std::vector< float > rateVec_
void parsePathLegenda(std::string)
int etimesRun[evf::max_endpaths]
unsigned int nSampledNonIdle_
MonitorElement * workingDirMe_
MonitorElement * daqBusySummary2_
float cpuLoadRate8_[4000]
xdata::UnsignedInteger32 flashReports24_
xdata::UnsignedInteger32 saveLsInterval_
std::vector< std::map< unsigned int, unsigned int > > occupancyNameMap
int ptimesFailed[evf::max_paths]
xdata::String dqmCollectorPort_
xdata::Float flashLoadRate12_
std::vector< float > busyCPUVecTheor_
timeval * reportingStart_
void initMonitorElementsStreams()
int ptimesPassedPs[evf::max_paths]
void postEntryiChoke(xgi::Input *in, xgi::Output *out)
void perLumiFileSaver(unsigned int lsid)
int nModuleHistoMessageReceived_
int nDatasetLegendaMessageReceived_
edm::EventProcessor * evtProcessor_
int etimesFailed[evf::max_endpaths]
xdata::Float flashLoadUc32_
std::vector< MonitorElement * > meVecTime_
void iChoke(xgi::Input *in, xgi::Output *out)
void fillDQMStatHist(unsigned int nbsIdx, unsigned int lsid)
std::vector< float > busyVecTheor_
MonitorElement * lumisecId_
std::vector< unsigned int > currentLs_
std::vector< MonitorElement * > endPathRates_
std::pair< unsigned int, unsigned int > * getModuleSamplingPtr()
void parseModuleLegenda(std::string)
int ptimesExcept[evf::max_paths]
xdata::Float flashLoadUc12_
MonitorElement * eventId_
float getRatePerMachine()
std::vector< MonitorElement * > meVecRate_
std::string fileBaseName_
unsigned int getReports()
float getBusyTotalFrac(bool procstat, std::vector< float > &machineWeightInst)
float getOffenderFracAt(unsigned int x)
void updater(xgi::Input *in, xgi::Output *out)
unsigned int getNSampledNonIdle()
float cpuLoadTime12_[4000]
void update(unsigned int nSampledNonIdle, unsigned int nSampledIdle, unsigned int nProc, unsigned int ncpubusy, unsigned int deltaTms)
bool meInitializedStreams_
std::vector< unsigned int > datasetCounts_
unsigned int cpuLoadReports8_[4000]
std::vector< int > cpuentries_
std::vector< unsigned int > epMax
std::map< std::string, internal::fu > fmap
MonitorElement * cmsswVerMe_
unsigned int nmodulenames_
unsigned int lastSavedForTime_
std::vector< int > trpentries_
lsStat(unsigned int ls, unsigned int nbSubs, unsigned int maxreps, unsigned int nmodulenames)
int nModuleLegendaMessageReceived_
void fillDQMModFractionHist(unsigned int nbsIdx, unsigned int lsid, unsigned int nonIdle, const std::vector< std::pair< unsigned int, unsigned int >> &offenders)
float fround(float val, float mod)
std::vector< TriggerReportStatic > trp_
void spotlight(xgi::Input *in, xgi::Output *out)
std::vector< std::vector< int > > cpustat_
xdata::Float flashLoadTime32_
xdata::Float flashLoadRate32_
xdata::Float flashLoadUc8_
float cpuLoadTime7_[4000]
MonitorElement * processLatencyMe_
MonitorElement * processNameMe_
unsigned int nMaxReports_
xdata::Float flashLoadUc24_
xdata::UnsignedInteger32 flashReports12_
void updateStreamHistos(unsigned int forls, commonLsStat *clst, commonLsStat *prevclst)
xdata::Float flashLoadTime24_
int etimesPassedL1[evf::max_endpaths]
unsigned int nSampledIdle_
xdata::UnsignedInteger32 flashReports8_
MonitorElement * processIdMe_
unsigned int nSampledIdle2_
xoap::MessageReference fsmCallback(xoap::MessageReference msg)
int etimesPassed[evf::max_endpaths]
unsigned int cpuLoadReports32_[4000]
MonitorElement * eventTimeStamp_
std::atomic< unsigned int > cpuLoadLastLs_
void actionPerformed(xdata::Event &e)
MonitorElement * timingSummary_
xdata::Float flashLoadUc7_
void detailsTable(xgi::Input *in, xgi::Output *out)
std::vector< MonitorElement * > meVecCPU_
void timeExpired(toolbox::task::TimerEvent &e)
void postEntry(xgi::Input *in, xgi::Output *out)
bool writeDirectoryPresent_
unsigned int getNReports()
float cpuLoadRate32_[4000]
xdata::Float flashLoadRate16_
int etimesExcept[evf::max_endpaths]
xdata::Float flashLoadTime16_
MonitorElement * rateSummary_
MonitorElement * busySummary_
float cpuLoadRate12_[4000]
void parsePathHisto(const unsigned char *, unsigned int)
MonitorElement * busySummaryUncorr1_
void deleteModuleSamplingPtr()
int ptimesPassedL1[evf::max_paths]
unsigned int sumDeltaTms_
std::vector< std::string > datasetNames_
void dumpTable(xgi::Input *in, xgi::Output *out)
std::vector< unsigned int > nbMachines
void initMonitorElements()
timeval lastPathLegendaMessageTimeStamp_
int nDatasetLegendaMessageWithDataReceived_
xdata::InfoSpace * cpuInfoSpace_
std::vector< float > HTscaling
std::vector< float > machineWeight
std::vector< unsigned int > epInstances
std::map< int, unsigned int > nbSubsListInv
xdata::String dqmCollectorHost_
std::vector< MonitorElement * > datasetRates_
void defaultWeb(xgi::Input *in, xgi::Output *out)
void iChokeMiniInterface(xgi::Input *in, xgi::Output *out)
xdata::UnsignedInteger32 flashReports7_
std::vector< std::string > mappath_
MonitorElement * processTimeStampMe_
std::vector< std::string > endPathNames_
bool operator()(const size_t a, const size_t b) const
xdata::Float flashLoadTime8_
std::vector< std::string > signals
void initMonitorElementsDatasets()
int nPathLegendaMessageWithDataReceived_
float cpuLoadRate24_[4000]
MonitorElement * reportPeriodSummary_
static const size_t max_paths
xdata::Float flashLoadRate_
MonitorElement * nUpdatesMe_
xdata::String dqmSaveDir_
std::vector< float > busyVec_
boost::shared_ptr< std::vector< edm::ParameterSet > > pServiceSets_
float cpuLoadTime32_[4000]
commonLsStat(unsigned int lsid, unsigned int classes)
float getRateErrPerMachine()
int nPathLegendaMessageReceived_
edm::ServiceToken serviceToken_
void parseModuleHisto(const char *, unsigned int)
std::vector< MonitorElement * > meVecOffenders_
float cpuLoadTime16_[4000]
MonitorElement * processEventsMe_
TriggerReportStatic * trppriv_
unsigned int nSampledNonIdle2_
void summaryTable(xgi::Input *in, xgi::Output *out)
xdata::String topLevelFolder_
MonitorElement * fuReportsSummary_
xdata::Float flashLoadRate24_
std::vector< std::string > stacktraces
timeval lastDatasetLegendaMessageTimeStamp_
MonitorElement * processEventRateMe_
xdata::Float flashLoadRate7_
xdata::Float flashLoadUc16_
float cpuLoadRate7_[4000]
const std::vector< int > & arr_
std::deque< lsStat * > * lsHistory
bool meInitializedDatasets_
std::vector< unsigned int > nbMachines
MonitorElement * runStartTimeStamp_
xdata::Float flashLoadTime12_
xdata::Float flashLoadRate8_
unsigned int lastRunNumberSet_
xdata::Boolean dqmFilesWritable_
T mod(const T &a, const T &b)
std::vector< pid_t > cpids
std::map< unsigned int, int > nbSubsList
static const size_t max_endpaths
int ptimesPassed[evf::max_paths]
int modlistSortFunction(const void *a, const void *b)
float cpuLoadTime8_[4000]
Power< A, B >::type pow(const A &a, const B &b)
std::string configString_
std::list< std::string > pastSavedFiles_
int ptimesRun[evf::max_paths]
std::list< std::string > monNames_
sorted_indices(const std::vector< int > &arr)
xdata::UnsignedInteger32 flashRunNumber_
float getBusyTotalFracTheor(bool procstat, std::vector< float > &machineWeight)
std::vector< std::string > mapmod_
int etimesPassedPs[evf::max_endpaths]
unsigned int cpuLoadReports24_[4000]
std::vector< unsigned int > endPathCounts_