CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ThroughputServiceClient Class Reference
Inheritance diagram for ThroughputServiceClient:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 ThroughputServiceClient (edm::ParameterSet const &)
 
 ~ThroughputServiceClient ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void dqmEndJob (DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &booker, DQMStore::IGetter &getter, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void fillSummaryPlots (DQMStore::IBooker &booker, DQMStore::IGetter &getter)
 

Private Attributes

std::string m_dqm_path
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Protected Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 26 of file ThroughputServiceClient.cc.

Constructor & Destructor Documentation

ThroughputServiceClient::ThroughputServiceClient ( edm::ParameterSet const &  config)
explicit

Definition at line 44 of file ThroughputServiceClient.cc.

44  :
45  m_dqm_path( config.getUntrackedParameter<std::string>( "dqmPath" ) )
46 {
47 }
ThroughputServiceClient::~ThroughputServiceClient ( )

Definition at line 49 of file ThroughputServiceClient.cc.

50 {
51 }

Member Function Documentation

void ThroughputServiceClient::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 54 of file ThroughputServiceClient.cc.

References fillSummaryPlots().

55 {
56  fillSummaryPlots(booker, getter);
57 }
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
void ThroughputServiceClient::dqmEndLuminosityBlock ( DQMStore::IBooker booker,
DQMStore::IGetter getter,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 60 of file ThroughputServiceClient.cc.

References fillSummaryPlots().

61 {
62  fillSummaryPlots(booker, getter);
63 }
void fillSummaryPlots(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
void ThroughputServiceClient::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 111 of file ThroughputServiceClient.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

111  {
113  desc.addUntracked<std::string>( "dqmPath", "HLT/Throughput" );
114  descriptions.add("throughputServiceClient", desc);
115 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void ThroughputServiceClient::fillSummaryPlots ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
private

Definition at line 66 of file ThroughputServiceClient.cc.

References assert(), DQMStore::IBooker::book1D(), folders, DQMStore::IGetter::get(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH1F(), i, m_dqm_path, pileupCalc::nbins, and DQMStore::IBooker::setCurrentFolder().

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

67 {
68  // find whether the plots are in the main folder, or in per-number-of-processess subfolders
69  std::vector<std::string> folders;
70  if (getter.get(m_dqm_path + "/throughput_sourced")) {
71  // the plots are in the main folder
72  folders.push_back(m_dqm_path);
73  } else {
74  static const boost::regex running_n_processes(".*/Running [0-9]+ processes");
76  std::vector<std::string> subdirs = getter.getSubdirs();
77  for (auto const & subdir: subdirs) {
78  if (boost::regex_match(subdir, running_n_processes)) {
79  if (getter.get(subdir + "/throughput_sourced"))
80  // the plots are in a per-number-of-processes subfolder
81  folders.push_back(subdir + "/throughput_sourced");
82  }
83  }
84  }
85  for (auto const & folder: folders) {
86  TH1F * sourced = getter.get( folder + "/throughput_sourced" )->getTH1F();
87  TH1F * retired = getter.get( folder + "/throughput_retired" )->getTH1F();
88  TH1F * concurrent = nullptr;
89  booker.setCurrentFolder(folder);
90  unsigned int nbins = sourced->GetXaxis()->GetNbins();
91  double range = sourced->GetXaxis()->GetXmax();
92  MonitorElement * me = getter.get( folder + "/concurrent" );
93  if (me) {
94  concurrent = me->getTH1F();
95  assert( concurrent->GetXaxis()->GetNbins() == (int) nbins );
96  assert( concurrent->GetXaxis()->GetXmax() == range );
97  concurrent->Reset();
98  } else {
99  concurrent = booker.book1D("concurrent", "Concurrent events being processed", nbins, 0., range)->getTH1F();
100  }
101  double sum = 0;
102  // from bin=0 (underflow) to bin=nbins+1 (overflow)
103  for (unsigned int i = 0; i <= nbins+1; ++i) {
104  sum += sourced->GetBinContent(i) - retired->GetBinContent(i);
105  concurrent->Fill( concurrent->GetXaxis()->GetBinCenter(i), sum );
106  }
107  }
108 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
assert(m_qm.get())
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle otherwise a larger ***bin number will have no effects or even make the ***precision lower than before *********************************************************************************************************it lies in three folders
Definition: invegas.h:5
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
TH1F * getTH1F(void) const
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:306

Member Data Documentation

std::string ThroughputServiceClient::m_dqm_path
private

Definition at line 34 of file ThroughputServiceClient.cc.

Referenced by fillSummaryPlots().