CMS 3D CMS Logo

Static Public Member Functions

HcalUtilsClient Class Reference

#include <HcalClientUtils.h>

List of all members.

Static Public Member Functions

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

Detailed Description

Definition at line 22 of file HcalClientUtils.h.


Member Function Documentation

template<class T >
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(), run_regression::ret, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                                                            {
    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;
  }