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 Attributes
SiStripThresholdReader Class Reference

#include <SiStripThresholdReader.h>

Inheritance diagram for SiStripThresholdReader:
edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
 SiStripThresholdReader (const edm::ParameterSet &)
 
 ~SiStripThresholdReader ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

uint32_t printdebug_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 25 of file SiStripThresholdReader.h.

Constructor & Destructor Documentation

SiStripThresholdReader::SiStripThresholdReader ( const edm::ParameterSet iConfig)
explicit

Definition at line 7 of file SiStripThresholdReader.cc.

7  :
8  printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug",3)){}
T getUntrackedParameter(std::string const &, T const &) const
SiStripThresholdReader::~SiStripThresholdReader ( )

Definition at line 10 of file SiStripThresholdReader.cc.

10 {}

Member Function Documentation

void SiStripThresholdReader::analyze ( const edm::Event e,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 12 of file SiStripThresholdReader.cc.

References runTheMatrix::data, cond::rpcobgas::detid, SiStripThreshold::Data::FirstStrip_and_Hth, edm::EventSetup::get(), SiStripThreshold::Data::getClusth(), SiStripThreshold::Data::getFirstStrip(), SiStripThreshold::Data::getHth(), SiStripThreshold::Data::getLth(), SiStripThreshold::Data::print(), and printdebug_.

12  {
13 
14  edm::ESHandle<SiStripThreshold> SiStripThreshold_;
15  iSetup.get<SiStripThresholdRcd>().get(SiStripThreshold_);
16  edm::LogInfo("SiStripThresholdReader") << "[SiStripThresholdReader::analyze] End Reading SiStripThreshold" << std::endl;
17 
18  std::vector<uint32_t> detid;
19  SiStripThreshold_->getDetIds(detid);
20  edm::LogInfo("Number of detids ") << detid.size() << std::endl;
21  if (printdebug_)
22  for (size_t id=0;id<detid.size() && id<printdebug_;id++)
23  {
24  SiStripThreshold::Range range=SiStripThreshold_->getRange(detid[id]);
25 
26  //int strip=0;
27  float old_clusTh=-1,old_lowTh=-1, old_highTh=-1, old_FirstStrip=-1;
28  for(int it=0;it<768;it++){
29  SiStripThreshold::Data data=SiStripThreshold_->getData(it,range);
30  std::stringstream ss;
31  data.print(ss);
32  if (old_clusTh!=data.getClusth() || old_lowTh!=data.getLth() || old_highTh!=data.getHth() || old_FirstStrip!=data.getFirstStrip()){
33  edm::LogInfo("SiStripThresholdReader") << "detid: " << detid[id] << " \t"
34  << "strip: " << it << " \t"
35  << ss.str()
36  << "FirstStrip_and_Hth: " << data.FirstStrip_and_Hth << " \n"
37  << std::endl;
38  old_lowTh=data.getLth();
39  old_highTh=data.getHth();
40  old_clusTh=data.getClusth();
41  old_FirstStrip=data.getFirstStrip();
42  }
43  }
44  }
45 }
uint16_t getFirstStrip() const
void print(std::stringstream &ss) const
std::pair< ContainerIterator, ContainerIterator > Range
const T & get() const
Definition: EventSetup.h:55
float getClusth() const

Member Data Documentation

uint32_t SiStripThresholdReader::printdebug_
private

Definition at line 34 of file SiStripThresholdReader.h.

Referenced by analyze().