CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
HcalUtilsClient Class Reference

#include <HcalClientUtils.h>

Static Public Member Functions

template<class T >
static T getHisto (const MonitorElement *me, bool clone=false, T ret=0, int debug=0)
 Returns the histogram contained by the Monitor Element. More...
 

Detailed Description

Definition at line 22 of file HcalClientUtils.h.

Member Function Documentation

template<class T >
template< class T > static T HcalUtilsClient::getHisto ( const MonitorElement me,
bool  clone = false,
T  ret = 0,
int  debug = 0 
)
inlinestatic

Returns the histogram contained by the Monitor Element.

Parameters
meMonitor Element
clone(boolean) if true clone the histogram
retin case of clonation delete the histogram first
debugdump out debugging info

Definition at line 34 of file HcalClientUtils.h.

References clone(), gather_cfg::cout, debug, MonitorElement::getName(), runTheMatrix::ret, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

34  {
35  if( me ) {
36  if (debug>0) std::cout << "Found '" << me->getName() <<"'" << std::endl;
37  TObject* ob = const_cast<MonitorElement*>(me)->getRootObject();
38  if( ob ) {
39  if( clone ) {
40  if( ret ) {
41  delete ret;
42  }
43  std::string s = "ME " + me->getName();
44  ret = dynamic_cast<T>(ob->Clone(s.c_str()));
45  if( ret ) {
46  ret->SetDirectory(0);
47  }
48  } else {
49  ret = dynamic_cast<T>(ob);
50  }
51  } else {
52  ret = 0;
53  }
54  } else {
55  if( !clone ) {
56  ret = 0;
57  }
58  }
59  return ret;
60  }
const std::string & getName(void) const
get name of ME
tuple ret
prodAgent to be discontinued
#define debug
Definition: HDRShower.cc:19
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
tuple cout
Definition: gather_cfg.py:145
long double T