CMS 3D CMS Logo

Functions
DQMFileSaver.cc File Reference
#include "DQMFileSaver.h"
#include "DQMServices/Components/interface/fillJson.h"
#include "DQMServices/Core/interface/DQMStore.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 "EventFilter/Utilities/interface/EvFDaqDirector.h"
#include "EventFilter/Utilities/interface/FastMonitoringService.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <utility>
#include <TString.h>
#include <TSystem.h>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>

Go to the source code of this file.

Functions

static std::string dataFileExtension (DQMFileSaver::FileFormat fileFormat)
 
static void doSaveForOnline (DQMFileSaver::DQMStore *store, int run, bool enableMultiThread, const std::string &filename, const std::string &directory, const std::string &rxpat, const std::string &rewrite, DQMFileSaver::DQMStore::SaveReferenceTag saveref, int saveRefQMin, const std::string &filterName, DQMFileSaver::FileFormat fileFormat)
 
static void getAnInt (const edm::ParameterSet &ps, int &value, const std::string &name)
 
static std::string onlineOfflineFileName (const std::string &fileBaseName, const std::string &suffix, const std::string &workflow, const std::string &child, DQMFileSaver::FileFormat fileFormat)
 

Function Documentation

static std::string dataFileExtension ( DQMFileSaver::FileFormat  fileFormat)
static
static void doSaveForOnline ( DQMFileSaver::DQMStore store,
int  run,
bool  enableMultiThread,
const std::string &  filename,
const std::string &  directory,
const std::string &  rxpat,
const std::string &  rewrite,
DQMFileSaver::DQMStore::SaveReferenceTag  saveref,
int  saveRefQMin,
const std::string &  filterName,
DQMFileSaver::FileFormat  fileFormat 
)
static

Definition at line 152 of file DQMFileSaver.cc.

References DQMFileSaver::PB, DQMFileSaver::ROOT, dqm::dqmstoreimpl::DQMStore::save(), and dqm::dqmstoreimpl::DQMStore::savePB().

Referenced by DQMFileSaver::saveForOnline(), and DQMFileSaver::saveForOnlinePB().

162  {
163  // TODO(rovere): fix the online case. so far we simply rely on the
164  // fact that we assume we will not run multithreaded in online.
166  store->save(filename, directory, rxpat, rewrite, enableMultiThread ? run : 0, 0, saveref, saveRefQMin);
167  else if (fileFormat == DQMFileSaver::PB)
168  store->savePB(filename, filterName, enableMultiThread ? run : 0);
169 }
void savePB(std::string const &filename, std::string const &path="", uint32_t run=0, uint32_t lumi=0)
Definition: DQMStore.cc:2413
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
Definition: DQMStore.cc:2244
static void getAnInt ( const edm::ParameterSet ps,
int &  value,
const std::string &  name 
)
static

Definition at line 37 of file DQMFileSaver.cc.

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

Referenced by DQMFileSaver::DQMFileSaver().

37  {
39  if (value < 1 && value != -1)
40  throw cms::Exception("DQMFileSaver") << "Invalid '" << name << "' parameter '" << value
41  << "'. Must be -1 or >= 1.";
42 }
T getUntrackedParameter(std::string const &, T const &) const
Definition: value.py:1
static std::string onlineOfflineFileName ( const std::string &  fileBaseName,
const std::string &  suffix,
const std::string &  workflow,
const std::string &  child,
DQMFileSaver::FileFormat  fileFormat 
)
static

Definition at line 53 of file DQMFileSaver.cc.

References dataFileExtension(), corrVsCorr::filename, AlCaHLTBitMon_QueryRunRegistry::string, and AlCaHarvesting_cff::workflow.

Referenced by DQMFileSaver::saveForOffline(), DQMFileSaver::saveForOfflinePB(), and DQMFileSaver::saveForOnlinePB().

57  {
58  size_t pos = 0;
59  std::string wflow;
60  wflow.reserve(workflow.size() + 3);
61  wflow = workflow;
62  while ((pos = wflow.find('/', pos)) != std::string::npos)
63  wflow.replace(pos++, 1, "__");
64 
65  std::string filename = fileBaseName + suffix + wflow + child + dataFileExtension(fileFormat);
66  return filename;
67 }
static std::string dataFileExtension(DQMFileSaver::FileFormat fileFormat)
Definition: DQMFileSaver.cc:44