Go to the source code of this file.
template<class CorrectorSequence >
static std::shared_ptr<CorrectorSequence> buildCorrectorSequence |
( |
const FFTJetCorrectorParameters & |
tablePars, |
|
|
const std::vector< edm::ParameterSet > & |
sequence, |
|
|
const bool |
isArchiveCompressed, |
|
|
const bool |
verbose |
|
) |
| |
|
static |
Definition at line 54 of file FFTJetCorrectionESProducer.h.
References Exception, hcalDigis_cfi::level, and FFTJetCorrectorParameters::str().
59 typedef typename CorrectorSequence::Corrector Corrector;
60 typedef typename CorrectorSequence::jet_type jet_type;
63 CPP11_auto_ptr<gs::StringArchive> ar;
65 std::istringstream is(tablePars.
str());
66 if (isArchiveCompressed)
67 ar = gs::read_compressed_item<gs::StringArchive>(is);
69 ar = gs::read_item<gs::StringArchive>(is);
73 auto ptr = std::make_shared<CorrectorSequence>();
78 const unsigned nLevels =
sequence.size();
79 for (
unsigned lev=0; lev<nLevels; ++lev)
80 ptr->addCorrector(parseFFTJetCorrector<Corrector>(
85 unsigned previousLevel = 0;
86 for (
unsigned lev=0; lev<nLevels; ++lev)
88 const unsigned level = (*ptr)[lev].level();
91 if (level <= previousLevel)
93 <<
"Error in buildCorrectorSequence: " 94 <<
"correction levels are out of order\n";
95 previousLevel =
level;
const std::string & str() const