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 edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
 SiStripThresholdReader (const edm::ParameterSet &)
 
 ~SiStripThresholdReader ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

uint32_t printdebug_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 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(), printdebug_, and contentValuesCheck::ss.

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:56
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float getClusth() const

Member Data Documentation

uint32_t SiStripThresholdReader::printdebug_
private

Definition at line 34 of file SiStripThresholdReader.h.

Referenced by analyze().