CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

SiStripDelayESProducer Class Reference

#include <CalibTracker/SiStripESProducers/plugins/real/SiStripDelayESProducer.cc>

Inheritance diagram for SiStripDelayESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

boost::shared_ptr< SiStripDelayproduce (const SiStripDelayRcd &)
 SiStripDelayESProducer (const edm::ParameterSet &)
 ~SiStripDelayESProducer ()

Private Types

typedef std::vector
< edm::ParameterSet
Parameters

Private Attributes

boost::shared_ptr< SiStripDelaydelay
edm::FileInPath fp_
bool MergeList_
edm::ParameterSet pset_
Parameters toGet

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 21 of file SiStripDelayESProducer.h.


Member Typedef Documentation

typedef std::vector< edm::ParameterSet > SiStripDelayESProducer::Parameters [private]

Definition at line 34 of file SiStripDelayESProducer.h.


Constructor & Destructor Documentation

SiStripDelayESProducer::SiStripDelayESProducer ( const edm::ParameterSet iConfig)

Definition at line 26 of file SiStripDelayESProducer.cc.

References delay, and edm::ESProducer::setWhatProduced().

                                                                            :
  pset_(iConfig),
  toGet(iConfig.getParameter<Parameters>("ListOfRecordToMerge"))
{  
  setWhatProduced(this);
  
  edm::LogInfo("SiStripDelayESProducer") << "ctor" << std::endl;

  delay.reset(new SiStripDelay());
}
SiStripDelayESProducer::~SiStripDelayESProducer ( ) [inline]

Definition at line 24 of file SiStripDelayESProducer.h.

{};

Member Function Documentation

boost::shared_ptr< SiStripDelay > SiStripDelayESProducer::produce ( const SiStripDelayRcd iRecord)

Definition at line 38 of file SiStripDelayESProducer.cc.

References delay, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), label, edm::ESHandle< T >::product(), ecalTPGAnalyzer_cfg::recordName, and toGet.

{
  edm::LogInfo("SiStripDelayESProducer") << "produce called" << std::endl;

  delay->clear();

  edm::ESHandle<SiStripBaseDelay> baseDelay;

  std::string label;  
  std::string recordName;
  int sumSign = 0;

  for( Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet ) {
    recordName = itToGet->getParameter<std::string>("Record");
    label = itToGet->getParameter<std::string>("Label");
    sumSign = itToGet->getParameter<int>("SumSign");
    
    edm::LogInfo("SiStripDelayESProducer") << "[SiStripDelayESProducer::produce] Getting data from record " << recordName << " with label " << label << std::endl;

    if( recordName=="SiStripBaseDelayRcd" ) {
      iRecord.getRecord<SiStripBaseDelayRcd>().get(label, baseDelay);
      delay->fillNewDelay( *(baseDelay.product()), sumSign, std::make_pair(recordName, label) );
    } else {
      edm::LogError("SiStripDelayESProducer") << "[SiStripDelayESProducer::produce] Skipping the requested data for unexisting record " << recordName << " with tag " << label << std::endl;
      continue;
    }
  }

  delay->makeDelay();
  
  return delay;
}

Member Data Documentation

boost::shared_ptr<SiStripDelay> SiStripDelayESProducer::delay [private]

Definition at line 37 of file SiStripDelayESProducer.h.

Referenced by produce(), and SiStripDelayESProducer().

Definition at line 31 of file SiStripDelayESProducer.h.

Definition at line 32 of file SiStripDelayESProducer.h.

Definition at line 30 of file SiStripDelayESProducer.h.

Definition at line 35 of file SiStripDelayESProducer.h.

Referenced by produce().