#include <DQMStoreStats.h>
Public Member Functions | |
void | add (Folder *f) |
Folder * | cd (const std::string &name) |
void | children (std::string &sql_statement) |
VIterator< Folder * > | CreateIterator () |
void | dump (std::string indent) |
void | files (std::string &sql_statement) |
Folder (const std::string name) | |
unsigned int | getBins (void) |
unsigned int | getEmptyBins (void) |
Folder * | getFather () |
unsigned int | getHistos (void) |
unsigned int | getMemory (void) |
unsigned int | id (void) |
unsigned int | level (void) |
void | mainrows (std::string &sql_statement) |
void | mainrows_cumulative (std::string &sql_statement) |
const std::string & | name (void) |
void | parents (std::string &sql_statement) |
void | setFather (Folder *e) |
void | setId (unsigned int id) |
void | setLevel (unsigned int value) |
void | summary (std::string &sql_statement) |
void | symbols (std::string &sql_statement) |
void | update (unsigned int bins, unsigned int empty, unsigned int memory) |
~Folder (void) | |
Private Attributes | |
Folder * | father_ |
std::string | folderName_ |
unsigned int | id_ |
unsigned int | level_ |
std::vector< Folder * > | subfolders_ |
unsigned int | totalBins_ |
unsigned int | totalEmptyBins_ |
unsigned int | totalHistos_ |
unsigned int | totalMemory_ |
Definition at line 119 of file DQMStoreStats.h.
Folder::Folder | ( | const std::string | name | ) | [inline] |
Definition at line 121 of file DQMStoreStats.h.
Referenced by cd().
:totalHistos_(0),totalBins_(0), totalEmptyBins_(0),totalMemory_(0), id_(10),level_(0),folderName_(name), father_(0){;}
Folder::~Folder | ( | void | ) | [inline] |
Definition at line 126 of file DQMStoreStats.h.
References i, and subfolders_.
{ for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i) delete (*i); }
void Folder::add | ( | Folder * | f | ) | [inline] |
Definition at line 150 of file DQMStoreStats.h.
References getId(), level_, setFather(), setId(), setLevel(), and subfolders_.
Referenced by cd().
Folder* Folder::cd | ( | const std::string & | name | ) | [inline] |
Definition at line 135 of file DQMStoreStats.h.
References add(), Folder(), i, name(), subfolders_, and tmp.
Referenced by DQMStoreStats::calcstats().
void Folder::children | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 241 of file DQMStoreStats.h.
References getBins(), getEmptyBins(), getFather(), getMemory(), i, id(), id_, asciidump::s, subfolders_, and totalHistos_.
Referenced by DQMStoreStats::calcIgProfDump().
{ unsigned int parentid = this->getFather() ? this->getFather()->id() : id_; std::stringstream s(""); s << "INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) VALUES(" << id_ << "," << parentid << "," << getMemory() << "," << getBins() - getEmptyBins() << "," << totalHistos_ << ",0" << ");\n"; sql_statement.append(s.str()); for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i ) (*i)->children(sql_statement) ; }
Definition at line 200 of file DQMStoreStats.h.
References subfolders_.
Referenced by DQMStoreStats::calcIgProfDump().
{ return VIterator<Folder *>(&subfolders_) ; }
void Folder::dump | ( | std::string | indent | ) | [inline] |
Definition at line 189 of file DQMStoreStats.h.
References gather_cfg::cout, getBins(), getEmptyBins(), getFather(), getHistos(), getMemory(), i, id_, name(), and subfolders_.
{ indent.append(" "); std::cout << indent << "I'm a " << name() << " whose father is " << getFather() << " with ID: " << id_ << " Histo: " << getHistos() << " Bins: " << getBins() << " EmptyBins: " << getEmptyBins() << " Memory: " << getMemory() << " and my children are: " << std::endl; for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i ) (*i)->dump(indent) ; }
void Folder::files | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 272 of file DQMStoreStats.h.
References folderName_, id_, and asciidump::s.
Referenced by DQMStoreStats::calcIgProfDump().
{ std::stringstream s(""); s << "INSERT INTO files(id, name) VALUES(" << id_ << ",\"" << folderName_ << "\");\n" ; sql_statement.append(s.str()); }
unsigned int Folder::getBins | ( | void | ) | [inline] |
Definition at line 163 of file DQMStoreStats.h.
References i, query::result, subfolders_, and totalBins_.
Referenced by children(), dump(), mainrows(), mainrows_cumulative(), and summary().
{ unsigned int result=totalBins_; for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i) result += (*i)->getBins(); return result; }
unsigned int Folder::getEmptyBins | ( | void | ) | [inline] |
Definition at line 169 of file DQMStoreStats.h.
References i, query::result, subfolders_, and totalEmptyBins_.
Referenced by children(), dump(), mainrows(), and mainrows_cumulative().
{ unsigned int result=totalEmptyBins_; for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i) result += (*i)->getEmptyBins(); return result; }
Folder* Folder::getFather | ( | ) | [inline] |
Definition at line 132 of file DQMStoreStats.h.
References father_.
Referenced by children(), dump(), parents(), and symbols().
{return father_;}
unsigned int Folder::getHistos | ( | void | ) | [inline] |
Definition at line 157 of file DQMStoreStats.h.
References i, query::result, subfolders_, and totalHistos_.
Referenced by dump(), mainrows(), and mainrows_cumulative().
{ unsigned int result=totalHistos_; for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i) result += (*i)->getHistos(); return result; }
unsigned int Folder::getMemory | ( | void | ) | [inline] |
Definition at line 175 of file DQMStoreStats.h.
References i, query::result, subfolders_, and totalMemory_.
Referenced by children(), dump(), mainrows(), mainrows_cumulative(), and summary().
{ unsigned int result=totalMemory_; for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i) result += (*i)->getMemory(); return result; }
unsigned int Folder::id | ( | void | ) | [inline] |
Definition at line 145 of file DQMStoreStats.h.
References id_.
Referenced by children(), parents(), setId(), and symbols().
{return id_;}
unsigned int Folder::level | ( | void | ) | [inline] |
void Folder::mainrows | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 205 of file DQMStoreStats.h.
References getBins(), getEmptyBins(), getHistos(), getMemory(), i, id_, asciidump::s, and subfolders_.
Referenced by DQMStoreStats::calcIgProfDump().
{ std::stringstream s(""); s << "INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)" " VALUES(" << id_ << ", " << id_ << ", " << getMemory() << ", " << getMemory() << ", " << subfolders_.size() << ", " << getBins() - getEmptyBins() << ", " << getBins() << ", " << getHistos() << ", " << getHistos() << ", 0.0);\n"; sql_statement.append(s.str()); for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i ) (*i)->mainrows(sql_statement) ; }
void Folder::mainrows_cumulative | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 254 of file DQMStoreStats.h.
References getBins(), getEmptyBins(), getHistos(), getMemory(), id_, and asciidump::s.
Referenced by DQMStoreStats::calcIgProfDump().
{ std::stringstream s(""); s << "INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)" << " VALUES(" << id_ << "," << id_ << "," << 0 << "," << getMemory() << ", 0," << getBins()-getEmptyBins() << "," << getBins() << ", 0, " << getHistos() << ", 0);\n"; sql_statement.append(s.str()); }
const std::string& Folder::name | ( | void | ) | [inline] |
Definition at line 133 of file DQMStoreStats.h.
References folderName_.
Referenced by cd(), and dump().
{return folderName_;}
void Folder::parents | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 229 of file DQMStoreStats.h.
References getFather(), i, id(), id_, asciidump::s, subfolders_, totalBins_, totalHistos_, and totalMemory_.
Referenced by DQMStoreStats::calcIgProfDump().
{ unsigned int parentid = this->getFather() ? this->getFather()->id() : id_; std::stringstream s(""); s << "INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES(" << parentid << "," << id_ << "," << totalMemory_ << "," << totalBins_ << "," << totalHistos_ << ",0" << ");\n"; sql_statement.append(s.str()); for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i ) (*i)->parents(sql_statement) ; }
void Folder::setFather | ( | Folder * | e | ) | [inline] |
Definition at line 131 of file DQMStoreStats.h.
References father_.
Referenced by add().
{father_ = e;}
void Folder::setId | ( | unsigned int | id | ) | [inline] |
void Folder::setLevel | ( | unsigned int | value | ) | [inline] |
Definition at line 146 of file DQMStoreStats.h.
References level_, and relativeConstraints::value.
Referenced by add().
void Folder::summary | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 264 of file DQMStoreStats.h.
References getBins(), getMemory(), and asciidump::s.
Referenced by DQMStoreStats::calcIgProfDump().
void Folder::symbols | ( | std::string & | sql_statement | ) | [inline] |
Definition at line 218 of file DQMStoreStats.h.
References folderName_, getFather(), i, id(), id_, asciidump::s, and subfolders_.
Referenced by DQMStoreStats::calcIgProfDump().
{ unsigned int parentid = this->getFather() ? this->getFather()->id() : id_; std::stringstream s(""); s << "INSERT INTO symbols(id, name, filename_id) VALUES (" << id_ << ",\"" << folderName_ << "\", " << parentid << ");\n" ; sql_statement.append(s.str()); for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i ) (*i)->symbols(sql_statement) ; }
void Folder::update | ( | unsigned int | bins, |
unsigned int | empty, | ||
unsigned int | memory | ||
) | [inline] |
Definition at line 181 of file DQMStoreStats.h.
References relativeConstraints::empty, totalBins_, totalEmptyBins_, totalHistos_, and totalMemory_.
Referenced by DQMStoreStats::calcstats().
{ totalHistos_ += 1; totalBins_ += bins; totalEmptyBins_ += empty; totalMemory_ += memory; }
Folder* Folder::father_ [private] |
Definition at line 287 of file DQMStoreStats.h.
Referenced by getFather(), and setFather().
std::string Folder::folderName_ [private] |
Definition at line 286 of file DQMStoreStats.h.
unsigned int Folder::id_ [private] |
Definition at line 284 of file DQMStoreStats.h.
Referenced by children(), dump(), files(), id(), mainrows(), mainrows_cumulative(), parents(), setId(), and symbols().
unsigned int Folder::level_ [private] |
Definition at line 285 of file DQMStoreStats.h.
Referenced by add(), level(), and setLevel().
std::vector<Folder*> Folder::subfolders_ [private] |
Definition at line 288 of file DQMStoreStats.h.
Referenced by add(), cd(), children(), CreateIterator(), dump(), getBins(), getEmptyBins(), getHistos(), getMemory(), mainrows(), parents(), symbols(), and ~Folder().
unsigned int Folder::totalBins_ [private] |
Definition at line 281 of file DQMStoreStats.h.
unsigned int Folder::totalEmptyBins_ [private] |
Definition at line 282 of file DQMStoreStats.h.
Referenced by getEmptyBins(), and update().
unsigned int Folder::totalHistos_ [private] |
Definition at line 280 of file DQMStoreStats.h.
Referenced by children(), getHistos(), parents(), and update().
unsigned int Folder::totalMemory_ [private] |
Definition at line 283 of file DQMStoreStats.h.
Referenced by getMemory(), parents(), and update().