#include <SiStripPedestalsGenerator.h>
Public Member Functions | |
void | getObj (SiStripPedestals *&obj) |
SiStripPedestalsGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &) | |
~SiStripPedestalsGenerator () | |
Private Member Functions | |
void | createObject () |
Definition at line 10 of file SiStripPedestalsGenerator.h.
SiStripPedestalsGenerator::SiStripPedestalsGenerator | ( | const edm::ParameterSet & | iConfig, |
const edm::ActivityRegistry & | aReg | ||
) | [explicit] |
Definition at line 7 of file SiStripPedestalsGenerator.cc.
: SiStripCondObjBuilderBase<SiStripPedestals>::SiStripCondObjBuilderBase(iConfig) { edm::LogInfo("SiStripPedestalsGenerator") << "[SiStripPedestalsGenerator::SiStripPedestalsGenerator]"; }
SiStripPedestalsGenerator::~SiStripPedestalsGenerator | ( | ) |
Definition at line 14 of file SiStripPedestalsGenerator.cc.
{ edm::LogInfo("SiStripPedestalsGenerator") << "[SiStripPedestalsGenerator::~SiStripPedestalsGenerator]"; }
void SiStripPedestalsGenerator::createObject | ( | ) | [private] |
Definition at line 19 of file SiStripPedestalsGenerator.cc.
References SiStripCondObjBuilderBase< SiStripPedestals >::_pset, prof2calltree::count, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), j, SiStripCondObjBuilderBase< SiStripPedestals >::obj_, SiStripPedestals::put(), matplotRender::reader, and SiStripPedestals::setData().
Referenced by getObj().
{ obj_ = new SiStripPedestals(); uint32_t PedestalValue_ = _pset.getParameter<uint32_t>("PedestalsValue"); edm::FileInPath fp_ = _pset.getParameter<edm::FileInPath>("file"); uint32_t printdebug_ = _pset.getUntrackedParameter<uint32_t>("printDebug", 5); uint32_t count=0; SiStripDetInfoFileReader reader(fp_.fullPath()); const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > DetInfos = reader.getAllData(); for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){ //Generate Noises for det detid SiStripPedestals::InputVector theSiStripVector; for(unsigned short j=0; j<128*it->second.nApvs; j++){ if (count<printdebug_) { edm::LogInfo("SiStripPedestalsFakeESSource::makePedestals(): ") << "detid: " << it->first << " strip: " << j << " ped: " << PedestalValue_ << std::endl; } obj_->setData(PedestalValue_,theSiStripVector); } count++; if ( ! obj_->put(it->first, theSiStripVector) ) edm::LogError("SiStripPedestalsFakeESSource::produce ")<<" detid already exists"<<std::endl; } }
void SiStripPedestalsGenerator::getObj | ( | SiStripPedestals *& | obj | ) | [inline, virtual] |
Returns the CondObj
Reimplemented from SiStripCondObjBuilderBase< SiStripPedestals >.
Definition at line 16 of file SiStripPedestalsGenerator.h.
References createObject(), and SiStripCondObjBuilderBase< SiStripPedestals >::obj_.
{createObject(); obj=obj_;}