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) {
72 void AddBinsI(
unsigned int nBins,
unsigned int nEmptyBins) {
103 virtual void First() = 0;
104 virtual void Next() = 0;
105 virtual bool IsDone()
const = 0;
112 template <
class Item>
136 static unsigned int id = 10;
163 if (subfolder->name() ==
name)
185 result += subfolder->getHistos();
191 result += subfolder->getBins();
197 result += subfolder->getEmptyBins();
203 result += subfolder->getMemory();
206 void update(
unsigned int bins,
unsigned int empty,
unsigned int memory) {
216 <<
" Memory: " <<
getMemory() <<
" and my children are: " << std::endl;
218 subfolder->dump(indent);
223 std::stringstream
s(
"");
224 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, "
229 sql_statement.append(s.str());
231 subfolder->mainrows(sql_statement);
236 std::stringstream
s(
"");
237 s <<
"INSERT INTO symbols(id, name, filename_id) VALUES (" <<
id_ <<
",\"" <<
folderName_ <<
"\", " << parentid
239 sql_statement.append(s.str());
241 subfolder->symbols(sql_statement);
246 std::stringstream
s(
"");
247 s <<
"INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
250 sql_statement.append(s.str());
252 subfolder->parents(sql_statement);
257 std::stringstream
s(
"");
258 s <<
"INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) "
263 sql_statement.append(s.str());
265 subfolder->children(sql_statement);
269 std::stringstream
s(
"");
270 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, "
274 sql_statement.append(s.str());
278 std::stringstream
s(
"");
279 s <<
"INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\"," <<
getMemory()
280 <<
"," <<
getBins() <<
", 1);\n";
281 sql_statement.append(s.str());
285 std::stringstream
s(
"");
286 s <<
"INSERT INTO files(id, name) VALUES(" <<
id_ <<
",\"" <<
folderName_ <<
"\");\n";
287 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_
void AddBinsI(unsigned int nBins, unsigned int nEmptyBins)
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)