#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) |
Definition at line 22 of file HcalClientUtils.h.
static T HcalUtilsClient::getHisto | ( | const MonitorElement * | me, |
bool | clone = false , |
||
T | ret = 0 , |
||
int | debug = 0 |
||
) | [inline, static] |
Definition at line 34 of file HcalClientUtils.h.
References clone(), gather_cfg::cout, debug, MonitorElement::getName(), runTheMatrix::ret, and asciidump::s.
{ if( me ) { if (debug>0) std::cout << "Found '" << me->getName() <<"'" << std::endl; TObject* ob = const_cast<MonitorElement*>(me)->getRootObject(); if( ob ) { if( clone ) { if( ret ) { delete ret; } std::string s = "ME " + me->getName(); ret = dynamic_cast<T>(ob->Clone(s.c_str())); if( ret ) { ret->SetDirectory(0); } } else { ret = dynamic_cast<T>(ob); } } else { ret = 0; } } else { if( !clone ) { ret = 0; } } return ret; }