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
SiStripThresholdGenerator Class Reference

#include <SiStripThresholdGenerator.h>

Inheritance diagram for SiStripThresholdGenerator:
SiStripCondObjBuilderBase< SiStripThreshold >

Public Member Functions

void getObj (SiStripThreshold *&obj)
 
 SiStripThresholdGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
 ~SiStripThresholdGenerator ()
 
- Public Member Functions inherited from SiStripCondObjBuilderBase< SiStripThreshold >
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< SiStripThreshold >
edm::ParameterSet _pset
 
SiStripThresholdobj_
 

Detailed Description

Definition at line 10 of file SiStripThresholdGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file SiStripThresholdGenerator.cc.

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

Definition at line 14 of file SiStripThresholdGenerator.cc.

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

Member Function Documentation

void SiStripThresholdGenerator::createObject ( )
private

Definition at line 19 of file SiStripThresholdGenerator.cc.

References SiStripCondObjBuilderBase< SiStripThreshold >::_pset, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), LogDebug, SiStripCondObjBuilderBase< SiStripThreshold >::obj_, SiStripThreshold::printDebug(), SiStripThreshold::put(), matplotRender::reader, SiStripThreshold::setData(), and strip().

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::dropEvent(), and getObj().

19  {
20 
21  obj_ = new SiStripThreshold();
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 
53 }
#define LogDebug(id)
T getParameter(std::string const &) const
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
std::vector< Data > Container
bool put(const uint32_t &detID, InputVector vect)
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
void SiStripThresholdGenerator::getObj ( SiStripThreshold *&  obj)
inlinevirtual