CMS 3D CMS Logo

Classes | Typedefs | Functions
dqm::impl Namespace Reference

Classes

struct  Access
 
struct  AccessMut
 
class  MonitorElement
 
struct  MutableMonitorElementData
 

Typedefs

using dqmmutex = tbb::spin_mutex
 

Functions

static TH1 * checkRootObject (const std::string &name, TObject *tobj, const char *func, int reqdim)
 

Typedef Documentation

◆ dqmmutex

using dqm::impl::dqmmutex = typedef tbb::spin_mutex

Definition at line 79 of file MonitorElement.h.

Function Documentation

◆ checkRootObject()

static TH1* dqm::impl::checkRootObject ( const std::string &  name,
TObject *  tobj,
const char *  func,
int  reqdim 
)
static

Definition at line 16 of file MonitorElement.cc.

References Exception, EcalMonitorTask_cff::func, h, and Skims_PA_cff::name.

Referenced by dqm::impl::MonitorElement::accessRootObject().

16  {
17  if (!tobj)
18  throw cms::Exception("MonitorElementError") << "Method '" << func
19  << "' cannot be invoked on monitor"
20  " element '"
21  << name << "' because it is not a ROOT object.";
22 
23  auto *h = static_cast<TH1 *>(tobj);
24  int ndim = h->GetDimension();
25  if (reqdim < 0 || reqdim > ndim)
26  throw cms::Exception("MonitorElementError") << "Method '" << func
27  << "' cannot be invoked on monitor"
28  " element '"
29  << name << "' because it requires " << reqdim
30  << " dimensions; this"
31  " object of type '"
32  << typeid(*h).name() << "' has " << ndim << " dimensions";
33 
34  return h;
35  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4