25 #include "boost/shared_ptr.hpp" 27 #include "Alignment/Geners/interface/CompressedIO.hh" 28 #include "Alignment/Geners/interface/StringArchive.hh" 29 #include "Alignment/Geners/interface/Reference.hh" 51 FFTJetLookupTableSequence::iterator it = seq.find(category);
53 it = seq.insert(std::make_pair(
55 it->second.insert(std::make_pair(name, fptr));
61 const std::vector<edm::ParameterSet>& tableDefs,
62 const bool isArchiveCompressed,
const bool verbose,
66 CPP11_auto_ptr<gs::StringArchive> ar;
68 std::istringstream is(tablePars.
str());
69 if (isArchiveCompressed)
70 ar = gs::read_compressed_item<gs::StringArchive>(is);
72 ar = gs::read_item<gs::StringArchive>(is);
78 std::set<unsigned long long> loadedSet;
80 const unsigned nTables = tableDefs.size();
81 for (
unsigned itab=0; itab<nTables; ++itab)
88 gs::Reference<npstat::StorableMultivariateFunctor> ref(
89 *ar, nameSearch, categorySearch);
90 const unsigned long nItems = ref.size();
91 for (
unsigned long item=0; item<nItems; ++item)
93 const unsigned long long id = ref.id(item);
94 if (loadedSet.insert(
id).second)
96 CPP11_auto_ptr<npstat::StorableMultivariateFunctor>
p(ref.get(item));
98 CPP11_shared_ptr<const gs::CatalogEntry>
e = ar->catalogEntry(
id);
101 std::cout <<
"In buildLookupTables: loaded table with name \"" 102 << e->name() <<
"\" and category \"" 103 << e->category() <<
'"' << std::endl;
112 template<
typename CT>
116 typedef std::shared_ptr<FFTJetLookupTableSequence>
ReturnType;
123 ReturnType
produce(
const MyRecord&);
140 template<
typename CT>
145 verbose(psIn.getUntrackedParameter<
bool>(
"verbose"))
153 template<
typename CT>
161 host->template ifRecordChanges<ParentRecord>(iRecord,
162 [
this,product=
host.get()](
auto const& rec) {
T getParameter(std::string const &) const
FFTJetLookupTableESProducer< fftluttypes::LUT3 > FFTLUT3TableESProducer
const std::string & str() const
FFTJetLookupTableESProducer< fftluttypes::LUT12 > FFTLUT12TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT15 > FFTLUT15TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT9 > FFTLUT9TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT2 > FFTLUT2TableESProducer
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
std::shared_ptr< FFTJetLookupTableSequence > ReturnType
FFTJetLookupTableESProducer< fftluttypes::EtaFlatteningFactors > FFTEtaFlatteningFactorsTableESProducer
boost::shared_ptr< npstat::StorableMultivariateFunctor > StorableFunctorPtr
std::vector< edm::ParameterSet > tables
edm::ReusableObjectHolder< HostType > holder_
FFTJetLookupTableESProducer< fftluttypes::LUT4 > FFTLUT4TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT10 > FFTLUT10TableESProducer
ReturnType produce(const MyRecord &)
FFTJetLookupTableESProducer< fftluttypes::LUT1 > FFTLUT1TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT14 > FFTLUT14TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT13 > FFTLUT13TableESProducer
FFTJetLookupTableESProducer< fftluttypes::LUT5 > FFTLUT5TableESProducer
FFTJetDict< std::string, FFTJetDict< std::string, boost::shared_ptr< npstat::StorableMultivariateFunctor > > > FFTJetLookupTableSequence
FFTJetLookupTableESProducer< fftluttypes::LUT6 > FFTLUT6TableESProducer
FFTJetLookupTableESProducer< fftluttypes::PileupRhoEtaDependence > FFTPileupRhoEtaDependenceTableESProducer
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
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
edm::ESProductHost< FFTJetLookupTableSequence, ParentRecord > HostType
~FFTJetLookupTableESProducer() override
FFTJetLookupTableESProducer< fftluttypes::LUT0 > FFTLUT0TableESProducer
FFTJetLookupTableESProducer(const edm::ParameterSet &)
FFTJetLookupTableESProducer< fftluttypes::LUT11 > FFTLUT11TableESProducer