1 #ifndef DQMStoreStats_H
2 #define DQMStoreStats_H
77 virtual void First() = 0;
78 virtual void Next() = 0;
79 virtual bool IsDone()
const = 0;
114 static unsigned int id=10;
137 if ( (*i)->name()==
name )
160 result += (*i)->getHistos();
166 result += (*i)->getBins();
172 result += (*i)->getEmptyBins();
178 result += (*i)->getMemory();
193 <<
" with ID: " <<
id_
196 <<
" and my children are: " << std::endl;
207 std::stringstream
s(
"");
208 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)"
209 " VALUES(" <<
id_ <<
", " <<
id_ <<
", "
213 sql_statement.append(s.str());
215 (*i)->mainrows(sql_statement) ;
221 std::stringstream
s(
"");
222 s <<
"INSERT INTO symbols(id, name, filename_id) VALUES (" <<
id_ <<
",\"" <<
folderName_ <<
"\", "
223 << parentid <<
");\n" ;
224 sql_statement.append(s.str());
226 (*i)->symbols(sql_statement) ;
232 std::stringstream
s(
"");
233 s <<
"INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
236 sql_statement.append(s.str());
238 (*i)->parents(sql_statement) ;
244 std::stringstream
s(
"");
245 s <<
"INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) VALUES("
246 <<
id_ <<
"," << parentid <<
","
249 sql_statement.append(s.str());
251 (*i)->children(sql_statement) ;
256 std::stringstream
s(
"");
257 s <<
"INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)"
258 <<
" VALUES(" <<
id_ <<
"," <<
id_ <<
"," << 0 <<
"," <<
getMemory() <<
", 0,"
261 sql_statement.append(s.str());
266 std::stringstream
s(
"");
267 s <<
"INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\","
269 sql_statement.append(s.str());
274 std::stringstream
s(
"");
275 s <<
"INSERT INTO files(id, name) VALUES(" <<
id_ <<
",\"" <<
folderName_ <<
"\");\n" ;
276 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)