CMS 3D CMS Logo

Classes | Functions
CastorTextCalibrations.cc File Reference
#include <map>
#include <memory>
#include <iostream>
#include <fstream>
#include <string>
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ValidityInterval.h"
#include "CalibCalorimetry/CastorCalib/interface/CastorDbASCIIIO.h"
#include "CondFormats/CastorObjects/interface/CastorPedestals.h"
#include "CondFormats/CastorObjects/interface/CastorPedestalWidths.h"
#include "CondFormats/CastorObjects/interface/CastorGains.h"
#include "CondFormats/CastorObjects/interface/CastorGainWidths.h"
#include "CondFormats/CastorObjects/interface/CastorElectronicsMap.h"
#include "CondFormats/CastorObjects/interface/CastorChannelQuality.h"
#include "CondFormats/CastorObjects/interface/CastorQIEData.h"
#include "CondFormats/DataRecord/interface/CastorPedestalsRcd.h"
#include "CondFormats/DataRecord/interface/CastorPedestalWidthsRcd.h"
#include "CondFormats/DataRecord/interface/CastorGainsRcd.h"
#include "CondFormats/DataRecord/interface/CastorGainWidthsRcd.h"
#include "CondFormats/DataRecord/interface/CastorElectronicsMapRcd.h"
#include "CondFormats/DataRecord/interface/CastorChannelQualityRcd.h"
#include "CondFormats/DataRecord/interface/CastorQIEDataRcd.h"
#include "CondFormats/DataRecord/interface/CastorRecoParamsRcd.h"
#include "CondFormats/DataRecord/interface/CastorSaturationCorrsRcd.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/SourceFactory.h"

Go to the source code of this file.

Classes

class  CastorTextCalibrations
 

Functions

template<class T >
std::unique_ptr< Tproduce_impl (const std::string &fFile)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::DescriptionFillerForESSources< CastorTextCalibrations > > s_filler__LINE__ ("CastorTextCalibrations")
 
static const edm::eventsetup::SourcePluginFactory ::PMaker< edm::eventsetup::SourceMaker< CastorTextCalibrations > > s_maker__LINE__ ("CastorTextCalibrations")
 

Function Documentation

◆ produce_impl()

template<class T >
std::unique_ptr<T> produce_impl ( const std::string &  fFile)

Definition at line 126 of file CastorTextCalibrations.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, Exception, CastorDbASCIIIO::getObject(), and mps_fire::result.

126  {
127  std::unique_ptr<T> result(new T());
128  std::ifstream inStream(fFile.c_str());
129  if (!inStream.good()) {
130  std::cerr << "CastorTextCalibrations-> Unable to open file '" << fFile << "'" << std::endl;
131  throw cms::Exception("FileNotFound") << "Unable to open '" << fFile << "'" << std::endl;
132  }
133  if (!CastorDbASCIIIO::getObject(inStream, *result)) {
134  std::cerr << "CastorTextCalibrations-> Can not read object from file '" << fFile << "'" << std::endl;
135  throw cms::Exception("ReadError") << "Can not read object from file '" << fFile << "'" << std::endl;
136  }
137  return result;
138 }
bool getObject(std::istream &fInput, CastorPedestals &fObject)
long double T

◆ s_filler__LINE__()

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

◆ s_maker__LINE__()

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