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

Constructor & Destructor Documentation

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

Definition at line 121 of file DQMStoreStats.h.

121  :totalHistos_(0),totalBins_(0),
124  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 126 of file DQMStoreStats.h.

126  {
127  for(auto & subfolder : subfolders_)
128  delete subfolder;
129  }
std::vector< Folder * > subfolders_

Member Function Documentation

void Folder::add ( Folder f)
inline

Definition at line 150 of file DQMStoreStats.h.

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

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

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

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

135  {
136  for(auto & subfolder : subfolders_)
137  if ( subfolder->name()==name )
138  return subfolder;
139  auto * tmp = new Folder(name);
140  this->add(tmp);
141  return tmp;
142  }
void add(Folder *f)
Folder(std::string name)
std::vector< Folder * > subfolders_
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 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().

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(auto & subfolder : subfolders_)
251  subfolder->children(sql_statement) ;
252  }
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 200 of file DQMStoreStats.h.

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, and dataset::name.

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(auto & subfolder : subfolders_)
198  subfolder->dump(indent) ;
199  }
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 272 of file DQMStoreStats.h.

References alignCSCRings::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  }
unsigned int id_
std::string folderName_
unsigned int Folder::getBins ( )
inline

Definition at line 163 of file DQMStoreStats.h.

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

163  {
164  unsigned int result=totalBins_;
165  for(auto & subfolder : subfolders_)
166  result += subfolder->getBins();
167  return result;
168  }
unsigned int totalBins_
std::vector< Folder * > subfolders_
unsigned int Folder::getEmptyBins ( )
inline

Definition at line 169 of file DQMStoreStats.h.

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

169  {
170  unsigned int result=totalEmptyBins_;
171  for(auto & subfolder : subfolders_)
172  result += subfolder->getEmptyBins();
173  return result;
174  }
std::vector< Folder * > subfolders_
unsigned int totalEmptyBins_
Folder* Folder::getFather ( )
inline

Definition at line 132 of file DQMStoreStats.h.

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

Definition at line 157 of file DQMStoreStats.h.

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

157  {
158  unsigned int result=totalHistos_;
159  for(auto & subfolder : subfolders_)
160  result += subfolder->getHistos();
161  return result;
162  }
std::vector< Folder * > subfolders_
unsigned int totalHistos_
unsigned int Folder::getMemory ( )
inline

Definition at line 175 of file DQMStoreStats.h.

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

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

Definition at line 145 of file DQMStoreStats.h.

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

Definition at line 147 of file DQMStoreStats.h.

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

Definition at line 205 of file DQMStoreStats.h.

References alignCSCRings::s.

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(auto & subfolder : subfolders_)
215  subfolder->mainrows(sql_statement) ;
216  }
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 254 of file DQMStoreStats.h.

References alignCSCRings::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 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 229 of file DQMStoreStats.h.

References dataDML::parentid, alignCSCRings::s, DQMStoreStatsSubfolder::totalBins_, DQMStoreStatsSubfolder::totalHistos_, and DQMStoreStatsSubfolder::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(auto & subfolder : subfolders_)
238  subfolder->parents(sql_statement) ;
239  }
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 131 of file DQMStoreStats.h.

References MillePedeFileConverter_cfg::e.

Referenced by add().

void Folder::setId ( unsigned int  id)
inline

Definition at line 144 of file DQMStoreStats.h.

References triggerObjects_cff::id.

Referenced by add().

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

Definition at line 146 of file DQMStoreStats.h.

References relativeConstraints::value.

Referenced by add().

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

Definition at line 264 of file DQMStoreStats.h.

References alignCSCRings::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()
unsigned int getMemory()
void Folder::symbols ( std::string &  sql_statement)
inline

Definition at line 218 of file DQMStoreStats.h.

References dataDML::parentid, and alignCSCRings::s.

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(auto & subfolder : subfolders_)
226  subfolder->symbols(sql_statement) ;
227  }
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 181 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(), 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().

183  {
184  totalHistos_ += 1;
185  totalBins_ += bins;
187  totalMemory_ += memory;
188  }
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.

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.

unsigned int Folder::level_
private

Definition at line 285 of file DQMStoreStats.h.

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

Definition at line 288 of file DQMStoreStats.h.

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.

unsigned int Folder::totalHistos_
private

Definition at line 280 of file DQMStoreStats.h.

unsigned int Folder::totalMemory_
private

Definition at line 283 of file DQMStoreStats.h.