CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripSummaryReader Class Reference

#include <SiStripSummaryReader.h>

Inheritance diagram for SiStripSummaryReader:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
 SiStripSummaryReader (const edm::ParameterSet &)
 
 ~SiStripSummaryReader ()
 
- 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
 
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
 
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 &)
 
- 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 18 of file SiStripSummaryReader.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file SiStripSummaryReader.cc.

12  :
13  printdebug_(iConfig.getUntrackedParameter<uint32_t>("printDebug",1)){}
T getUntrackedParameter(std::string const &, T const &) const
SiStripSummaryReader::~SiStripSummaryReader ( )

Definition at line 15 of file SiStripSummaryReader.cc.

15 {}

Member Function Documentation

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

Definition at line 17 of file SiStripSummaryReader.cc.

References EnergyCorrector::c, edm::EventSetup::get(), SiStripSummary::getDetIds(), SiStripSummary::getRange(), SiStripSummary::getUserDBContent(), mps_fire::i, hcalTTPDigis_cfi::id, and printdebug_.

17  {
18 
19  edm::ESHandle<SiStripSummary> SiStripSummary_;
20  iSetup.get<SiStripSummaryRcd>().get(SiStripSummary_);
21  edm::LogInfo("SiStripSummaryReader") << "[SiStripSummaryReader::analyze] End Reading SiStripSummary" << std::endl;
22 
23  std::vector<uint32_t> detid=SiStripSummary_->getDetIds();
24 
25 
26  std::vector<std::string> userDB=SiStripSummary_->getUserDBContent();
27  std::stringstream ss;
28  for(size_t i=0;i<userDB.size();++i)
29  ss<< userDB[i] << " \n";
30 
31 
32  if (printdebug_)
33  for (size_t id=0;id<detid.size();id++)
34  {
35  ss<< "\n\tdetid " << detid[id];
36  SiStripSummary::Range range=SiStripSummary_->getRange(detid[id]);
37 
38  size_t c=0;
39  for(SiStripSummary::ContainerIterator it =range.first;it!=range.second;++it){
40  ss << "\n\t\t " << userDB[c++] << " " << *it;
41  }
42  }
43  edm::LogInfo("SiStripSummaryReader") << ss.str();
44 }
std::vector< uint32_t > getDetIds() const
const Range getRange(const uint32_t &detID) const
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< std::string > getUserDBContent() const
const T & get() const
Definition: EventSetup.h:55
std::vector< float >::const_iterator ContainerIterator

Member Data Documentation

uint32_t SiStripSummaryReader::printdebug_
private

Definition at line 27 of file SiStripSummaryReader.h.

Referenced by analyze().