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;
127 template <
typename CT>
130 isArchiveCompressed(psIn.getParameter<
bool>(
"isArchiveCompressed")),
131 verbose(psIn.getUntrackedParameter<
bool>(
"verbose")) {
139 template <
typename CT>
141 auto host = holder_.makeOrGet([]() {
return new HostType; });
143 host->template ifRecordChanges<ParentRecord>(iRecord, [
this, product =
host.get()](
auto const& rec) {
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
edm::ESGetToken< FFTJetCorrectorParameters, ParentRecord > token_
FFTJetLookupTableESProducer< fftluttypes::LUT3 > FFTLUT3TableESProducer
T getParameter(std::string const &) const
FFTJetLookupTableESProducer< fftluttypes::LUT12 > FFTLUT12TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT15 > FFTLUT15TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT9 > FFTLUT9TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT2 > FFTLUT2TableESProducer
std::shared_ptr< FFTJetLookupTableSequence > ReturnType
FFTJetLookupTableESProducer< fftluttypes::EtaFlatteningFactors > FFTEtaFlatteningFactorsTableESProducer
std::vector< edm::ParameterSet > tables
edm::ReusableObjectHolder< HostType > holder_
std::shared_ptr< npstat::StorableMultivariateFunctor > StorableFunctorPtr
FFTJetLookupTableESProducer< fftluttypes::LUT4 > FFTLUT4TableESProducer
const std::string & str() const
FFTJetLookupTableESProducer< fftluttypes::LUT10 > FFTLUT10TableESProducer
ReturnType produce(const MyRecord &)
FFTJetLookupTableESProducer< fftluttypes::LUT1 > FFTLUT1TableESProducer
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
FFTJetLookupTableESProducer< fftluttypes::LUT14 > FFTLUT14TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT13 > FFTLUT13TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT5 > FFTLUT5TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT6 > FFTLUT6TableESProducer
FFTJetLookupTableESProducer< fftluttypes::PileupRhoEtaDependence > FFTPileupRhoEtaDependenceTableESProducer
FFTJetCorrectorParametersRcd< CT > ParentRecord
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)
FFTJetLookupTableESProducer< fftluttypes::LUT8 > FFTLUT8TableESProducer
FFTJetLookupTableESProducer< fftluttypes::PileupRhoCalibration > FFTPileupRhoCalibrationTableESProducer
FFTJetLookupTableRcd< CT > MyRecord
FFTJetLookupTableESProducer< fftluttypes::LUT7 > FFTLUT7TableESProducer
~FFTJetLookupTableESProducer() override
FFTJetLookupTableESProducer< fftluttypes::LUT0 > FFTLUT0TableESProducer
FFTJetLookupTableESProducer(const edm::ParameterSet &)
FFTJetLookupTableESProducer< fftluttypes::LUT11 > FFTLUT11TableESProducer