test
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 117 of file DQMStoreStats.h.

Constructor & Destructor Documentation

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

Definition at line 119 of file DQMStoreStats.h.

Referenced by cd().

119  :totalHistos_(0),totalBins_(0),
121  id_(10),level_(0),folderName_(name),
122  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 124 of file DQMStoreStats.h.

References alignCSCRings::e, i, and subfolders_.

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

Member Function Documentation

void Folder::add ( Folder f)
inline

Definition at line 148 of file DQMStoreStats.h.

References getId(), level_, setFather(), setId(), setLevel(), and subfolders_.

Referenced by cd(), and counter.Counter::register().

148  {
149  f->setFather(this);
150  subfolders_.push_back(f);
151  f->setLevel(level_+1);
152  f->setId(getId());
153  }
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 133 of file DQMStoreStats.h.

References add(), alignCSCRings::e, Folder(), i, name(), subfolders_, and tmp.

Referenced by DQMStoreStats::calcstats(), dqm_interfaces.DQMcommunicator::get_root_objects_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_names_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_recursive(), and dqm_interfaces.DirWalkerFile::walk().

133  {
134  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
135  if ( (*i)->name()==name )
136  return (*i);
137  Folder * tmp = new Folder(name);
138  this->add(tmp);
139  return tmp;
140  }
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 239 of file DQMStoreStats.h.

References alignCSCRings::e, getBins(), getEmptyBins(), getFather(), getMemory(), i, id(), id_, alignCSCRings::s, subfolders_, and totalHistos_.

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::_scheduleRecursive(), Vispa.Share.BasicDataAccessor.BasicDataAccessor::allChildren(), Vispa.Views.LineDecayView.LineDecayView::autolayout(), Vispa.Views.BoxDecayView.BoxDecayContainer::autolayoutAlgorithm(), Vispa.Gui.WidgetContainer.WidgetContainer::autolayoutChildren(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), DQMStoreStats::calcIgProfDump(), Vispa.Views.LineDecayView.LineDecayContainer::childContainer(), Vispa.Views.WidgetView.WidgetView::clear(), Vispa.Views.LineDecayView.LineDecayContainer::createDecayObjectsFromPxlObject(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::deleteSelectedConnections(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::foundIn(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::getWidgetByName(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::hideMenuWidgets(), Vispa.Views.LineDecayView.LineDecayView::lineDecayContainer(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::nonSequenceChildren(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::portConnection(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::propagateEventUnderConnectionWidget(), Vispa.Views.LineDecayView.LineDecayContainer::scheduleUpdateVisibleList(), Vispa.Views.LineDecayView.LineDecayView::scrollBarValueChanged(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::selectedWidgets(), Vispa.Views.LineDecayView.LineDecayContainer::setAcceptDrops(), Vispa.Gui.VispaWidget.VispaWidget::setDragable(), Vispa.Views.LineDecayView.LineDecayView::setEditable(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Gui.WidgetContainer.WidgetContainer::toggleCollapse(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner::updateConnections(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDragged().

240  {
241  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
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 << ","
245  << getMemory() << "," << getBins() - getEmptyBins()
246  << "," << totalHistos_ << ",0" << ");\n";
247  sql_statement.append(s.str());
248  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
249  (*i)->children(sql_statement) ;
250  }
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)
unsigned int getMemory(void)
unsigned int id_
VIterator<Folder*> Folder::CreateIterator ( )
inline

Definition at line 198 of file DQMStoreStats.h.

References subfolders_.

Referenced by DQMStoreStats::calcIgProfDump().

199  {
201  }
std::vector< Folder * > subfolders_
void Folder::dump ( std::string  indent)
inline

Definition at line 187 of file DQMStoreStats.h.

References gather_cfg::cout, alignCSCRings::e, getBins(), getEmptyBins(), getFather(), getHistos(), getMemory(), i, id_, name(), and subfolders_.

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

Definition at line 270 of file DQMStoreStats.h.

References folderName_, id_, and alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

271  {
272  std::stringstream s("");
273  s << "INSERT INTO files(id, name) VALUES(" << id_ << ",\"" << folderName_ << "\");\n" ;
274  sql_statement.append(s.str());
275  }
unsigned int id_
std::string folderName_
unsigned int Folder::getBins ( void  )
inline

Definition at line 161 of file DQMStoreStats.h.

References alignCSCRings::e, i, mps_fire::result, subfolders_, and totalBins_.

Referenced by children(), dump(), mainrows(), mainrows_cumulative(), and summary().

161  {
162  unsigned int result=totalBins_;
163  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
164  result += (*i)->getBins();
165  return result;
166  }
int i
Definition: DBlmapReader.cc:9
unsigned int totalBins_
tuple result
Definition: mps_fire.py:83
std::vector< Folder * > subfolders_
unsigned int Folder::getEmptyBins ( void  )
inline

Definition at line 167 of file DQMStoreStats.h.

References alignCSCRings::e, i, mps_fire::result, subfolders_, and totalEmptyBins_.

Referenced by children(), dump(), mainrows(), and mainrows_cumulative().

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

Definition at line 130 of file DQMStoreStats.h.

References father_.

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

130 {return father_;}
Folder * father_
unsigned int Folder::getHistos ( void  )
inline

Definition at line 155 of file DQMStoreStats.h.

References alignCSCRings::e, i, mps_fire::result, subfolders_, and totalHistos_.

Referenced by dump(), mainrows(), and mainrows_cumulative().

155  {
156  unsigned int result=totalHistos_;
157  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
158  result += (*i)->getHistos();
159  return result;
160  }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:83
std::vector< Folder * > subfolders_
unsigned int totalHistos_
unsigned int Folder::getMemory ( void  )
inline

Definition at line 173 of file DQMStoreStats.h.

References alignCSCRings::e, i, mps_fire::result, subfolders_, and totalMemory_.

Referenced by children(), dump(), mainrows(), mainrows_cumulative(), and summary().

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

Definition at line 143 of file DQMStoreStats.h.

References id_.

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

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

Definition at line 145 of file DQMStoreStats.h.

References level_.

145 {return level_;}
unsigned int level_
void Folder::mainrows ( std::string &  sql_statement)
inline

Definition at line 203 of file DQMStoreStats.h.

References alignCSCRings::e, getBins(), getEmptyBins(), getHistos(), getMemory(), i, id_, alignCSCRings::s, and subfolders_.

Referenced by DQMStoreStats::calcIgProfDump().

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

Definition at line 252 of file DQMStoreStats.h.

References getBins(), getEmptyBins(), getHistos(), getMemory(), id_, and alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

253  {
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,"
257  << getBins()-getEmptyBins() << "," << getBins()
258  << ", 0, " << getHistos() << ", 0);\n";
259  sql_statement.append(s.str());
260  }
unsigned int getBins(void)
unsigned int getHistos(void)
unsigned int getEmptyBins(void)
unsigned int getMemory(void)
unsigned int id_
const std::string& Folder::name ( void  )
inline
void Folder::parents ( std::string &  sql_statement)
inline

Definition at line 227 of file DQMStoreStats.h.

References alignCSCRings::e, getFather(), i, id(), id_, alignCSCRings::s, subfolders_, totalBins_, totalHistos_, and totalMemory_.

Referenced by DQMStoreStats::calcIgProfDump().

228  {
229  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
230  std::stringstream s("");
231  s << "INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
232  << parentid << "," << id_ << "," << totalMemory_ << ","
233  << totalBins_ << "," << totalHistos_ << ",0" << ");\n";
234  sql_statement.append(s.str());
235  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
236  (*i)->parents(sql_statement) ;
237  }
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)
unsigned int id_
void Folder::setFather ( Folder e)
inline

Definition at line 129 of file DQMStoreStats.h.

References alignCSCRings::e, and father_.

Referenced by add().

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

Definition at line 142 of file DQMStoreStats.h.

References id(), and id_.

Referenced by add().

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

Definition at line 144 of file DQMStoreStats.h.

References level_, and relativeConstraints::value.

Referenced by add().

144 {level_=value;}
unsigned int level_
void Folder::summary ( std::string &  sql_statement)
inline

Definition at line 262 of file DQMStoreStats.h.

References getBins(), getMemory(), and alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

263  {
264  std::stringstream s("");
265  s << "INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\","
266  << getMemory() << "," << getBins() << ", 1);\n";
267  sql_statement.append(s.str());
268  }
unsigned int getBins(void)
unsigned int getMemory(void)
void Folder::symbols ( std::string &  sql_statement)
inline

Definition at line 216 of file DQMStoreStats.h.

References alignCSCRings::e, folderName_, getFather(), i, id(), id_, alignCSCRings::s, and subfolders_.

Referenced by DQMStoreStats::calcIgProfDump().

217  {
218  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
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());
223  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
224  (*i)->symbols(sql_statement) ;
225  }
int i
Definition: DBlmapReader.cc:9
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int id(void)
unsigned int id_
std::string folderName_
void Folder::update ( unsigned int  bins,
unsigned int  empty,
unsigned int  memory 
)
inline

Definition at line 179 of file DQMStoreStats.h.

References relativeConstraints::empty, totalBins_, totalEmptyBins_, totalHistos_, and totalMemory_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), DQMStoreStats::calcstats(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

181  {
182  totalHistos_ += 1;
183  totalBins_ += bins;
185  totalMemory_ += memory;
186  }
Definition: vlib.h:186
unsigned int totalBins_
unsigned int totalMemory_
unsigned int totalEmptyBins_
unsigned int totalHistos_

Member Data Documentation

Folder* Folder::father_
private

Definition at line 285 of file DQMStoreStats.h.

Referenced by getFather(), and setFather().

std::string Folder::folderName_
private

Definition at line 284 of file DQMStoreStats.h.

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

unsigned int Folder::id_
private
unsigned int Folder::level_
private

Definition at line 283 of file DQMStoreStats.h.

Referenced by add(), level(), and setLevel().

std::vector<Folder*> Folder::subfolders_
private
unsigned int Folder::totalBins_
private

Definition at line 279 of file DQMStoreStats.h.

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

unsigned int Folder::totalEmptyBins_
private

Definition at line 280 of file DQMStoreStats.h.

Referenced by getEmptyBins(), and update().

unsigned int Folder::totalHistos_
private

Definition at line 278 of file DQMStoreStats.h.

Referenced by children(), getHistos(), parents(), and update().

unsigned int Folder::totalMemory_
private

Definition at line 281 of file DQMStoreStats.h.

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