#include <SiStripBackPlaneCorrectionGenerator.h>
Public Member Functions | |
void | getObj (SiStripBackPlaneCorrection *&obj) |
SiStripBackPlaneCorrectionGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &) | |
~SiStripBackPlaneCorrectionGenerator () | |
Private Member Functions | |
void | createObject () |
Generator of the ideal/fake conditions for the BackPlaneCorrection.
It receives input values for each module geometry type and it creates a per detIt reccord.
Definition at line 16 of file SiStripBackPlaneCorrectionGenerator.h.
SiStripBackPlaneCorrectionGenerator::SiStripBackPlaneCorrectionGenerator | ( | const edm::ParameterSet & | iConfig, |
const edm::ActivityRegistry & | aReg | ||
) | [explicit] |
Definition at line 15 of file SiStripBackPlaneCorrectionGenerator.cc.
: SiStripCondObjBuilderBase<SiStripBackPlaneCorrection>::SiStripCondObjBuilderBase(iConfig) { edm::LogInfo("SiStripBackPlaneCorrectionGenerator") << "[SiStripBackPlaneCorrectionGenerator::SiStripBackPlaneCorrectionGenerator]"; }
SiStripBackPlaneCorrectionGenerator::~SiStripBackPlaneCorrectionGenerator | ( | ) |
Definition at line 22 of file SiStripBackPlaneCorrectionGenerator.cc.
{ edm::LogInfo("SiStripBackPlaneCorrectionGenerator") << "[SiStripBackPlaneCorrectionGenerator::~SiStripBackPlaneCorrectionGenerator]"; }
void SiStripBackPlaneCorrectionGenerator::createObject | ( | ) | [private] |
Definition at line 26 of file SiStripBackPlaneCorrectionGenerator.cc.
References SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >::_pset, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), SiStripDetId::moduleGeometry(), SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >::obj_, SiStripBackPlaneCorrection::putBackPlaneCorrection(), matplotRender::reader, and relativeConstraints::value.
Referenced by getObj().
{ obj_ = new SiStripBackPlaneCorrection(); edm::FileInPath fp_ = _pset.getParameter<edm::FileInPath>("file"); std::vector<double> valuePerModuleGeometry(_pset.getParameter<std::vector<double> >("BackPlaneCorrection_PerModuleGeometry")); SiStripDetInfoFileReader reader(fp_.fullPath()); const std::vector<uint32_t> DetIds = reader.getAllDetIds(); for(std::vector<uint32_t>::const_iterator detit=DetIds.begin(); detit!=DetIds.end(); detit++){ SiStripDetId SSdetId(*detit); unsigned int moduleGeometry = (SSdetId.moduleGeometry()-1); if(moduleGeometry>valuePerModuleGeometry.size())edm::LogError("SiStripBackPlaneCorrectionGenerator")<<" BackPlaneCorrection_PerModuleGeometry only contains "<< valuePerModuleGeometry.size() << "elements and module is out of range"<<std::endl; float value = valuePerModuleGeometry[moduleGeometry]; if (!obj_->putBackPlaneCorrection(*detit, value) ) { edm::LogError("SiStripBackPlaneCorrectionGenerator")<<" detid already exists"<<std::endl; } } }
void SiStripBackPlaneCorrectionGenerator::getObj | ( | SiStripBackPlaneCorrection *& | obj | ) | [inline, virtual] |
Returns the CondObj
Reimplemented from SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >.
Definition at line 22 of file SiStripBackPlaneCorrectionGenerator.h.
References createObject(), and SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >::obj_.
{createObject(); obj=obj_;}