CMS 3D CMS Logo

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 &) override
 
 SiStripThresholdReader (const edm::ParameterSet &)
 
 ~SiStripThresholdReader () override
 
- 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
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ( )
override

Definition at line 10 of file SiStripThresholdReader.cc.

10 {}

Member Function Documentation

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

Definition at line 12 of file SiStripThresholdReader.cc.

References data, SiStripThreshold::Data::FirstStrip_and_Hth, edm::EventSetup::get(), SiStripThreshold::Data::getClusth(), SiStripThreshold::getData(), SiStripThreshold::getDetIds(), SiStripThreshold::Data::getFirstStrip(), SiStripThreshold::Data::getHth(), SiStripThreshold::Data::getLth(), SiStripThreshold::getRange(), triggerObjects_cff::id, 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 }
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
uint16_t getFirstStrip() const
void print(std::stringstream &ss) const
std::pair< ContainerIterator, ContainerIterator > Range
void getDetIds(std::vector< uint32_t > &DetIds_) const
const T & get() const
Definition: EventSetup.h:58
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const Range getRange(const uint32_t &detID) const
float getClusth() const

Member Data Documentation

uint32_t SiStripThresholdReader::printdebug_
private

Definition at line 34 of file SiStripThresholdReader.h.

Referenced by analyze().