#include <HLTPerformanceInfo.h>
Classes | |
class | Module |
class | Path |
Public Types | |
typedef std::vector< Module > | Modules |
typedef std::vector< size_t > | ModulesInPath |
typedef std::vector< Path > | PathList |
Public Member Functions | |
void | addModule (const Module &m) |
void | addModuleToPath (const char *mod, const char *path) |
void | addModuleToPath (const size_t mod, const size_t path) |
void | addPath (const Path &p) |
Modules::const_iterator | beginModules () const |
PathList::iterator | beginPaths () |
void | clear () |
void | clearModules () |
Modules::const_iterator | endModules () const |
PathList::iterator | endPaths () |
Modules::iterator | findModule (const char *moduleInstanceName) |
PathList::iterator | findPath (const char *pathName) |
const Module & | getModule (size_t m) const |
const Module & | getModuleOnPath (size_t m, size_t p) const |
const Path & | getPath (size_t p) const |
HLTPerformanceInfo () | |
double | longestModuleCPUTime () const |
const char * | longestModuleCPUTimeName () const |
double | longestModuleTime () const |
const char * | longestModuleTimeName () const |
int | moduleIndexInPath (const char *mod, const char *path) |
size_t | numberOfModules () const |
size_t | numberOfPaths () const |
void | setStatusOfModulesFromPath (const char *pathName) |
double | totalCPUTime () const |
double | totalPathCPUTime (const size_t path) |
double | totalPathTime (const size_t path) |
double | totalTime () const |
bool | uniqueModule (const char *mod) const |
Private Attributes | |
Modules | modules_ |
PathList | paths_ |
Definition at line 11 of file HLTPerformanceInfo.h.
typedef std::vector<Module> HLTPerformanceInfo::Modules |
Definition at line 16 of file HLTPerformanceInfo.h.
typedef std::vector<size_t> HLTPerformanceInfo::ModulesInPath |
Definition at line 17 of file HLTPerformanceInfo.h.
typedef std::vector<Path> HLTPerformanceInfo::PathList |
Definition at line 14 of file HLTPerformanceInfo.h.
HLTPerformanceInfo::HLTPerformanceInfo | ( | ) |
void HLTPerformanceInfo::addModule | ( | const Module & | m | ) | [inline] |
Definition at line 122 of file HLTPerformanceInfo.h.
References modules_.
void HLTPerformanceInfo::addModuleToPath | ( | const size_t | mod, |
const size_t | path | ||
) | [inline] |
void HLTPerformanceInfo::addModuleToPath | ( | const char * | mod, |
const char * | path | ||
) | [inline] |
Definition at line 126 of file HLTPerformanceInfo.h.
References endModules(), findModule(), i, j, m, modules_, and paths_.
{ // first make sure module exists Modules::iterator m = findModule(mod); if ( m == endModules() ) { // new module - create it and stick it on the end Module newMod(mod, 0, 0); // time (wall and cpu) = 0 since it wasn't run modules_.push_back(newMod); } for ( size_t i = 0; i < paths_.size(); ++i ) { if ( !( paths_[i] == path ) ) continue; // we found the path, add module to the end for ( size_t j = 0; j < modules_.size(); ++j ) { if ( !(modules_[j] == mod) ) continue; paths_[i].addModuleRef(j); break; } break; } }
void HLTPerformanceInfo::addPath | ( | const Path & | p | ) | [inline] |
Modules::const_iterator HLTPerformanceInfo::beginModules | ( | ) | const [inline] |
Definition at line 188 of file HLTPerformanceInfo.h.
References modules_.
{ return modules_.begin(); }
PathList::iterator HLTPerformanceInfo::beginPaths | ( | ) | [inline] |
void HLTPerformanceInfo::clear | ( | void | ) | [inline] |
void HLTPerformanceInfo::clearModules | ( | ) | [inline] |
Modules::const_iterator HLTPerformanceInfo::endModules | ( | ) | const [inline] |
Definition at line 192 of file HLTPerformanceInfo.h.
References modules_.
Referenced by addModuleToPath().
{ return modules_.end(); }
PathList::iterator HLTPerformanceInfo::endPaths | ( | ) | [inline] |
Definition at line 184 of file HLTPerformanceInfo.h.
References paths_.
Referenced by moduleIndexInPath(), and setStatusOfModulesFromPath().
{ return paths_.end(); }
HLTPerformanceInfo::Modules::iterator HLTPerformanceInfo::findModule | ( | const char * | moduleInstanceName | ) |
Definition at line 19 of file HLTPerformanceInfo.cc.
References spr::find(), and modules_.
Referenced by addModuleToPath().
HLTPerformanceInfo::PathList::iterator HLTPerformanceInfo::findPath | ( | const char * | pathName | ) |
Definition at line 12 of file HLTPerformanceInfo.cc.
References spr::find(), prof2calltree::l, EgammaValidation_cff::pathName, and paths_.
Referenced by moduleIndexInPath(), and setStatusOfModulesFromPath().
const Module& HLTPerformanceInfo::getModule | ( | size_t | m | ) | const [inline] |
Definition at line 163 of file HLTPerformanceInfo.h.
References modules_.
const HLTPerformanceInfo::Module & HLTPerformanceInfo::getModuleOnPath | ( | size_t | m, |
size_t | p | ||
) | const |
const Path& HLTPerformanceInfo::getPath | ( | size_t | p | ) | const [inline] |
double HLTPerformanceInfo::longestModuleCPUTime | ( | ) | const |
const char * HLTPerformanceInfo::longestModuleCPUTimeName | ( | ) | const |
Definition at line 102 of file HLTPerformanceInfo.cc.
References i, modules_, and lumiQTWidget::t.
double HLTPerformanceInfo::longestModuleTime | ( | ) | const |
const char * HLTPerformanceInfo::longestModuleTimeName | ( | ) | const |
Definition at line 88 of file HLTPerformanceInfo.cc.
References i, modules_, and lumiQTWidget::t.
int HLTPerformanceInfo::moduleIndexInPath | ( | const char * | mod, |
const char * | path | ||
) |
Definition at line 156 of file HLTPerformanceInfo.cc.
References endPaths(), findPath(), j, text2workspace::mod, modules_, and AlCaHLTBitMon_ParallelJobs::p.
size_t HLTPerformanceInfo::numberOfModules | ( | ) | const [inline] |
Definition at line 177 of file HLTPerformanceInfo.h.
References modules_.
{ return modules_.size(); }
size_t HLTPerformanceInfo::numberOfPaths | ( | ) | const [inline] |
void HLTPerformanceInfo::setStatusOfModulesFromPath | ( | const char * | pathName | ) |
Definition at line 172 of file HLTPerformanceInfo.cc.
References endPaths(), findPath(), j, text2workspace::mod, modules_, AlCaHLTBitMon_ParallelJobs::p, Pass, Ready, HLTPerformanceInfo::Module::setStatus(), HLTPerformanceInfo::Module::status(), and edm::HLTPathStatus::wasrun().
{ PathList::iterator p = findPath(pathName); if ( p == endPaths() ) { return; // do nothing } unsigned int ctr = 0; for ( ModulesInPath::const_iterator j = p->begin(); j != p->end(); ++j ) { edm::hlt::HLTState modState = edm::hlt::Ready ; unsigned int modIndex = 0 ; // get module in the master list Module & mod = modules_.at(*j); if ( ! mod.status().wasrun() ) { if (p->status().accept()) { modState = edm::hlt::Pass ; } else { if ( p->status().index() > ctr ) { modState = edm::hlt::Pass ; } else if ( p->status().index() == ctr ) { modState = p->status().state() ; } } mod.setStatus(edm::HLTPathStatus(modState,modIndex)) ; } ctr++ ; } }
double HLTPerformanceInfo::totalCPUTime | ( | ) | const |
double HLTPerformanceInfo::totalPathCPUTime | ( | const size_t | path | ) |
Definition at line 55 of file HLTPerformanceInfo.cc.
References i, modules_, paths_, ntuplemaker::status, and lumiQTWidget::t.
double HLTPerformanceInfo::totalPathTime | ( | const size_t | path | ) |
Definition at line 42 of file HLTPerformanceInfo.cc.
References i, modules_, paths_, ntuplemaker::status, and lumiQTWidget::t.
double HLTPerformanceInfo::totalTime | ( | ) | const |
bool HLTPerformanceInfo::uniqueModule | ( | const char * | mod | ) | const |
Definition at line 140 of file HLTPerformanceInfo.cc.
References funct::false, m, modules_, mergeVDriftHistosByStation::name, AlCaHLTBitMon_ParallelJobs::p, paths_, and funct::true.
{ int mCtr = 0 ; for ( size_t p = 0; p < paths_.size(); ++p ) { for ( size_t m = 0; m < paths_[p].numberOfModules(); ++m ) { size_t modIndex = paths_[p].getModuleIndex(m); if ( modules_[modIndex].name() == std::string(mod) ) ++mCtr; if ( mCtr > 1 ) return false; } } if (mCtr == 0) return false ; return true ; }
Modules HLTPerformanceInfo::modules_ [private] |
Definition at line 116 of file HLTPerformanceInfo.h.
Referenced by addModule(), addModuleToPath(), beginModules(), clear(), clearModules(), endModules(), findModule(), getModule(), getModuleOnPath(), HLTPerformanceInfo(), longestModuleCPUTime(), longestModuleCPUTimeName(), longestModuleTime(), longestModuleTimeName(), moduleIndexInPath(), numberOfModules(), setStatusOfModulesFromPath(), totalCPUTime(), totalPathCPUTime(), totalPathTime(), totalTime(), and uniqueModule().
PathList HLTPerformanceInfo::paths_ [private] |
Definition at line 115 of file HLTPerformanceInfo.h.
Referenced by addModuleToPath(), addPath(), beginPaths(), clear(), endPaths(), findPath(), getModuleOnPath(), getPath(), HLTPerformanceInfo(), numberOfPaths(), totalPathCPUTime(), totalPathTime(), and uniqueModule().