CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

FFTJetCorrectionESProducer< CT > Class Template Reference

#include <JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h>

Inheritance diagram for FFTJetCorrectionESProducer< CT >:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef
FFTJetCorrectorSequence
< jet_type,
FFTJetCorrectorTransientFromJet,
FFTJetCorrectorResultFromTransient
CorrectorSequence
typedef
FFTJetCorrectionsTypemap< CT >
::jet_type 
jet_type
typedef
FFTJetCorrectorSequenceRcd< CT > 
MyRecord
typedef
FFTJetCorrectorParametersRcd
< CT > 
ParentRecord
typedef boost::shared_ptr
< CorrectorSequence
ReturnType

Public Member Functions

 FFTJetCorrectionESProducer (const edm::ParameterSet &)
ReturnType produce (const MyRecord &)
virtual ~FFTJetCorrectionESProducer ()

Private Member Functions

void doWhenChanged (const ParentRecord &)

Private Attributes

bool isArchiveCompressed
ReturnType product
bool remakeProduct
std::vector< edm::ParameterSetsequence
bool verbose

Detailed Description

template<typename CT>
class FFTJetCorrectionESProducer< CT >

Description: produces the correction sequence

Implementation: [Notes on implementation]

Definition at line 107 of file FFTJetCorrectionESProducer.h.


Member Typedef Documentation

Definition at line 116 of file FFTJetCorrectionESProducer.h.

template<typename CT >
typedef FFTJetCorrectionsTypemap<CT>::jet_type FFTJetCorrectionESProducer< CT >::jet_type

Definition at line 111 of file FFTJetCorrectionESProducer.h.

template<typename CT >
typedef FFTJetCorrectorSequenceRcd<CT> FFTJetCorrectionESProducer< CT >::MyRecord

Definition at line 118 of file FFTJetCorrectionESProducer.h.

template<typename CT >
typedef FFTJetCorrectorParametersRcd<CT> FFTJetCorrectionESProducer< CT >::ParentRecord

Definition at line 119 of file FFTJetCorrectionESProducer.h.

template<typename CT >
typedef boost::shared_ptr<CorrectorSequence> FFTJetCorrectionESProducer< CT >::ReturnType

Definition at line 117 of file FFTJetCorrectionESProducer.h.


Constructor & Destructor Documentation

template<typename CT >
FFTJetCorrectionESProducer< CT >::FFTJetCorrectionESProducer ( const edm::ParameterSet psIn)

Definition at line 144 of file FFTJetCorrectionESProducer.h.

References edm::eventsetup::dependsOn(), FFTJetCorrectionESProducer< CT >::doWhenChanged(), and edm::ESProducer::setWhatProduced().

    : sequence(psIn.getParameter<std::vector<edm::ParameterSet> >("sequence")),
      isArchiveCompressed(psIn.getParameter<bool>("isArchiveCompressed")),
      verbose(psIn.getUntrackedParameter<bool>("verbose", false)),
      remakeProduct(true)
{
    // The following line is needed to tell the framework what
    // data is being produced
    setWhatProduced(this, dependsOn(&FFTJetCorrectionESProducer::doWhenChanged));
}
template<typename CT >
virtual FFTJetCorrectionESProducer< CT >::~FFTJetCorrectionESProducer ( ) [inline, virtual]

Definition at line 122 of file FFTJetCorrectionESProducer.h.

{}

Member Function Documentation

template<typename CT >
void FFTJetCorrectionESProducer< CT >::doWhenChanged ( const ParentRecord ) [inline, private]
template<typename CT >
FFTJetCorrectionESProducer< CT >::ReturnType FFTJetCorrectionESProducer< CT >::produce ( const MyRecord iRecord)

Definition at line 159 of file FFTJetCorrectionESProducer.h.

References edm::eventsetup::EventSetupRecord::get(), lumiContext::sequence, and validate_alignment_devdb10_cfg::verbose.

{
    if (remakeProduct)
    {
        // According to:
        // https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHowToGetDependentRecord
        //
        // If ARecord is dependent on BRecord then you can
        // call the method getRecord of ARecord:
        //
        // const BRecord& b = aRecord.getRecord<BRecord>();
        //
        const ParentRecord& rec = iRecord.template getRecord<ParentRecord>();
        edm::ESTransientHandle<FFTJetCorrectorParameters> parHandle;
        rec.get(parHandle);
        product = buildCorrectorSequence<CorrectorSequence>(
            *parHandle, sequence, isArchiveCompressed, verbose);
        remakeProduct = false;
    }
    return product;
}

Member Data Documentation

template<typename CT >
bool FFTJetCorrectionESProducer< CT >::isArchiveCompressed [private]

Definition at line 132 of file FFTJetCorrectionESProducer.h.

template<typename CT >
ReturnType FFTJetCorrectionESProducer< CT >::product [private]

Definition at line 137 of file FFTJetCorrectionESProducer.h.

template<typename CT >
bool FFTJetCorrectionESProducer< CT >::remakeProduct [private]
template<typename CT >
std::vector<edm::ParameterSet> FFTJetCorrectionESProducer< CT >::sequence [private]

Definition at line 131 of file FFTJetCorrectionESProducer.h.

template<typename CT >
bool FFTJetCorrectionESProducer< CT >::verbose [private]

Definition at line 133 of file FFTJetCorrectionESProducer.h.