CMS 3D CMS Logo

Public Member Functions | Private Member Functions

SiStripBaseDelayGenerator Class Reference

#include <SiStripBaseDelayGenerator.h>

Inheritance diagram for SiStripBaseDelayGenerator:
SiStripCondObjBuilderBase< SiStripBaseDelay >

List of all members.

Public Member Functions

void getObj (SiStripBaseDelay *&obj)
 SiStripBaseDelayGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &)
 ~SiStripBaseDelayGenerator ()

Private Member Functions

void createObject ()

Detailed Description

Fake generator for base delay values stored in the SiStripBaseDelay object.

Definition at line 14 of file SiStripBaseDelayGenerator.h.


Constructor & Destructor Documentation

SiStripBaseDelayGenerator::SiStripBaseDelayGenerator ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
) [explicit]

Definition at line 10 of file SiStripBaseDelayGenerator.cc.

                                                                                                                  :
  SiStripCondObjBuilderBase<SiStripBaseDelay>::SiStripCondObjBuilderBase(iConfig)
{
  edm::LogInfo("SiStripBaseDelayGenerator") << "[SiStripBaseDelayGenerator::SiStripBaseDelayGenerator]";
}
SiStripBaseDelayGenerator::~SiStripBaseDelayGenerator ( )

Definition at line 16 of file SiStripBaseDelayGenerator.cc.

{
  edm::LogInfo("SiStripBaseDelayGenerator") << "[SiStripBaseDelayGenerator::~SiStripBaseDelayGenerator]";
}

Member Function Documentation

void SiStripBaseDelayGenerator::createObject ( ) [private]

Definition at line 21 of file SiStripBaseDelayGenerator.cc.

References SiStripCondObjBuilderBase< SiStripBaseDelay >::_pset, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), SiStripCondObjBuilderBase< SiStripBaseDelay >::obj_, SiStripBaseDelay::put(), and matplotRender::reader.

Referenced by getObj().

{
  obj_ = new SiStripBaseDelay();

  // Read the full list of detIds
  edm::FileInPath fp_ = _pset.getParameter<edm::FileInPath>("file");
  uint16_t coarseDelay = _pset.getParameter<uint32_t>("CoarseDelay");
  uint16_t fineDelay = _pset.getParameter<uint32_t>("FineDelay");
  SiStripDetInfoFileReader reader(fp_.fullPath());
  const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > detInfos = reader.getAllData();
  if( !detInfos.empty() ) {
    std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>::const_iterator it = detInfos.begin();
    for( ; it != detInfos.end(); ++it ) {
      obj_->put(it->first, coarseDelay, fineDelay);
    }
  }
  else {
    edm::LogError("SiStripBaseDelayGenerator") << "Error: detInfo map is empty." << std::endl;
  }
}
void SiStripBaseDelayGenerator::getObj ( SiStripBaseDelay *&  obj) [inline, virtual]