CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Folder Class Reference

#include <DQMStoreStats.h>

Public Member Functions

void add (Folder *f)
 
Foldercd (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)
 
FoldergetFather ()
 
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

Folderfather_
 
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_
 

Detailed Description

Definition at line 119 of file DQMStoreStats.h.

Constructor & Destructor Documentation

Folder::Folder ( const std::string  name)
inline

Definition at line 121 of file DQMStoreStats.h.

Referenced by cd().

121  :totalHistos_(0),totalBins_(0),
123  id_(10),level_(0),folderName_(name),
124  father_(0){;}
unsigned int totalBins_
unsigned int totalMemory_
const std::string & name(void)
unsigned int totalEmptyBins_
Folder * father_
unsigned int totalHistos_
unsigned int level_
unsigned int id_
std::string folderName_
Folder::~Folder ( void  )
inline

Definition at line 126 of file DQMStoreStats.h.

References i, and subfolders_.

126  {
127  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
128  delete (*i);
129  }
int i
Definition: DBlmapReader.cc:9
std::vector< Folder * > subfolders_

Member Function Documentation

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().

150  {
151  f->setFather(this);
152  subfolders_.push_back(f);
153  f->setLevel(level_+1);
154  f->setId(getId());
155  }
static unsigned int getId(void)
std::vector< Folder * > subfolders_
void setLevel(unsigned int value)
void setFather(Folder *e)
unsigned int level_
void setId(unsigned int id)
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().

135  {
136  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
137  if ( (*i)->name()==name )
138  return (*i);
139  Folder * tmp = new Folder(name);
140  this->add(tmp);
141  return tmp;
142  }
int i
Definition: DBlmapReader.cc:9
void add(Folder *f)
const std::string & name(void)
std::vector< Folder * > subfolders_
Folder(const std::string name)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
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 python.Vispa.Share.BasicDataAccessor.BasicDataAccessor::allChildren(), python.Vispa.Views.LineDecayView.LineDecayView::autolayout(), python.Vispa.Views.BoxDecayView.BoxDecayContainer::autolayoutAlgorithm(), python.Vispa.Gui.WidgetContainer.WidgetContainer::autolayoutChildren(), python.Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), DQMStoreStats::calcIgProfDump(), python.Vispa.Views.LineDecayView.LineDecayContainer::childContainer(), python.Vispa.Views.WidgetView.WidgetView::clear(), python.Vispa.Views.LineDecayView.LineDecayContainer::createDecayObjectsFromPxlObject(), python.Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::deleteSelectedConnections(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::foundIn(), python.Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::getWidgetByName(), python.Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::hideMenuWidgets(), python.Vispa.Views.LineDecayView.LineDecayView::lineDecayContainer(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::nonSequenceChildren(), python.Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::portConnection(), python.Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::propagateEventUnderConnectionWidget(), python.Vispa.Views.LineDecayView.LineDecayContainer::scheduleUpdateVisibleList(), python.Vispa.Views.LineDecayView.LineDecayView::scrollBarValueChanged(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::selectedWidgets(), python.Vispa.Views.LineDecayView.LineDecayContainer::setAcceptDrops(), python.Vispa.Gui.VispaWidget.VispaWidget::setDragable(), python.Vispa.Views.LineDecayView.LineDecayView::setEditable(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Gui.WidgetContainer.WidgetContainer::toggleCollapse(), python.Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::updateConnections(), and python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDragged().

242  {
243  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
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 << ","
247  << getMemory() << "," << getBins() - getEmptyBins()
248  << "," << totalHistos_ << ",0" << ");\n";
249  sql_statement.append(s.str());
250  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
251  (*i)->children(sql_statement) ;
252  }
int i
Definition: DBlmapReader.cc:9
unsigned int getBins(void)
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int totalHistos_
unsigned int getEmptyBins(void)
unsigned int id(void)
string s
Definition: asciidump.py:422
unsigned int getMemory(void)
unsigned int id_
VIterator<Folder*> Folder::CreateIterator ( )
inline

Definition at line 200 of file DQMStoreStats.h.

References subfolders_.

Referenced by DQMStoreStats::calcIgProfDump().

201  {
203  }
std::vector< 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_.

190  {
191  indent.append(" ");
192  std::cout << indent << "I'm a " << name() << " whose father is " << getFather()
193  << " with ID: " << id_
194  << " Histo: " << getHistos() << " Bins: " << getBins()
195  << " EmptyBins: " << getEmptyBins() << " Memory: " << getMemory()
196  << " and my children are: " << std::endl;
197  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
198  (*i)->dump(indent) ;
199  }
int i
Definition: DBlmapReader.cc:9
unsigned int getBins(void)
const std::string & name(void)
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int getHistos(void)
unsigned int getEmptyBins(void)
tuple cout
Definition: gather_cfg.py:41
unsigned int getMemory(void)
unsigned int id_
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().

273  {
274  std::stringstream s("");
275  s << "INSERT INTO files(id, name) VALUES(" << id_ << ",\"" << folderName_ << "\");\n" ;
276  sql_statement.append(s.str());
277  }
string s
Definition: asciidump.py:422
unsigned int id_
std::string folderName_
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().

163  {
164  unsigned int result=totalBins_;
165  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
166  result += (*i)->getBins();
167  return result;
168  }
int i
Definition: DBlmapReader.cc:9
unsigned int totalBins_
std::vector< Folder * > subfolders_
tuple result
Definition: query.py:137
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().

169  {
170  unsigned int result=totalEmptyBins_;
171  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
172  result += (*i)->getEmptyBins();
173  return result;
174  }
int i
Definition: DBlmapReader.cc:9
std::vector< Folder * > subfolders_
unsigned int totalEmptyBins_
tuple result
Definition: query.py:137
Folder* Folder::getFather ( )
inline

Definition at line 132 of file DQMStoreStats.h.

References father_.

Referenced by children(), dump(), parents(), and symbols().

132 {return father_;}
Folder * 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().

157  {
158  unsigned int result=totalHistos_;
159  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
160  result += (*i)->getHistos();
161  return result;
162  }
int i
Definition: DBlmapReader.cc:9
std::vector< Folder * > subfolders_
tuple result
Definition: query.py:137
unsigned int totalHistos_
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().

175  {
176  unsigned int result=totalMemory_;
177  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
178  result += (*i)->getMemory();
179  return result;
180  }
int i
Definition: DBlmapReader.cc:9
unsigned int totalMemory_
std::vector< Folder * > subfolders_
tuple result
Definition: query.py:137
unsigned int Folder::id ( void  )
inline

Definition at line 145 of file DQMStoreStats.h.

References id_.

Referenced by children(), parents(), setId(), and symbols().

145 {return id_;}
unsigned int id_
unsigned int Folder::level ( void  )
inline

Definition at line 147 of file DQMStoreStats.h.

References level_.

147 {return level_;}
unsigned int level_
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().

206  {
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_ << ", "
210  << getMemory() << ", " << getMemory() << ", " << subfolders_.size() << ", "
211  << getBins() - getEmptyBins() << ", " << getBins() << ", "
212  << getHistos() << ", " << getHistos() << ", 0.0);\n";
213  sql_statement.append(s.str());
214  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
215  (*i)->mainrows(sql_statement) ;
216  }
int i
Definition: DBlmapReader.cc:9
unsigned int getBins(void)
std::vector< Folder * > subfolders_
unsigned int getHistos(void)
unsigned int getEmptyBins(void)
string s
Definition: asciidump.py:422
unsigned int getMemory(void)
unsigned int id_
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().

255  {
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,"
259  << getBins()-getEmptyBins() << "," << getBins()
260  << ", 0, " << getHistos() << ", 0);\n";
261  sql_statement.append(s.str());
262  }
unsigned int getBins(void)
unsigned int getHistos(void)
unsigned int getEmptyBins(void)
string s
Definition: asciidump.py:422
unsigned int getMemory(void)
unsigned int id_
const std::string& Folder::name ( void  )
inline

Definition at line 133 of file DQMStoreStats.h.

References folderName_.

Referenced by cd(), dump(), and python.Vispa.Views.PropertyView.Property::valueChanged().

133 {return folderName_;}
std::string 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().

230  {
231  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
232  std::stringstream s("");
233  s << "INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
234  << parentid << "," << id_ << "," << totalMemory_ << ","
235  << totalBins_ << "," << totalHistos_ << ",0" << ");\n";
236  sql_statement.append(s.str());
237  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
238  (*i)->parents(sql_statement) ;
239  }
int i
Definition: DBlmapReader.cc:9
unsigned int totalBins_
unsigned int totalMemory_
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int totalHistos_
unsigned int id(void)
string s
Definition: asciidump.py:422
unsigned int id_
void Folder::setFather ( Folder e)
inline

Definition at line 131 of file DQMStoreStats.h.

References father_.

Referenced by add().

131 {father_ = e;}
Folder * father_
void Folder::setId ( unsigned int  id)
inline

Definition at line 144 of file DQMStoreStats.h.

References id(), and id_.

Referenced by add().

144 {id_ = id;}
unsigned int id(void)
unsigned int id_
void Folder::setLevel ( unsigned int  value)
inline

Definition at line 146 of file DQMStoreStats.h.

References level_, and relativeConstraints::value.

Referenced by add().

146 {level_=value;}
unsigned int level_
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().

265  {
266  std::stringstream s("");
267  s << "INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\","
268  << getMemory() << "," << getBins() << ", 1);\n";
269  sql_statement.append(s.str());
270  }
unsigned int getBins(void)
string s
Definition: asciidump.py:422
unsigned int getMemory(void)
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().

219  {
220  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
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());
225  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
226  (*i)->symbols(sql_statement) ;
227  }
int i
Definition: DBlmapReader.cc:9
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int id(void)
string s
Definition: asciidump.py:422
unsigned int id_
std::string folderName_
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 python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), DQMStoreStats::calcstats(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

183  {
184  totalHistos_ += 1;
185  totalBins_ += bins;
187  totalMemory_ += memory;
188  }
Definition: vlib.h:187
unsigned int totalBins_
unsigned int totalMemory_
unsigned int totalEmptyBins_
unsigned int totalHistos_

Member Data Documentation

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.

Referenced by files(), name(), and symbols().

unsigned int Folder::id_
private
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
unsigned int Folder::totalBins_
private

Definition at line 281 of file DQMStoreStats.h.

Referenced by getBins(), parents(), and update().

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().