CMS 3D CMS Logo

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

#include <SiStripBadFiberBuilder.h>

Inheritance diagram for SiStripBadFiberBuilder:
ConditionDBWriter< SiStripBadStrip > edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 SiStripBadFiberBuilder (const edm::ParameterSet &)
 
 ~SiStripBadFiberBuilder () override
 
- Public Member Functions inherited from ConditionDBWriter< SiStripBadStrip >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef std::vector< edm::ParameterSetParameters
 

Private Member Functions

std::unique_ptr< SiStripBadStripgetNewObject () override
 

Private Attributes

Parameters BadComponentList_
 
edm::FileInPath fp_
 
bool 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 ConditionDBWriter< SiStripBadStrip >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 16 of file SiStripBadFiberBuilder.h.

Member Typedef Documentation

Definition at line 27 of file SiStripBadFiberBuilder.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file SiStripBadFiberBuilder.cc.

References BadComponentList_, fp_, edm::ParameterSet::getUntrackedParameter(), and printdebug_.

12  "file", edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"));
13  printdebug_ = iConfig.getUntrackedParameter<bool>("printDebug", false);
14  BadComponentList_ = iConfig.getUntrackedParameter<Parameters>("BadComponentList");
15 }
T getUntrackedParameter(std::string const &, T const &) const
vector< ParameterSet > Parameters
SiStripBadFiberBuilder::~SiStripBadFiberBuilder ( )
override

Definition at line 17 of file SiStripBadFiberBuilder.cc.

17 {}

Member Function Documentation

std::unique_ptr< SiStripBadStrip > SiStripBadFiberBuilder::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripBadStrip >.

Definition at line 19 of file SiStripBadFiberBuilder.cc.

References BadComponentList_, TauDecayModes::dec, fp_, edm::FileInPath::fullPath(), getGTfromDQMFile::obj, printdebug_, FastTimerService_cff::range, DQM::reader, and contentValuesCheck::ss.

19  {
20  edm::LogInfo("SiStripBadFiberBuilder") << "... creating dummy SiStripBadStrip Data" << std::endl;
21 
22  auto obj = std::make_unique<SiStripBadStrip>();
23 
25 
26  std::stringstream ss;
27  for (Parameters::iterator iBadComponent = BadComponentList_.begin(); iBadComponent != BadComponentList_.end();
28  ++iBadComponent) {
29  uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>("BadModule");
30  std::vector<uint32_t> BadApvList_ = iBadComponent->getParameter<std::vector<uint32_t> >("BadApvList");
31 
32  std::vector<unsigned int> theSiStripVector;
33 
34  unsigned short firstBadStrip = 0, NconsecutiveBadStrips = 0;
35  unsigned int theBadStripRange;
36 
37  for (std::vector<uint32_t>::const_iterator is = BadApvList_.begin(); is != BadApvList_.end(); ++is) {
38  firstBadStrip = (*is) * 128;
39  NconsecutiveBadStrips = 128;
40 
41  theBadStripRange = obj->encode(firstBadStrip, NconsecutiveBadStrips);
42 
43  if (printdebug_)
44  ss << "detid " << BadModule_ << " \t"
45  << " firstBadStrip " << firstBadStrip << "\t "
46  << " NconsecutiveBadStrips " << NconsecutiveBadStrips << "\t "
47  << " packed integer " << std::hex << theBadStripRange << std::dec << std::endl;
48 
49  theSiStripVector.push_back(theBadStripRange);
50  }
51 
52  SiStripBadStrip::Range range(theSiStripVector.begin(), theSiStripVector.end());
53  if (!obj->put(BadModule_, range))
54  edm::LogError("SiStripBadFiberBuilder") << "[SiStripBadFiberBuilder::analyze] detid already exists" << std::endl;
55  }
56  if (printdebug_)
57  edm::LogInfo("SiStripBadFiberBuilder") << ss.str();
58 
59  return obj;
60 }
reader
Definition: DQM.py:105
std::pair< ContainerIterator, ContainerIterator > Range
std::string fullPath() const
Definition: FileInPath.cc:163

Member Data Documentation

Parameters SiStripBadFiberBuilder::BadComponentList_
private

Definition at line 28 of file SiStripBadFiberBuilder.h.

Referenced by getNewObject(), and SiStripBadFiberBuilder().

edm::FileInPath SiStripBadFiberBuilder::fp_
private

Definition at line 24 of file SiStripBadFiberBuilder.h.

Referenced by getNewObject(), and SiStripBadFiberBuilder().

bool SiStripBadFiberBuilder::printdebug_
private

Definition at line 25 of file SiStripBadFiberBuilder.h.

Referenced by getNewObject(), and SiStripBadFiberBuilder().