|
|
Go to the documentation of this file.
25 #include "Alignment/Geners/interface/CompressedIO.hh"
26 #include "Alignment/Geners/interface/StringArchive.hh"
27 #include "Alignment/Geners/interface/Reference.hh"
48 FFTJetLookupTableSequence::iterator it =
seq.find(
category);
51 it->second.insert(std::make_pair(
name, fptr));
55 const std::vector<edm::ParameterSet>& tableDefs,
56 const bool isArchiveCompressed,
60 CPP11_auto_ptr<gs::StringArchive> ar;
62 std::istringstream is(tablePars.
str());
63 if (isArchiveCompressed)
64 ar = gs::read_compressed_item<gs::StringArchive>(is);
66 ar = gs::read_item<gs::StringArchive>(is);
72 std::set<unsigned long long> loadedSet;
74 const unsigned nTables = tableDefs.size();
75 for (
unsigned itab = 0; itab < nTables; ++itab) {
80 gs::Reference<npstat::StorableMultivariateFunctor> ref(*ar, nameSearch, categorySearch);
81 const unsigned long nItems = ref.size();
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));
87 std::shared_ptr<const gs::CatalogEntry>
e = ar->catalogEntry(
id);
90 std::cout <<
"In buildLookupTables: loaded table with name \"" <<
e->name() <<
"\" and category \""
91 <<
e->category() <<
'"' << std::endl;
100 template <
typename CT>
103 typedef std::shared_ptr<FFTJetLookupTableSequence>
ReturnType;
125 template <
typename CT>
128 isArchiveCompressed(psIn.getParameter<
bool>(
"isArchiveCompressed")),
129 verbose(psIn.getUntrackedParameter<
bool>(
"verbose")) {
136 template <
typename CT>
138 auto host = holder_.makeOrGet([]() {
return new HostType; });
140 host->template ifRecordChanges<ParentRecord>(iRecord, [
this, product =
host.get()](
auto const& rec) {
FFTJetLookupTableESProducer< fftluttypes::LUT12 > FFTLUT12TableESProducer
std::vector< edm::ParameterSet > tables
std::shared_ptr< npstat::StorableMultivariateFunctor > StorableFunctorPtr
std::shared_ptr< FFTJetLookupTableSequence > ReturnType
~FFTJetLookupTableESProducer() override
FFTJetLookupTableESProducer< fftluttypes::LUT3 > FFTLUT3TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT2 > FFTLUT2TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT15 > FFTLUT15TableESProducer
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
FFTJetLookupTableESProducer< fftluttypes::EtaFlatteningFactors > FFTEtaFlatteningFactorsTableESProducer
FFTJetLookupTableRcd< CT > MyRecord
FFTJetLookupTableESProducer< fftluttypes::LUT1 > FFTLUT1TableESProducer
FFTJetLookupTableESProducer< fftluttypes::PileupRhoEtaDependence > FFTPileupRhoEtaDependenceTableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT10 > FFTLUT10TableESProducer
static void buildLookupTables(const FFTJetCorrectorParameters &tablePars, const std::vector< edm::ParameterSet > &tableDefs, const bool isArchiveCompressed, const bool verbose, FFTJetLookupTableSequence *ptr)
static constexpr int verbose
FFTJetLookupTableESProducer< fftluttypes::LUT9 > FFTLUT9TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT6 > FFTLUT6TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT13 > FFTLUT13TableESProducer
FFTJetLookupTableESProducer< fftluttypes::PileupRhoCalibration > FFTPileupRhoCalibrationTableESProducer
edm::ReusableObjectHolder< HostType > holder_
FFTJetLookupTableESProducer< fftluttypes::LUT7 > FFTLUT7TableESProducer
const std::string & str() const
FFTJetLookupTableESProducer< fftluttypes::LUT8 > FFTLUT8TableESProducer
ReturnType produce(const MyRecord &)
FFTJetLookupTableESProducer< fftluttypes::LUT0 > FFTLUT0TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT4 > FFTLUT4TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT11 > FFTLUT11TableESProducer
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
T getParameter(std::string const &) const
FFTJetLookupTableESProducer(const edm::ParameterSet &)
FFTJetLookupTableESProducer< fftluttypes::LUT5 > FFTLUT5TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT14 > FFTLUT14TableESProducer
FFTJetCorrectorParametersRcd< CT > ParentRecord
static void insertLUTItem(FFTJetLookupTableSequence &seq, StorableFunctorPtr fptr, const std::string &name, const std::string &category)