test
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

SiStripThresholdcreateObject ()
 

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

SiStripThreshold * SiStripThresholdGenerator::createObject ( )
private

Definition at line 19 of file SiStripThresholdGenerator.cc.

References SiStripCondObjBuilderBase< SiStripThreshold >::_pset, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), LogDebug, getGTfromDQMFile::obj, SiStripThreshold::printDebug(), SiStripThreshold::put(), matplotRender::reader, SiStripThreshold::setData(), and contentValuesCheck::ss.

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

19  {
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:184
void SiStripThresholdGenerator::getObj ( SiStripThreshold *&  obj)
inlinevirtual

Returns the CondObj

Reimplemented from SiStripCondObjBuilderBase< SiStripThreshold >.

Definition at line 16 of file SiStripThresholdGenerator.h.

References createObject().

16 {obj=createObject();}