CMS 3D CMS Logo

Classes | Typedefs | Functions
FFTJetLookupTableESProducer.cc File Reference
#include <sstream>
#include <utility>
#include <memory>
#include "Alignment/Geners/interface/CompressedIO.hh"
#include "Alignment/Geners/interface/StringArchive.hh"
#include "Alignment/Geners/interface/Reference.hh"
#include "FWCore/Framework/interface/ModuleFactory.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/ESProductHost.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/Utilities/interface/ReusableObjectHolder.h"
#include "CondFormats/JetMETObjects/interface/FFTJetCorrectorParameters.h"
#include "CondFormats/JetMETObjects/interface/FFTJetLUTTypes.h"
#include "JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableRcd.h"
#include "JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequence.h"

Go to the source code of this file.

Classes

class  FFTJetLookupTableESProducer< CT >
 

Typedefs

typedef FFTJetLookupTableESProducer< fftluttypes::EtaFlatteningFactorsFFTEtaFlatteningFactorsTableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT0FFTLUT0TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT10FFTLUT10TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT11FFTLUT11TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT12FFTLUT12TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT13FFTLUT13TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT14FFTLUT14TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT15FFTLUT15TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT1FFTLUT1TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT2FFTLUT2TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT3FFTLUT3TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT4FFTLUT4TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT5FFTLUT5TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT6FFTLUT6TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT7FFTLUT7TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT8FFTLUT8TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::LUT9FFTLUT9TableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::PileupRhoCalibrationFFTPileupRhoCalibrationTableESProducer
 
typedef FFTJetLookupTableESProducer< fftluttypes::PileupRhoEtaDependenceFFTPileupRhoEtaDependenceTableESProducer
 
typedef std::shared_ptr< npstat::StorableMultivariateFunctorStorableFunctorPtr
 

Functions

static void buildLookupTables (const FFTJetCorrectorParameters &tablePars, const std::vector< edm::ParameterSet > &tableDefs, const bool isArchiveCompressed, const bool verbose, FFTJetLookupTableSequence *ptr)
 
static void insertLUTItem (FFTJetLookupTableSequence &seq, StorableFunctorPtr fptr, const std::string &name, const std::string &category)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::DescriptionFillerForESProducers< FFTEtaFlatteningFactorsTableESProducer > > s_filler__LINE__ ("FFTEtaFlatteningFactorsTableESProducer")
 
static const edm::eventsetup::ModulePluginFactory ::PMaker< edm::eventsetup::ModuleMaker< FFTEtaFlatteningFactorsTableESProducer > > s_maker__LINE__ ("FFTEtaFlatteningFactorsTableESProducer")
 

Typedef Documentation

◆ FFTEtaFlatteningFactorsTableESProducer

Definition at line 152 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT0TableESProducer

Definition at line 155 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT10TableESProducer

Definition at line 165 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT11TableESProducer

Definition at line 166 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT12TableESProducer

Definition at line 167 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT13TableESProducer

Definition at line 168 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT14TableESProducer

Definition at line 169 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT15TableESProducer

Definition at line 170 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT1TableESProducer

Definition at line 156 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT2TableESProducer

Definition at line 157 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT3TableESProducer

Definition at line 158 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT4TableESProducer

Definition at line 159 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT5TableESProducer

Definition at line 160 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT6TableESProducer

Definition at line 161 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT7TableESProducer

Definition at line 162 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT8TableESProducer

Definition at line 163 of file FFTJetLookupTableESProducer.cc.

◆ FFTLUT9TableESProducer

Definition at line 164 of file FFTJetLookupTableESProducer.cc.

◆ FFTPileupRhoCalibrationTableESProducer

Definition at line 153 of file FFTJetLookupTableESProducer.cc.

◆ FFTPileupRhoEtaDependenceTableESProducer

Definition at line 154 of file FFTJetLookupTableESProducer.cc.

◆ StorableFunctorPtr

Definition at line 42 of file FFTJetLookupTableESProducer.cc.

Function Documentation

◆ buildLookupTables()

static void buildLookupTables ( const FFTJetCorrectorParameters tablePars,
const std::vector< edm::ParameterSet > &  tableDefs,
const bool  isArchiveCompressed,
const bool  verbose,
FFTJetLookupTableSequence ptr 
)
static

Definition at line 54 of file FFTJetLookupTableESProducer.cc.

References gather_cfg::cout, MillePedeFileConverter_cfg::e, edm::ParameterSet::getParameter(), insertLUTItem(), B2GTnPMonitor_cfi::item, AlCaHLTBitMon_ParallelJobs::p, FFTJetCorrectorParameters::str(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose.

Referenced by FFTJetLookupTableESProducer< CT >::produce().

58  {
59  // Load the archive stored in the FFTJetCorrectorParameters object
60  CPP11_auto_ptr<gs::StringArchive> ar;
61  {
62  std::istringstream is(tablePars.str());
63  if (isArchiveCompressed)
64  ar = gs::read_compressed_item<gs::StringArchive>(is);
65  else
66  ar = gs::read_item<gs::StringArchive>(is);
67  }
68 
69  ptr->clear();
70 
71  // Avoid loading the same item more than once
72  std::set<unsigned long long> loadedSet;
73 
74  const unsigned nTables = tableDefs.size();
75  for (unsigned itab = 0; itab < nTables; ++itab) {
76  const edm::ParameterSet& ps(tableDefs[itab]);
77  gs::SearchSpecifier nameSearch(ps.getParameter<std::string>("name"), ps.getParameter<bool>("nameIsRegex"));
78  gs::SearchSpecifier categorySearch(ps.getParameter<std::string>("category"),
79  ps.getParameter<bool>("categoryIsRegex"));
80  gs::Reference<npstat::StorableMultivariateFunctor> ref(*ar, nameSearch, categorySearch);
81  const unsigned long nItems = ref.size();
82  for (unsigned long item = 0; item < nItems; ++item) {
83  const unsigned long long id = ref.id(item);
84  if (loadedSet.insert(id).second) {
85  CPP11_auto_ptr<npstat::StorableMultivariateFunctor> p(ref.get(item));
86  StorableFunctorPtr fptr(p.release());
87  std::shared_ptr<const gs::CatalogEntry> e = ar->catalogEntry(id);
88  insertLUTItem(*ptr, fptr, e->name(), e->category());
89  if (verbose)
90  std::cout << "In buildLookupTables: loaded table with name \"" << e->name() << "\" and category \""
91  << e->category() << '"' << std::endl;
92  }
93  }
94  }
95 }
bool verbose
std::shared_ptr< npstat::StorableMultivariateFunctor > StorableFunctorPtr
const std::string & str() const
static void insertLUTItem(FFTJetLookupTableSequence &seq, StorableFunctorPtr fptr, const std::string &name, const std::string &category)

◆ insertLUTItem()

static void insertLUTItem ( FFTJetLookupTableSequence seq,
StorableFunctorPtr  fptr,
const std::string &  name,
const std::string &  category 
)
static

Definition at line 44 of file FFTJetLookupTableESProducer.cc.

References taus_updatedMVAIds_cff::category, Skims_PA_cff::name, and cmsswSequenceInfo::seq.

Referenced by buildLookupTables().

47  {
48  FFTJetLookupTableSequence::iterator it = seq.find(category);
49  if (it == seq.end())
50  it = seq.insert(std::make_pair(category, FFTJetDict<std::string, StorableFunctorPtr>())).first;
51  it->second.insert(std::make_pair(name, fptr));
52 }

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::DescriptionFillerForESProducers< FFTLUT15TableESProducer > > s_filler__LINE__ ( "FFTEtaFlatteningFactorsTableESProducer"  )
static

◆ s_maker__LINE__()

static const edm::eventsetup::ModulePluginFactory::PMaker< edm::eventsetup::ModuleMaker< FFTLUT15TableESProducer > > s_maker__LINE__ ( "FFTEtaFlatteningFactorsTableESProducer"  )
static