23 #include "Alignment/Geners/interface/StringArchive.hh"
24 #include "Alignment/Geners/interface/CompressedIO.hh"
40 #define init_param(type, varname) varname (ps.getParameter< type >( #varname ))
79 iSetup,
record, JetCorParams);
82 std::cout <<
"++++ FFTJetCorrectorDBReader: info for record \""
83 <<
record <<
'"' << std::endl;
87 << JetCorParams->str() <<
'"' << std::endl;
90 CPP11_auto_ptr<gs::StringArchive> par;
93 std::istringstream is(JetCorParams->str());
95 par = gs::read_compressed_item<gs::StringArchive>(is);
97 par = gs::read_item<gs::StringArchive>(is);
100 const unsigned long long idSmall = par->smallestId();
102 std::cout <<
"++++ No valid records in the archive" << std::endl;
105 std::cout <<
"++++ Archive metadata begins" << std::endl;
106 const unsigned long long idLarge = par->largestId();
107 unsigned long long count = 0;
108 for (
unsigned long long id = idSmall;
id <= idLarge; ++id)
109 if (par->itemExists(
id))
111 CPP11_shared_ptr<const gs::CatalogEntry>
e =
112 par->catalogEntry(
id);
117 std::cout <<
"\n++++ Archive metadata ends, "
118 << count <<
" items total" << std::endl;
124 std::ofstream of(
outputFile.c_str(), std::ios_base::binary);
127 <<
"Failed to open file \"" <<
outputFile <<
'"' << std::endl;
128 if (!JetCorParams->empty())
130 of.write(JetCorParams->getBuffer(), JetCorParams->length());
133 <<
"Output stream failure while writing file \""
#define DEFINE_FWK_MODULE(type)
FFTJetCorrectorDBReader & operator=(const FFTJetCorrectorDBReader &)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
FFTJetCorrectorDBReader()
virtual ~FFTJetCorrectorDBReader()
#define init_param(type, varname)
static const Mapper & instance()