1 #ifndef DQMStoreStats_H
2 #define DQMStoreStats_H
54 void AddBinsF(
unsigned int nBins,
unsigned int nEmptyBins) {
60 void AddBinsS(
unsigned int nBins,
unsigned int nEmptyBins) {
66 void AddBinsD(
unsigned int nBins,
unsigned int nEmptyBins) {
97 virtual void First() = 0;
98 virtual void Next() = 0;
99 virtual bool IsDone()
const = 0;
106 template <
class Item>
130 static unsigned int id = 10;
157 if (subfolder->name() ==
name)
179 result += subfolder->getHistos();
185 result += subfolder->getBins();
191 result += subfolder->getEmptyBins();
197 result += subfolder->getMemory();
200 void update(
unsigned int bins,
unsigned int empty,
unsigned int memory) {
210 <<
" Memory: " <<
getMemory() <<
" and my children are: " << std::endl;
212 subfolder->dump(indent);
217 std::stringstream
s(
"");
218 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, "
223 sql_statement.append(s.str());
225 subfolder->mainrows(sql_statement);
230 std::stringstream
s(
"");
231 s <<
"INSERT INTO symbols(id, name, filename_id) VALUES (" <<
id_ <<
",\"" <<
folderName_ <<
"\", " << parentid
233 sql_statement.append(s.str());
235 subfolder->symbols(sql_statement);
240 std::stringstream
s(
"");
241 s <<
"INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
244 sql_statement.append(s.str());
246 subfolder->parents(sql_statement);
251 std::stringstream
s(
"");
252 s <<
"INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) "
257 sql_statement.append(s.str());
259 subfolder->children(sql_statement);
263 std::stringstream
s(
"");
264 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, "
268 sql_statement.append(s.str());
272 std::stringstream
s(
"");
273 s <<
"INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\"," <<
getMemory()
274 <<
"," <<
getBins() <<
", 1);\n";
275 sql_statement.append(s.str());
279 std::stringstream
s(
"");
280 s <<
"INSERT INTO files(id, name) VALUES(" <<
id_ <<
",\"" <<
folderName_ <<
"\");\n";
281 sql_statement.append(s.str());
std::string subfolderName_
static unsigned int getId()
virtual bool IsDone() const =0
const edm::EventSetup & c
void AddBinsS(unsigned int nBins, unsigned int nEmptyBins)
~VIterator() override=default
DQMStoreStatsSubsystem()=default
void update(unsigned int bins, unsigned int empty, unsigned int memory)
uint16_t *__restrict__ id
virtual Item CurrentItem() const =0
virtual ~Iterator()=default
void AddBinsD(unsigned int nBins, unsigned int nEmptyBins)
VIterator(const std::vector< Item > *aVector)
std::vector< std::pair< time_t, unsigned int > > memoryHistoryVector_
std::string subsystemName_
void mainrows_cumulative(std::string &sql_statement)
unsigned int getEmptyBins()
VIterator< Folder * > CreateIterator()
unsigned int totalMemory_
void summary(std::string &sql_statement)
dqm::reco::DQMStore DQMStore
std::string maxbinsmeglobal_
void endRun(const edm::Run &r, const edm::EventSetup &c) override
void mainrows(std::string &sql_statement)
DQMStoreStatsTopLevel()=default
std::vector< Folder * > subfolders_
const std::string & name()
bool isOpenProcFileSuccessful_
unsigned int totalEmptyBins_
void setLevel(unsigned int value)
unsigned int totalEmptyBins_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
Item CurrentItem() const override
std::string pathnamematch_
std::string maxbinsmesubsys_
DQMStoreStats(const edm::ParameterSet &)
void files(std::string &sql_statement)
void setFather(Folder *e)
void dump(std::string indent)
unsigned int totalHistos_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
void parents(std::string &sql_statement)
bool IsDone() const override
dqm::legacy::MonitorElement MonitorElement
Folder * cd(const std::string &name)
edm::ParameterSet parameters_
unsigned int totalMemory_
void AddBinsF(unsigned int nBins, unsigned int nEmptyBins)
void children(std::string &sql_statement)
void calcIgProfDump(Folder &)
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
std::pair< unsigned int, unsigned int > readMemoryEntry() const
unsigned int totalHistos_
const std::vector< Item > * vector_
std::stringstream procFileName_
~DQMStoreStats() override
void symbols(std::string &sql_statement)
void setId(unsigned int id)