1 #ifndef DQMStoreStats_H
2 #define DQMStoreStats_H
75 virtual void First() = 0;
76 virtual void Next() = 0;
77 virtual bool IsDone()
const = 0;
112 static unsigned int id=10;
135 if ( (*i)->name()==
name )
158 result += (*i)->getHistos();
164 result += (*i)->getBins();
170 result += (*i)->getEmptyBins();
176 result += (*i)->getMemory();
191 <<
" with ID: " <<
id_
194 <<
" and my children are: " << std::endl;
205 std::stringstream
s(
"");
206 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)"
207 " VALUES(" <<
id_ <<
", " <<
id_ <<
", "
211 sql_statement.append(s.str());
213 (*i)->mainrows(sql_statement) ;
219 std::stringstream
s(
"");
220 s <<
"INSERT INTO symbols(id, name, filename_id) VALUES (" <<
id_ <<
",\"" <<
folderName_ <<
"\", "
221 << parentid <<
");\n" ;
222 sql_statement.append(s.str());
224 (*i)->symbols(sql_statement) ;
230 std::stringstream
s(
"");
231 s <<
"INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
234 sql_statement.append(s.str());
236 (*i)->parents(sql_statement) ;
242 std::stringstream
s(
"");
243 s <<
"INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) VALUES("
244 <<
id_ <<
"," << parentid <<
","
247 sql_statement.append(s.str());
249 (*i)->children(sql_statement) ;
254 std::stringstream
s(
"");
255 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)"
256 <<
" VALUES(" <<
id_ <<
"," <<
id_ <<
"," << 0 <<
"," <<
getMemory() <<
", 0,"
259 sql_statement.append(s.str());
264 std::stringstream
s(
"");
265 s <<
"INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\","
267 sql_statement.append(s.str());
272 std::stringstream
s(
"");
273 s <<
"INSERT INTO files(id, name) VALUES(" <<
id_ <<
",\"" <<
folderName_ <<
"\");\n" ;
274 sql_statement.append(s.str());
std::string subfolderName_
virtual bool IsDone() const =0
void AddBinsS(unsigned int nBins, unsigned int nEmptyBins)
void update(unsigned int bins, unsigned int empty, unsigned int memory)
virtual Item CurrentItem() const =0
void beginRun(const edm::Run &r, const edm::EventSetup &c)
void AddBinsD(unsigned int nBins, unsigned int nEmptyBins)
virtual bool IsDone() const
static unsigned int getId(void)
VIterator(const std::vector< Item > *aVector)
std::vector< std::pair< time_t, unsigned int > > memoryHistoryVector_
std::string subsystemName_
unsigned int getBins(void)
void mainrows_cumulative(std::string &sql_statement)
VIterator< Folder * > CreateIterator()
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void endRun(const edm::Run &r, const edm::EventSetup &c)
unsigned int totalMemory_
void summary(std::string &sql_statement)
const std::string & name(void)
std::string maxbinsmeglobal_
void mainrows(std::string &sql_statement)
std::vector< Folder * > subfolders_
bool isOpenProcFileSuccessful_
unsigned int totalEmptyBins_
void setLevel(unsigned int value)
unsigned int totalEmptyBins_
std::pair< unsigned int, unsigned int > readMemoryEntry(void) const
std::string pathnamematch_
std::string maxbinsmesubsys_
DQMStoreStats(const edm::ParameterSet &)
unsigned int getHistos(void)
void files(std::string &sql_statement)
void setFather(Folder *e)
void dump(std::string indent)
virtual Item CurrentItem() const
unsigned int totalHistos_
void parents(std::string &sql_statement)
Folder(const std::string name)
Folder * cd(const std::string &name)
edm::ParameterSet parameters_
void dumpMemoryProfile(void)
unsigned int totalMemory_
unsigned int getEmptyBins(void)
void AddBinsF(unsigned int nBins, unsigned int nEmptyBins)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
std::vector< std::vector< double > > tmp
void children(std::string &sql_statement)
void calcIgProfDump(Folder &)
unsigned int totalHistos_
const std::vector< Item > * vector_
std::stringstream procFileName_
void analyze(const edm::Event &e, const edm::EventSetup &c)
void symbols(std::string &sql_statement)
unsigned int getMemory(void)
void setId(unsigned int id)