CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
SiStripPedestalsGenerator Class Reference

#include <SiStripPedestalsGenerator.h>

Inheritance diagram for SiStripPedestalsGenerator:
SiStripCondObjBuilderBase< SiStripPedestals >

Public Member Functions

void getObj (SiStripPedestals *&obj)
 
 SiStripPedestalsGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
 ~SiStripPedestalsGenerator ()
 
- Public Member Functions inherited from SiStripCondObjBuilderBase< SiStripPedestals >
virtual bool checkForCompatibility (std::string ss)
 
virtual void getMetaDataString (std::stringstream &ss)
 
virtual void initialize ()
 
 SiStripCondObjBuilderBase (const edm::ParameterSet &pset)
 
virtual ~SiStripCondObjBuilderBase ()
 

Private Member Functions

void createObject ()
 

Additional Inherited Members

- Protected Attributes inherited from SiStripCondObjBuilderBase< SiStripPedestals >
edm::ParameterSet _pset
 
SiStripPedestalsobj_
 

Detailed Description

Definition at line 10 of file SiStripPedestalsGenerator.h.

Constructor & Destructor Documentation

SiStripPedestalsGenerator::SiStripPedestalsGenerator ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
)
explicit

Definition at line 7 of file SiStripPedestalsGenerator.cc.

7  :
9 {
10  edm::LogInfo("SiStripPedestalsGenerator") << "[SiStripPedestalsGenerator::SiStripPedestalsGenerator]";
11 }
SiStripCondObjBuilderBase(const edm::ParameterSet &pset)
SiStripPedestalsGenerator::~SiStripPedestalsGenerator ( )

Definition at line 14 of file SiStripPedestalsGenerator.cc.

14  {
15  edm::LogInfo("SiStripPedestalsGenerator") << "[SiStripPedestalsGenerator::~SiStripPedestalsGenerator]";
16 }

Member Function Documentation

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 Vispa.Views.LineDecayView.LineDecayContainer::dropEvent(), and getObj().

19  {
20 
21  obj_ = new SiStripPedestals();
22 
23  uint32_t PedestalValue_ = _pset.getParameter<uint32_t>("PedestalsValue");
25  uint32_t printdebug_ = _pset.getUntrackedParameter<uint32_t>("printDebug", 5);
26  uint32_t count=0;
27 
28  SiStripDetInfoFileReader reader(fp_.fullPath());
29 
30  const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > DetInfos = reader.getAllData();
31 
32  for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){
33  //Generate Noises for det detid
34  SiStripPedestals::InputVector theSiStripVector;
35  for(unsigned short j=0; j<128*it->second.nApvs; j++){
36 
37  if (count<printdebug_) {
38  edm::LogInfo("SiStripPedestalsFakeESSource::makePedestals(): ") << "detid: " << it->first << " strip: " << j << " ped: " << PedestalValue_ << std::endl;
39  }
40  obj_->setData(PedestalValue_,theSiStripVector);
41  }
42  count++;
43  if ( ! obj_->put(it->first, theSiStripVector) )
44  edm::LogError("SiStripPedestalsFakeESSource::produce ")<<" detid already exists"<<std::endl;
45  }
46 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< uint16_t > InputVector
int j
Definition: DBlmapReader.cc:9
bool put(const uint32_t &detID, InputVector &input)
void setData(float ped, InputVector &vped)
void SiStripPedestalsGenerator::getObj ( SiStripPedestals *&  obj)
inlinevirtual