CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripPedestalsGenerator.cc
Go to the documentation of this file.
3 #include <boost/cstdint.hpp>
6 
9 {
10  edm::LogInfo("SiStripPedestalsGenerator") << "[SiStripPedestalsGenerator::SiStripPedestalsGenerator]";
11 }
12 
13 
15  edm::LogInfo("SiStripPedestalsGenerator") << "[SiStripPedestalsGenerator::~SiStripPedestalsGenerator]";
16 }
17 
18 
20 
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  return obj;
47 }
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)
SiStripPedestalsGenerator(const edm::ParameterSet &, const edm::ActivityRegistry &)
void setData(float ped, InputVector &vped)