CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MonitorElementCollection Class Reference

#include "DataFormats/Histograms/interface/MonitorElementCollection.h"

Public Member Functions

auto begin () const
 
auto end () const
 
bool mergeProduct (MonitorElementCollection const &product)
 
void push_back (std::unique_ptr< const MonitorElementData > value)
 
void swap (MonitorElementCollection &other)
 

Private Attributes

std::vector< std::unique_ptr< const MonitorElementData > > data_
 

Detailed Description

Description: Product to represent DQM data in LuminosityBlocks and Runs. The MonitorElements are represented by a simple struct that only contains the required fields to represent a ME. The only opration allowed on these objects is merging, which is a important part of the DQM functionality and should be handled by EDM.

Usage: This product should only be handled by the DQMStore, which provides access to the MEs inside. The DQMStore will wrap the MonitorElementData in real MonitorElements, which allow various operations on the underlying histograms, depending on the current stage of processing: In the RECO step, only filling is allowed, while in HARVESTING, the same data will be wrapped in a MonitorElement that also allows access to the ROOT objects.

Currently, the product types are not used as products and all data is passed through the edm::Service<DQMStore>.

Definition at line 253 of file MonitorElementCollection.h.

Member Function Documentation

◆ begin()

auto MonitorElementCollection::begin ( void  ) const
inline

Definition at line 265 of file MonitorElementCollection.h.

265 { return data_.begin(); }

References data_.

◆ end()

auto MonitorElementCollection::end ( void  ) const
inline

Definition at line 267 of file MonitorElementCollection.h.

267 { return data_.end(); }

References data_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

◆ mergeProduct()

bool MonitorElementCollection::mergeProduct ( MonitorElementCollection const &  product)
inline

Definition at line 269 of file MonitorElementCollection.h.

269  {
270  // discussion: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuidePerRunAndPerLumiBlockData#Merging_Run_and_Luminosity_Block
271  assert(!"Not implemented yet.");
272  return false;
273  // Things to decide:
274  // - Should we allow merging collections of different sets of MEs? (probably not.) [0]
275  // - Should we assume the MEs to be ordered? (probably yes.)
276  // - How to handle incompatible MEs (different binning)? (fail hard.) [1]
277  // - Can multiple MEs with same (dirname, objname) exist? (probably yes.) [2]
278  // - Shall we modify the (immutable?) ROOT objects? (probably yes.)
279  //
280  // [0] Merging should increase the statistics, but not change the number of
281  // MEs, at least with the current workflows. It might be convenient to
282  // allow it, but for the beginning, it would only mask errors.
283  // [1] The DQM framework should guarantee same booking parameters as long
284  // as we stay within the Scope of the MEs.
285  // [2] To implement e.g. MEs covering blocks of 10LS, we'd store them in a
286  // run product, but have as many MEs with same name but different range as
287  // needed to perserve the wanted granularity. Merging then can merge or
288  // concatenate as possible/needed.
289  // Problem: We need to keep copies in memory until the end of run, even
290  // though we could save them to the output file as soon as it is clear that
291  // the nexe LS will not fall into the same block. Instead, we could drop
292  // them into the next lumi block we see; the semantics would be weird (the
293  // MEs in the lumi block don't actually correspond to the lumi block they
294  // are in) but the DQMIO output should be able to handle that.
295  }

References cms::cuda::assert().

◆ push_back()

void MonitorElementCollection::push_back ( std::unique_ptr< const MonitorElementData value)
inline

Definition at line 257 of file MonitorElementCollection.h.

257  {
258  // enforce ordering
259  assert(data_.empty() || data_[data_.size() - 1] <= value);
260  data_.push_back(std::move(value));
261  }

References cms::cuda::assert(), data_, eostools::move(), and relativeConstraints::value.

◆ swap()

void MonitorElementCollection::swap ( MonitorElementCollection other)
inline

Definition at line 263 of file MonitorElementCollection.h.

263 { data_.swap(other.data_); }

References data_, and trackingPlots::other.

Member Data Documentation

◆ data_

std::vector<std::unique_ptr<const MonitorElementData> > MonitorElementCollection::data_
private

Definition at line 254 of file MonitorElementCollection.h.

Referenced by begin(), end(), push_back(), and swap().

cms::cuda::assert
assert(be >=bs)
trackingPlots.other
other
Definition: trackingPlots.py:1460
value
Definition: value.py:1
eostools.move
def move(src, dest)
Definition: eostools.py:511
relativeConstraints.value
value
Definition: relativeConstraints.py:53
MonitorElementCollection::data_
std::vector< std::unique_ptr< const MonitorElementData > > data_
Definition: MonitorElementCollection.h:254