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
MeasurementTrackerESProducer Class Reference

#include <MeasurementTrackerESProducer.h>

Inheritance diagram for MeasurementTrackerESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 MeasurementTrackerESProducer (const edm::ParameterSet &p)
 
boost::shared_ptr
< MeasurementTracker
produce (const CkfComponentsRecord &)
 
virtual ~MeasurementTrackerESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Private Attributes

boost::shared_ptr
< MeasurementTracker
_measurementTracker
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 10 of file MeasurementTrackerESProducer.h.

Constructor & Destructor Documentation

MeasurementTrackerESProducer::MeasurementTrackerESProducer ( const edm::ParameterSet p)

Definition at line 36 of file MeasurementTrackerESProducer.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_ParallelJobs::p.

37 {
38  std::string myname = p.getParameter<std::string>("ComponentName");
39  pset_ = p;
40  setWhatProduced(this,myname);
41 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
MeasurementTrackerESProducer::~MeasurementTrackerESProducer ( )
virtual

Definition at line 43 of file MeasurementTrackerESProducer.cc.

43 {}

Member Function Documentation

boost::shared_ptr< MeasurementTracker > MeasurementTrackerESProducer::produce ( const CkfComponentsRecord iRecord)

Definition at line 46 of file MeasurementTrackerESProducer.cc.

References MeasurementTracker::BadAPVFibers, MeasurementTracker::BadModules, MeasurementTracker::BadROCs, MeasurementTracker::BadStrips, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), MeasurementTracker::MaskBad128StripBlocks, OnDemandMeasurementTrackerESProducer_cfi::OnDemandMeasurementTracker, and edm::ESHandle< class >::product().

47 {
48  std::string pixelCPEName = pset_.getParameter<std::string>("PixelCPE");
49  std::string stripCPEName = pset_.getParameter<std::string>("StripCPE");
50  std::string matcherName = pset_.getParameter<std::string>("HitMatcher");
51  bool regional = pset_.getParameter<bool>("Regional");
52 
53  bool onDemand = pset_.getParameter<bool>("OnDemand");
54 
55  // ========= SiPixelQuality related tasks =============
56  const SiPixelQuality *ptr_pixelQuality = 0;
57  const SiPixelFedCabling *ptr_pixelCabling = 0;
58  int pixelQualityFlags = 0;
59  int pixelQualityDebugFlags = 0;
60  edm::ESHandle<SiPixelQuality> pixelQuality;
62 
63  if (pset_.getParameter<bool>("UsePixelModuleQualityDB")) {
64  pixelQualityFlags += MeasurementTracker::BadModules;
65  if (pset_.getUntrackedParameter<bool>("DebugPixelModuleQualityDB", false)) {
66  pixelQualityDebugFlags += MeasurementTracker::BadModules;
67  }
68  }
69  if (pset_.getParameter<bool>("UsePixelROCQualityDB")) {
70  pixelQualityFlags += MeasurementTracker::BadROCs;
71  if (pset_.getUntrackedParameter<bool>("DebugPixelROCQualityDB", false)) {
72  pixelQualityDebugFlags += MeasurementTracker::BadROCs;
73  }
74  }
75 
76 
77  if (pixelQualityFlags != 0) {
78  iRecord.getRecord<SiPixelQualityRcd>().get(pixelQuality);
79  ptr_pixelQuality = pixelQuality.product();
80  iRecord.getRecord<SiPixelFedCablingMapRcd>().get(pixelCabling);
81  ptr_pixelCabling = pixelCabling.product();
82  }
83 
84  // ========= SiStripQuality related tasks =============
85  const SiStripQuality *ptr_stripQuality = 0;
86  int stripQualityFlags = 0;
87  int stripQualityDebugFlags = 0;
88  edm::ESHandle<SiStripQuality> stripQuality;
89 
90  if (pset_.getParameter<bool>("UseStripModuleQualityDB")) {
91  stripQualityFlags += MeasurementTracker::BadModules;
92  if (pset_.getUntrackedParameter<bool>("DebugStripModuleQualityDB", false)) {
93  stripQualityDebugFlags += MeasurementTracker::BadModules;
94  }
95  }
96  if (pset_.getParameter<bool>("UseStripAPVFiberQualityDB")) {
97  stripQualityFlags += MeasurementTracker::BadAPVFibers;
98  if (pset_.getUntrackedParameter<bool>("DebugStripAPVFiberQualityDB", false)) {
99  stripQualityDebugFlags += MeasurementTracker::BadAPVFibers;
100  }
101  if (pset_.existsAs<bool>("MaskBadAPVFibers") && pset_.getParameter<bool>("MaskBadAPVFibers")) {
102  stripQualityFlags += MeasurementTracker::MaskBad128StripBlocks;
103  }
104  }
105  if (pset_.getParameter<bool>("UseStripStripQualityDB")) {
106  stripQualityFlags += MeasurementTracker::BadStrips;
107  if (pset_.getUntrackedParameter<bool>("DebugStripStripQualityDB", false)) {
108  stripQualityDebugFlags += MeasurementTracker::BadStrips;
109  }
110  }
111 
112  if (stripQualityFlags != 0) {
113  std::string siStripQualityLabel = pset_.getParameter<std::string>("SiStripQualityLabel");
114  iRecord.getRecord<SiStripQualityRcd>().get(siStripQualityLabel, stripQuality);
115  ptr_stripQuality = stripQuality.product();
116  }
117 
121  edm::ESHandle<TrackerGeometry> trackerGeom;
122  edm::ESHandle<GeometricSearchTracker> geometricSearchTracker;
123 
124 
125  iRecord.getRecord<TkPixelCPERecord>().get(pixelCPEName,pixelCPE);
126  iRecord.getRecord<TkStripCPERecord>().get(stripCPEName,stripCPE);
127  iRecord.getRecord<TkStripCPERecord>().get(matcherName,hitMatcher);
128  iRecord.getRecord<TrackerDigiGeometryRecord>().get(trackerGeom);
129  iRecord.getRecord<TrackerRecoGeometryRecord>().get(geometricSearchTracker);
130 
131  if (!onDemand){
132  _measurementTracker = boost::shared_ptr<MeasurementTracker>(new MeasurementTrackerImpl(pset_,
133  pixelCPE.product(),
134  stripCPE.product(),
135  hitMatcher.product(),
136  trackerGeom.product(),
137  geometricSearchTracker.product(),
138  ptr_stripQuality,
139  stripQualityFlags,
140  stripQualityDebugFlags,
141  ptr_pixelQuality,
142  ptr_pixelCabling,
143  pixelQualityFlags,
144  pixelQualityDebugFlags,
145  regional) );
146  }
147  else{
148  const SiStripRegionCabling * ptr_stripRegionCabling =0;
149  //get regional cabling
151  iRecord.getRecord<SiStripRegionCablingRcd>().get(rcabling);
152  ptr_stripRegionCabling = rcabling.product();
153 
154  _measurementTracker = boost::shared_ptr<MeasurementTracker>( new OnDemandMeasurementTracker(pset_,
155  pixelCPE.product(),
156  stripCPE.product(),
157  hitMatcher.product(),
158  trackerGeom.product(),
159  geometricSearchTracker.product(),
160  ptr_stripQuality,
161  stripQualityFlags,
162  stripQualityDebugFlags,
163  ptr_pixelQuality,
164  ptr_pixelCabling,
165  pixelQualityFlags,
166  pixelQualityDebugFlags,
167  ptr_stripRegionCabling,
168  regional) );
169 
170  }
171  return _measurementTracker;
172 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:187
boost::shared_ptr< MeasurementTracker > _measurementTracker
T const * product() const
Definition: ESHandle.h:62

Member Data Documentation

boost::shared_ptr<MeasurementTracker> MeasurementTrackerESProducer::_measurementTracker
private

Definition at line 16 of file MeasurementTrackerESProducer.h.

edm::ParameterSet MeasurementTrackerESProducer::pset_
private

Definition at line 17 of file MeasurementTrackerESProducer.h.