CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DQMFileSaver.cc File Reference
#include "DQMServices/Components/src/DQMFileSaver.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Version/interface/GetReleaseVersion.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/MessageLogger/interface/JobReport.h"
#include <sys/stat.h>
#include <unistd.h>
#include <iostream>
#include <vector>
#include <string>
#include <TString.h>
#include <TSystem.h>

Go to the source code of this file.

Functions

static void doSaveForOnline (std::list< std::string > &pastSavedFiles, size_t numKeepSavedFiles, DQMStore *store, const std::string &filename, const std::string &directory, const std::string &rxpat, const std::string &rewrite, DQMStore::SaveReferenceTag saveref, int saveRefQMin)
 
static void getAnInt (const edm::ParameterSet &ps, int &value, const std::string &name)
 

Function Documentation

static void doSaveForOnline ( std::list< std::string > &  pastSavedFiles,
size_t  numKeepSavedFiles,
DQMStore store,
const std::string &  filename,
const std::string &  directory,
const std::string &  rxpat,
const std::string &  rewrite,
DQMStore::SaveReferenceTag  saveref,
int  saveRefQMin 
)
static

Definition at line 115 of file DQMFileSaver.cc.

References DQMStore::save().

Referenced by DQMFileSaver::saveForOnline().

124 {
125  store->save(filename, directory , rxpat,
126  rewrite, saveref, saveRefQMin);
127  pastSavedFiles.push_back(filename);
128  if (pastSavedFiles.size() > numKeepSavedFiles)
129  {
130  remove(pastSavedFiles.front().c_str());
131  pastSavedFiles.pop_front();
132  }
133 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2118
tuple filename
Definition: lut2db_cfg.py:20
static void getAnInt ( const edm::ParameterSet ps,
int &  value,
const std::string &  name 
)
static

Definition at line 22 of file DQMFileSaver.cc.

References edm::hlt::Exception, edm::ParameterSet::getUntrackedParameter(), mergeVDriftHistosByStation::name, and relativeConstraints::value.

Referenced by DQMFileSaver::DQMFileSaver().

23 {
25  if (value < 1 && value != -1)
26  throw cms::Exception("DQMFileSaver")
27  << "Invalid '" << name << "' parameter '" << value
28  << "'. Must be -1 or >= 1.";
29 }
T getUntrackedParameter(std::string const &, T const &) const