CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripThresholdGenerator.cc
Go to the documentation of this file.
3 #include <boost/cstdint.hpp>
6 
9 {
10  edm::LogInfo("SiStripThresholdGenerator") << "[SiStripThresholdGenerator::SiStripThresholdGenerator]";
11 }
12 
13 
15  edm::LogInfo("SiStripThresholdGenerator") << "[SiStripThresholdGenerator::~SiStripThresholdGenerator]";
16 }
17 
18 
20 
22 
24  float lTh_ = _pset.getParameter<double>("LowTh");
25  float hTh_ = _pset.getParameter<double>("HighTh");
26  float cTh_ = _pset.getParameter<double>("ClusTh");
27 
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 Thresholds for det detid
34  SiStripThreshold::Container theSiStripVector;
35  uint16_t strip=0;
36 
37  obj->setData(strip,lTh_,hTh_,cTh_,theSiStripVector);
38  LogDebug("SiStripThresholdFakeESSource::produce") <<"detid: " << it->first << " \t"
39  << "firstStrip: " << strip << " \t" << theSiStripVector.back().getFirstStrip() << " \t"
40  << "lTh: " << lTh_ << " \t" << theSiStripVector.back().getLth() << " \t"
41  << "hTh: " << hTh_ << " \t" << theSiStripVector.back().getHth() << " \t"
42  << "FirstStrip_and_Hth: " << theSiStripVector.back().FirstStrip_and_Hth << " \t"
43  << std::endl;
44 
45  if ( ! obj->put(it->first,theSiStripVector) )
46  edm::LogError("SiStripThresholdFakeESSource::produce ")<<" detid already exists"<<std::endl;
47  }
48 
49  std::stringstream ss;
50  obj->printDebug(ss);
51  LogDebug("SiStripThresholdFakeESSource::produce") <<"printDebug\n" << ss.str() << std::endl;
52  return obj;
53 }
#define LogDebug(id)
bool put(const uint32_t &detID, const InputVector &vect)
T getParameter(std::string const &) const
std::vector< Data > Container
void printDebug(std::stringstream &ss) const
Prints all the thresholds for all DetIds.
void setData(const uint16_t &strip, const float &lTh, const float &hTh, Container &vthr)
std::string fullPath() const
Definition: FileInPath.cc:171
SiStripThresholdGenerator(const edm::ParameterSet &, const edm::ActivityRegistry &)