CMS 3D CMS Logo

Functions | Variables

/data/refman/pasoursint/CMSSW_5_3_0/src/DQMServices/Core/src/DQMStore.cc File Reference

#include "DQMServices/Core/interface/Standalone.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/QReport.h"
#include "DQMServices/Core/interface/QTest.h"
#include "DQMServices/Core/src/DQMError.h"
#include "classlib/utils/RegexpMatch.h"
#include "classlib/utils/Regexp.h"
#include "classlib/utils/StringOps.h"
#include "TFile.h"
#include "TROOT.h"
#include "TKey.h"
#include "TClass.h"
#include "TSystem.h"
#include <iterator>
#include <cerrno>
#include <boost/algorithm/string.hpp>

Go to the source code of this file.

Functions

static void cleanTrailingSlashes (const std::string &path, std::string &clean, const std::string *&cleaned)
template<class T >
void initQCriterion (std::map< std::string, QCriterion *(*)(const std::string &)> &m)
static bool isSubdirectory (const std::string &ofdir, const std::string &path)
template<class T >
QCriterionmakeQCriterion (const std::string &qtname)
static void mergePath (std::string &path, const std::string &dir, const std::string &name)
static const lat::Regexp s_rxmeqr1 ("^st:(\\d+):([-+e.\\d]+):([^:]*):(.*)$")
static const lat::Regexp s_rxmeqr2 ("^st\\.(\\d+)\\.(.*)$")
static const lat::Regexp s_rxmeval ("^<(.*)>(i|f|s|e|t|qr)=(.*)</\\1>$")
static void splitPath (std::string &dir, std::string &name, const std::string &path)

Variables

static std::string s_collateDirName = "Collate"
static std::string s_monitorDirName = "DQMData"
static std::string s_referenceDirName = "Reference"
static std::string s_safe = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# "

Function Documentation

static void cleanTrailingSlashes ( const std::string &  path,
std::string &  clean,
const std::string *&  cleaned 
) [static]

Definition at line 69 of file DQMStore.cc.

References clean, and getHLTPrescaleColumns::path.

Referenced by DQMStore::cd(), DQMStore::getAllContents(), DQMStore::getContents(), DQMStore::getStatus(), DQMStore::rmdir(), DQMStore::setCurrentFolder(), DQMStore::tagAllContents(), and DQMStore::useQTest().

{
  clean.clear();
  cleaned = &path;

  size_t len = path.size();
  for ( ; len > 0 && path[len-1] == '/'; --len)
    ;

  if (len != path.size())
  {
    clean = path.substr(0, len);
    cleaned = &clean;
  }
}
template<class T >
void initQCriterion ( std::map< std::string, QCriterion *(*)(const std::string &)> &  m)

Definition at line 115 of file DQMStore.cc.

References m.

{ m[T::getAlgoName()] = &makeQCriterion<T>; }
static bool isSubdirectory ( const std::string &  ofdir,
const std::string &  path 
) [static]

Check whether the path is a subdirectory of ofdir. Returns true both for an exact match and any nested subdirectory.

Definition at line 59 of file DQMStore.cc.

Referenced by DQMStore::containsAnyMonitorable(), DQMStore::extract(), DQMStore::getAllContents(), DQMStore::getAllTags(), DQMStore::getContents(), DQMStore::getMEs(), DQMStore::getStatus(), DQMStore::getSubdirs(), DQMStore::isCollateME(), DQMStore::readDirectory(), DQMStore::removeContents(), DQMStore::rmdir(), DQMStore::runQTests(), DQMStore::save(), and DQMStore::tagAllContents().

{
  return (ofdir.empty()
          || (path.size() >= ofdir.size()
              && path.compare(0, ofdir.size(), ofdir) == 0
              && (path.size() == ofdir.size()
                  || path[ofdir.size()] == '/')));
}
template<class T >
QCriterion* makeQCriterion ( const std::string &  qtname)

Definition at line 110 of file DQMStore.cc.

{ return new T(qtname); }
static void mergePath ( std::string &  path,
const std::string &  dir,
const std::string &  name 
) [static]

Definition at line 99 of file DQMStore.cc.

References dir, and mergeVDriftHistosByStation::name.

Referenced by DQMStore::book(), DQMStore::getMatchingContents(), and DQMStore::useQTestByMatch().

{
  path.reserve(dir.size() + name.size() + 2);
  path += dir;
  if (! path.empty())
    path += '/';
  path += name;
}
static const lat::Regexp s_rxmeqr1 ( "^st:(\\d+):([-+e.\\d]+):([^:]*):(.*)$"  ) [static]

Referenced by DQMStore::extract().

static const lat::Regexp s_rxmeqr2 ( "^st\\.(\\d+)\\.(.*)$"  ) [static]

Referenced by DQMStore::extract().

static const lat::Regexp s_rxmeval ( ) [static]

Referenced by DQMStore::extract().

static void splitPath ( std::string &  dir,
std::string &  name,
const std::string &  path 
) [static]

Definition at line 86 of file DQMStore.cc.

References getHLTPrescaleColumns::path, and cmsCodeRules::pickleFileParser::slash.

Referenced by DQMStore::get(), and DQMStore::tag().

{
  size_t slash = path.rfind('/');
  if (slash != std::string::npos)
  {
    dir.append(path, 0, slash);
    name.append(path, slash+1, std::string::npos);
  }
  else
    name = path;
}

Variable Documentation

std::string s_collateDirName = "Collate" [static]

Definition at line 48 of file DQMStore.cc.

Referenced by DQMStore::isCollateME(), and DQMStore::readDirectory().

std::string s_monitorDirName = "DQMData" [static]

name of global monitoring folder (containing all sources subdirectories)

Definition at line 46 of file DQMStore.cc.

Referenced by DQMStore::readDirectory(), and DQMStore::save().

std::string s_referenceDirName = "Reference" [static]
std::string s_safe = "/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+=_()# " [static]

Definition at line 49 of file DQMStore.cc.

Referenced by DQMStore::findObject(), and DQMStore::useQTest().