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

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

Definition at line 50 of file MonitorElement.h.

Function Documentation

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

Definition at line 20 of file MonitorElement.cc.

References h, and raiseDQMError().

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

20  {
21  if (!tobj)
22  raiseDQMError("MonitorElement",
23  "Method '%s' cannot be invoked on monitor"
24  " element '%s' because it is not a ROOT object.",
25  func,
26  name.c_str());
27 
28  auto *h = static_cast<TH1 *>(tobj);
29  int ndim = h->GetDimension();
30  if (reqdim < 0 || reqdim > ndim)
31  raiseDQMError("MonitorElement",
32  "Method '%s' cannot be invoked on monitor"
33  " element '%s' because it requires %d dimensions; this"
34  " object of type '%s' has %d dimensions",
35  func,
36  name.c_str(),
37  reqdim,
38  typeid(*h).name(),
39  ndim);
40 
41  return h;
42  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:10