CMS 3D CMS Logo

Classes | Typedefs | Functions
CondDBESSource.cc File Reference
#include "CondDBESSource.h"
#include <boost/algorithm/string.hpp>
#include "CondCore/CondDB/interface/Exception.h"
#include "CondCore/CondDB/interface/Time.h"
#include "CondCore/CondDB/interface/Types.h"
#include "CondCore/CondDB/interface/Utils.h"
#include "CondCore/ESSources/interface/ProductResolverFactory.h"
#include "CondCore/ESSources/interface/ProductResolver.h"
#include "CondCore/CondDB/interface/PayloadProxy.h"
#include "FWCore/Catalog/interface/SiteLocalConfig.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include <exception>
#include <iomanip>
#include <nlohmann/json.hpp>
#include "FWCore/Framework/interface/SourceFactory.h"

Go to the source code of this file.

Classes

class  PoolDBESSource
 

Typedefs

using json = nlohmann::json
 

Functions

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::DescriptionFillerForESSources< PoolDBESSource > > s_filler__LINE__ ("PoolDBESSource")
 
static const edm::eventsetup::SourcePluginFactory ::PMaker< edm::eventsetup::SourceMaker< PoolDBESSource > > s_maker__LINE__ ("PoolDBESSource")
 
void saveJsonToFile (const json &jsonData, const std::string &filename)
 

Typedef Documentation

◆ json

using json = nlohmann::json

Definition at line 35 of file CondDBESSource.cc.

Function Documentation

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForESSources< PoolDBESSource > > s_filler__LINE__ ( "PoolDBESSource"  )
static

◆ s_maker__LINE__()

static const edm::eventsetup::SourcePluginFactory ::PMaker< edm::eventsetup::SourceMaker< PoolDBESSource > > s_maker__LINE__ ( "PoolDBESSource"  )
static

◆ saveJsonToFile()

void saveJsonToFile ( const json jsonData,
const std::string &  filename 
)

Definition at line 358 of file CondDBESSource.cc.

References DMR_cfg::cerr, gather_cfg::cout, corrVsCorr::filename, and download_sqlite_cfg::outputFile.

Referenced by CondDBESSource::~CondDBESSource().

358  {
359  std::ofstream outputFile(filename);
360  if (outputFile.is_open()) {
361  outputFile << jsonData.dump(2) << std::endl;
362  std::cout << "JSON data saved in file '" << filename << "'" << std::endl;
363  } else {
364  std::cerr << "Error opening file to write JSON data." << std::endl;
365  }
366 }