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 <sys/types.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 119 of file DQMFileSaver.cc.

References DQMStore::save().

Referenced by DQMFileSaver::saveForOnline().

128 {
129  // TODO(rovere): fix the online case. so far we simply rely on the
130  // fact that we assume we will not run multithreaded in online.
131  store->save(filename,
132  directory ,
133  rxpat,
134  rewrite,
135  0,
136  saveref,
137  saveRefQMin);
138  pastSavedFiles.push_back(filename);
139  if (pastSavedFiles.size() > numKeepSavedFiles)
140  {
141  remove(pastSavedFiles.front().c_str());
142  pastSavedFiles.pop_front();
143  }
144 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
tuple filename
Definition: lut2db_cfg.py:20
static void getAnInt ( const edm::ParameterSet ps,
int &  value,
const std::string &  name 
)
static

Definition at line 23 of file DQMFileSaver.cc.

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

Referenced by DQMFileSaver::DQMFileSaver().

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