CMS 3D CMS Logo

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

Constructor & Destructor Documentation

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

Definition at line 120 of file DQMStoreStats.h.

120  :totalHistos_(0),totalBins_(0),
122  id_(10),level_(0),folderName_(name),
123  father_(nullptr){;}
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 125 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, and mps_fire::i.

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

Member Function Documentation

void Folder::add ( Folder f)
inline

Definition at line 149 of file DQMStoreStats.h.

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

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

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

References PVValHelper::add(), MillePedeFileConverter_cfg::e, mps_fire::i, dataset::name, 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().

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

References MillePedeFileConverter_cfg::e, mps_fire::i, dataDML::parentid, alignCSCRings::s, and DQMStoreStatsSubfolder::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().

241  {
242  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
243  std::stringstream s("");
244  s << "INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) VALUES("
245  << id_ << "," << parentid << ","
246  << getMemory() << "," << getBins() - getEmptyBins()
247  << "," << totalHistos_ << ",0" << ");\n";
248  sql_statement.append(s.str());
249  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
250  (*i)->children(sql_statement) ;
251  }
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 199 of file DQMStoreStats.h.

Referenced by DQMStoreStats::calcIgProfDump().

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

Definition at line 188 of file DQMStoreStats.h.

References gather_cfg::cout, MillePedeFileConverter_cfg::e, mps_fire::i, and dataset::name.

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

Definition at line 271 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

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

Definition at line 162 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, mps_fire::result, and DQMStoreStatsSubfolder::totalBins_.

162  {
163  unsigned int result=totalBins_;
164  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
165  result += (*i)->getBins();
166  return result;
167  }
unsigned int totalBins_
std::vector< Folder * > subfolders_
unsigned int Folder::getEmptyBins ( void  )
inline

Definition at line 168 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, mps_fire::result, and DQMStoreStatsSubfolder::totalEmptyBins_.

168  {
169  unsigned int result=totalEmptyBins_;
170  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
171  result += (*i)->getEmptyBins();
172  return result;
173  }
std::vector< Folder * > subfolders_
unsigned int totalEmptyBins_
Folder* Folder::getFather ( )
inline

Definition at line 131 of file DQMStoreStats.h.

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

Definition at line 156 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, mps_fire::result, and DQMStoreStatsSubfolder::totalHistos_.

156  {
157  unsigned int result=totalHistos_;
158  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
159  result += (*i)->getHistos();
160  return result;
161  }
std::vector< Folder * > subfolders_
unsigned int totalHistos_
unsigned int Folder::getMemory ( void  )
inline

Definition at line 174 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, mps_fire::result, and DQMStoreStatsSubfolder::totalMemory_.

174  {
175  unsigned int result=totalMemory_;
176  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i)
177  result += (*i)->getMemory();
178  return result;
179  }
unsigned int totalMemory_
std::vector< Folder * > subfolders_
unsigned int Folder::id ( void  )
inline

Definition at line 144 of file DQMStoreStats.h.

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

Definition at line 146 of file DQMStoreStats.h.

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

Definition at line 204 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, and alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

205  {
206  std::stringstream s("");
207  s << "INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)"
208  " VALUES(" << id_ << ", " << id_ << ", "
209  << getMemory() << ", " << getMemory() << ", " << subfolders_.size() << ", "
210  << getBins() - getEmptyBins() << ", " << getBins() << ", "
211  << getHistos() << ", " << getHistos() << ", 0.0);\n";
212  sql_statement.append(s.str());
213  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
214  (*i)->mainrows(sql_statement) ;
215  }
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 253 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

254  {
255  std::stringstream s("");
256  s << "INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, total_paths, pct)"
257  << " VALUES(" << id_ << "," << id_ << "," << 0 << "," << getMemory() << ", 0,"
258  << getBins()-getEmptyBins() << "," << getBins()
259  << ", 0, " << getHistos() << ", 0);\n";
260  sql_statement.append(s.str());
261  }
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 228 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, dataDML::parentid, alignCSCRings::s, DQMStoreStatsSubfolder::totalBins_, DQMStoreStatsSubfolder::totalHistos_, and DQMStoreStatsSubfolder::totalMemory_.

Referenced by DQMStoreStats::calcIgProfDump().

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

References MillePedeFileConverter_cfg::e.

Referenced by add().

void Folder::setId ( unsigned int  id)
inline

Definition at line 143 of file DQMStoreStats.h.

References triggerObjects_cff::id.

Referenced by add().

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

Definition at line 145 of file DQMStoreStats.h.

References relativeConstraints::value.

Referenced by add().

void Folder::summary ( std::string &  sql_statement)
inline

Definition at line 263 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

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

Definition at line 217 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e, mps_fire::i, dataDML::parentid, and alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

218  {
219  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
220  std::stringstream s("");
221  s << "INSERT INTO symbols(id, name, filename_id) VALUES (" << id_ << ",\"" << folderName_ << "\", "
222  << parentid << ");\n" ;
223  sql_statement.append(s.str());
224  for(std::vector<Folder*>::iterator i = subfolders_.begin(), e = subfolders_.end() ; i != e ; ++i )
225  (*i)->symbols(sql_statement) ;
226  }
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 180 of file DQMStoreStats.h.

References create_public_pileup_plots::bins, relativeConstraints::empty, mps_setup::memory, DQMStoreStatsSubfolder::totalBins_, DQMStoreStatsSubfolder::totalEmptyBins_, DQMStoreStatsSubfolder::totalHistos_, and DQMStoreStatsSubfolder::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().

182  {
183  totalHistos_ += 1;
184  totalBins_ += bins;
186  totalMemory_ += memory;
187  }
unsigned int totalBins_
unsigned int totalMemory_
unsigned int totalEmptyBins_
unsigned int totalHistos_

Member Data Documentation

Folder* Folder::father_
private

Definition at line 286 of file DQMStoreStats.h.

std::string Folder::folderName_
private

Definition at line 285 of file DQMStoreStats.h.

unsigned int Folder::id_
private

Definition at line 283 of file DQMStoreStats.h.

unsigned int Folder::level_
private

Definition at line 284 of file DQMStoreStats.h.

std::vector<Folder*> Folder::subfolders_
private

Definition at line 287 of file DQMStoreStats.h.

unsigned int Folder::totalBins_
private

Definition at line 280 of file DQMStoreStats.h.

unsigned int Folder::totalEmptyBins_
private

Definition at line 281 of file DQMStoreStats.h.

unsigned int Folder::totalHistos_
private

Definition at line 279 of file DQMStoreStats.h.

unsigned int Folder::totalMemory_
private

Definition at line 282 of file DQMStoreStats.h.