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 (std::string name)
 
unsigned int getBins ()
 
unsigned int getEmptyBins ()
 
FoldergetFather ()
 
unsigned int getHistos ()
 
unsigned int getMemory ()
 
unsigned int id ()
 
unsigned int level ()
 
void mainrows (std::string &sql_statement)
 
void mainrows_cumulative (std::string &sql_statement)
 
const std::string & name ()
 
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 ()
 

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

Constructor & Destructor Documentation

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

Definition at line 136 of file DQMStoreStats.h.

137  : totalHistos_(0),
138  totalBins_(0),
139  totalEmptyBins_(0),
140  totalMemory_(0),
141  id_(10),
142  level_(0),
144  father_(nullptr) {}
unsigned int totalBins_
unsigned int totalMemory_
const std::string & name()
unsigned int totalEmptyBins_
Folder * father_
unsigned int totalHistos_
unsigned int level_
unsigned int id_
def move(src, dest)
Definition: eostools.py:511
std::string folderName_
Folder::~Folder ( )
inline

Definition at line 146 of file DQMStoreStats.h.

146  {
147  for (auto& subfolder : subfolders_)
148  delete subfolder;
149  }
std::vector< Folder * > subfolders_

Member Function Documentation

void Folder::add ( Folder f)
inline

Definition at line 169 of file DQMStoreStats.h.

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

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

169  {
170  f->setFather(this);
171  subfolders_.push_back(f);
172  f->setLevel(level_ + 1);
173  f->setId(getId());
174  }
static unsigned int getId()
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 155 of file DQMStoreStats.h.

References PVValHelper::add(), Skims_PA_cff::name, and createJobs::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().

155  {
156  for (auto& subfolder : subfolders_)
157  if (subfolder->name() == name)
158  return subfolder;
159  auto* tmp = new Folder(name);
160  this->add(tmp);
161  return tmp;
162  }
void add(Folder *f)
Folder(std::string name)
std::vector< Folder * > subfolders_
const std::string & name()
tmp
align.sh
Definition: createJobs.py:716
void Folder::children ( std::string &  sql_statement)
inline

Definition at line 249 of file DQMStoreStats.h.

References 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(), Vispa.Views.LineDecayView.LineDecayView::updateContent(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDragged().

249  {
250  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
251  std::stringstream s("");
252  s << "INSERT INTO children(self_id, parent_id, from_parent_count, from_parent_calls, from_parent_paths, pct) "
253  "VALUES("
254  << id_ << "," << parentid << "," << getMemory() << "," << getBins() - getEmptyBins() << "," << totalHistos_
255  << ",0"
256  << ");\n";
257  sql_statement.append(s.str());
258  for (auto& subfolder : subfolders_)
259  subfolder->children(sql_statement);
260  }
unsigned int getEmptyBins()
std::vector< Folder * > subfolders_
unsigned int getBins()
Folder * getFather()
unsigned int id()
unsigned int totalHistos_
unsigned int getMemory()
unsigned int id_
VIterator<Folder*> Folder::CreateIterator ( )
inline

Definition at line 214 of file DQMStoreStats.h.

Referenced by DQMStoreStats::calcIgProfDump().

214 { return VIterator<Folder*>(&subfolders_); }
std::vector< Folder * > subfolders_
void Folder::dump ( std::string  indent)
inline

Definition at line 206 of file DQMStoreStats.h.

References gather_cfg::cout, and Skims_PA_cff::name.

206  {
207  indent.append(" ");
208  std::cout << indent << "I'm a " << name() << " whose father is " << getFather() << " with ID: " << id_
209  << " Histo: " << getHistos() << " Bins: " << getBins() << " EmptyBins: " << getEmptyBins()
210  << " Memory: " << getMemory() << " and my children are: " << std::endl;
211  for (auto& subfolder : subfolders_)
212  subfolder->dump(indent);
213  }
unsigned int getHistos()
unsigned int getEmptyBins()
std::vector< Folder * > subfolders_
const std::string & name()
unsigned int getBins()
Folder * getFather()
unsigned int getMemory()
unsigned int id_
void Folder::files ( std::string &  sql_statement)
inline

Definition at line 278 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

278  {
279  std::stringstream s("");
280  s << "INSERT INTO files(id, name) VALUES(" << id_ << ",\"" << folderName_ << "\");\n";
281  sql_statement.append(s.str());
282  }
unsigned int id_
std::string folderName_
unsigned int Folder::getBins ( )
inline

Definition at line 182 of file DQMStoreStats.h.

References mps_fire::result, and DQMStoreStatsSubfolder::totalBins_.

182  {
183  unsigned int result = totalBins_;
184  for (auto& subfolder : subfolders_)
185  result += subfolder->getBins();
186  return result;
187  }
unsigned int totalBins_
std::vector< Folder * > subfolders_
unsigned int Folder::getEmptyBins ( )
inline

Definition at line 188 of file DQMStoreStats.h.

References mps_fire::result, and DQMStoreStatsSubfolder::totalEmptyBins_.

188  {
189  unsigned int result = totalEmptyBins_;
190  for (auto& subfolder : subfolders_)
191  result += subfolder->getEmptyBins();
192  return result;
193  }
std::vector< Folder * > subfolders_
unsigned int totalEmptyBins_
Folder* Folder::getFather ( )
inline

Definition at line 152 of file DQMStoreStats.h.

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

Definition at line 176 of file DQMStoreStats.h.

References mps_fire::result, and DQMStoreStatsSubfolder::totalHistos_.

176  {
177  unsigned int result = totalHistos_;
178  for (auto& subfolder : subfolders_)
179  result += subfolder->getHistos();
180  return result;
181  }
std::vector< Folder * > subfolders_
unsigned int totalHistos_
unsigned int Folder::getMemory ( )
inline

Definition at line 194 of file DQMStoreStats.h.

References mps_fire::result, and DQMStoreStatsSubfolder::totalMemory_.

194  {
195  unsigned int result = totalMemory_;
196  for (auto& subfolder : subfolders_)
197  result += subfolder->getMemory();
198  return result;
199  }
unsigned int totalMemory_
std::vector< Folder * > subfolders_
unsigned int Folder::id ( void  )
inline

Definition at line 165 of file DQMStoreStats.h.

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

Definition at line 167 of file DQMStoreStats.h.

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

Definition at line 216 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

216  {
217  std::stringstream s("");
218  s << "INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, "
219  "total_paths, pct)"
220  " VALUES("
221  << id_ << ", " << id_ << ", " << getMemory() << ", " << getMemory() << ", " << subfolders_.size() << ", "
222  << getBins() - getEmptyBins() << ", " << getBins() << ", " << getHistos() << ", " << getHistos() << ", 0.0);\n";
223  sql_statement.append(s.str());
224  for (auto& subfolder : subfolders_)
225  subfolder->mainrows(sql_statement);
226  }
unsigned int getHistos()
unsigned int getEmptyBins()
std::vector< Folder * > subfolders_
unsigned int getBins()
unsigned int getMemory()
unsigned int id_
void Folder::mainrows_cumulative ( std::string &  sql_statement)
inline

Definition at line 262 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

262  {
263  std::stringstream s("");
264  s << "INSERT INTO mainrows(id, symbol_id, self_count, cumulative_count, kids, self_calls, total_calls, self_paths, "
265  "total_paths, pct)"
266  << " VALUES(" << id_ << "," << id_ << "," << 0 << "," << getMemory() << ", 0," << getBins() - getEmptyBins()
267  << "," << getBins() << ", 0, " << getHistos() << ", 0);\n";
268  sql_statement.append(s.str());
269  }
unsigned int getHistos()
unsigned int getEmptyBins()
unsigned int getBins()
unsigned int getMemory()
unsigned int id_
const std::string& Folder::name ( void  )
inline
void Folder::parents ( std::string &  sql_statement)
inline

Definition at line 238 of file DQMStoreStats.h.

References alignCSCRings::s, DQMStoreStatsSubfolder::totalBins_, DQMStoreStatsSubfolder::totalHistos_, and DQMStoreStatsSubfolder::totalMemory_.

Referenced by DQMStoreStats::calcIgProfDump().

238  {
239  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
240  std::stringstream s("");
241  s << "INSERT INTO parents(self_id, child_id, to_child_count, to_child_calls, to_child_paths, pct) VALUES("
242  << parentid << "," << id_ << "," << totalMemory_ << "," << totalBins_ << "," << totalHistos_ << ",0"
243  << ");\n";
244  sql_statement.append(s.str());
245  for (auto& subfolder : subfolders_)
246  subfolder->parents(sql_statement);
247  }
unsigned int totalBins_
unsigned int totalMemory_
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int id()
unsigned int totalHistos_
unsigned int id_
void Folder::setFather ( Folder e)
inline

Definition at line 151 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e.

Referenced by add().

void Folder::setId ( unsigned int  id)
inline

Definition at line 164 of file DQMStoreStats.h.

References triggerObjects_cff::id.

Referenced by add().

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

Definition at line 166 of file DQMStoreStats.h.

References relativeConstraints::value.

Referenced by add().

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

Definition at line 271 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

271  {
272  std::stringstream s("");
273  s << "INSERT INTO summary(counter, total_count, total_freq, tick_period) VALUES (\"BINS_LIVE\"," << getMemory()
274  << "," << getBins() << ", 1);\n";
275  sql_statement.append(s.str());
276  }
unsigned int getBins()
unsigned int getMemory()
void Folder::symbols ( std::string &  sql_statement)
inline

Definition at line 228 of file DQMStoreStats.h.

References alignCSCRings::s.

Referenced by DQMStoreStats::calcIgProfDump().

228  {
229  unsigned int parentid = this->getFather() ? this->getFather()->id() : id_;
230  std::stringstream s("");
231  s << "INSERT INTO symbols(id, name, filename_id) VALUES (" << id_ << ",\"" << folderName_ << "\", " << parentid
232  << ");\n";
233  sql_statement.append(s.str());
234  for (auto& subfolder : subfolders_)
235  subfolder->symbols(sql_statement);
236  }
std::vector< Folder * > subfolders_
Folder * getFather()
unsigned int id()
unsigned int id_
std::string folderName_
void Folder::update ( unsigned int  bins,
unsigned int  empty,
unsigned int  memory 
)
inline

Definition at line 200 of file DQMStoreStats.h.

References trigObjTnPSource_cfi::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(), dqm-mbProfile.Profile::finish(), 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().

200  {
201  totalHistos_ += 1;
202  totalBins_ += bins;
204  totalMemory_ += memory;
205  }
unsigned int totalBins_
unsigned int totalMemory_
unsigned int totalEmptyBins_
unsigned int totalHistos_

Member Data Documentation

Folder* Folder::father_
private

Definition at line 292 of file DQMStoreStats.h.

std::string Folder::folderName_
private

Definition at line 291 of file DQMStoreStats.h.

unsigned int Folder::id_
private

Definition at line 289 of file DQMStoreStats.h.

unsigned int Folder::level_
private

Definition at line 290 of file DQMStoreStats.h.

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

Definition at line 293 of file DQMStoreStats.h.

unsigned int Folder::totalBins_
private

Definition at line 286 of file DQMStoreStats.h.

unsigned int Folder::totalEmptyBins_
private

Definition at line 287 of file DQMStoreStats.h.

unsigned int Folder::totalHistos_
private

Definition at line 285 of file DQMStoreStats.h.

unsigned int Folder::totalMemory_
private

Definition at line 288 of file DQMStoreStats.h.