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(), AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

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::hlt::Exception, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), MeasurementTracker::MaskBad128StripBlocks, OnDemandMeasurementTrackerESProducer_cfi::OnDemandMeasurementTracker, edm::ESHandle< class >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

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  if (onDemand != regional) throw cms::Exception("Configuration") << "Currently OnDemand and Regional must have the same values.\n";
56 
57  // ========= SiPixelQuality related tasks =============
58  const SiPixelQuality *ptr_pixelQuality = 0;
59  const SiPixelFedCabling *ptr_pixelCabling = 0;
60  int pixelQualityFlags = 0;
61  int pixelQualityDebugFlags = 0;
62  edm::ESHandle<SiPixelQuality> pixelQuality;
64 
65  if (pset_.getParameter<bool>("UsePixelModuleQualityDB")) {
66  pixelQualityFlags += MeasurementTracker::BadModules;
67  if (pset_.getUntrackedParameter<bool>("DebugPixelModuleQualityDB", false)) {
68  pixelQualityDebugFlags += MeasurementTracker::BadModules;
69  }
70  }
71  if (pset_.getParameter<bool>("UsePixelROCQualityDB")) {
72  pixelQualityFlags += MeasurementTracker::BadROCs;
73  if (pset_.getUntrackedParameter<bool>("DebugPixelROCQualityDB", false)) {
74  pixelQualityDebugFlags += MeasurementTracker::BadROCs;
75  }
76  }
77 
78 
79  if (pixelQualityFlags != 0) {
80  iRecord.getRecord<SiPixelQualityRcd>().get(pixelQuality);
81  ptr_pixelQuality = pixelQuality.product();
82  iRecord.getRecord<SiPixelFedCablingMapRcd>().get(pixelCabling);
83  ptr_pixelCabling = pixelCabling.product();
84  }
85 
86  // ========= SiStripQuality related tasks =============
87  const SiStripQuality *ptr_stripQuality = 0;
88  int stripQualityFlags = 0;
89  int stripQualityDebugFlags = 0;
90  edm::ESHandle<SiStripQuality> stripQuality;
91 
92  if (pset_.getParameter<bool>("UseStripModuleQualityDB")) {
93  stripQualityFlags += MeasurementTracker::BadModules;
94  if (pset_.getUntrackedParameter<bool>("DebugStripModuleQualityDB", false)) {
95  stripQualityDebugFlags += MeasurementTracker::BadModules;
96  }
97  }
98  if (pset_.getParameter<bool>("UseStripAPVFiberQualityDB")) {
99  stripQualityFlags += MeasurementTracker::BadAPVFibers;
100  if (pset_.getUntrackedParameter<bool>("DebugStripAPVFiberQualityDB", false)) {
101  stripQualityDebugFlags += MeasurementTracker::BadAPVFibers;
102  }
103  if (pset_.existsAs<bool>("MaskBadAPVFibers") && pset_.getParameter<bool>("MaskBadAPVFibers")) {
104  stripQualityFlags += MeasurementTracker::MaskBad128StripBlocks;
105  }
106  }
107  if (pset_.getParameter<bool>("UseStripStripQualityDB")) {
108  stripQualityFlags += MeasurementTracker::BadStrips;
109  if (pset_.getUntrackedParameter<bool>("DebugStripStripQualityDB", false)) {
110  stripQualityDebugFlags += MeasurementTracker::BadStrips;
111  }
112  }
113 
114  if (stripQualityFlags != 0) {
115  std::string siStripQualityLabel = pset_.getParameter<std::string>("SiStripQualityLabel");
116  iRecord.getRecord<SiStripQualityRcd>().get(siStripQualityLabel, stripQuality);
117  ptr_stripQuality = stripQuality.product();
118  }
119 
123  edm::ESHandle<TrackerGeometry> trackerGeom;
124  edm::ESHandle<GeometricSearchTracker> geometricSearchTracker;
125 
126 
127  iRecord.getRecord<TkPixelCPERecord>().get(pixelCPEName,pixelCPE);
128  iRecord.getRecord<TkStripCPERecord>().get(stripCPEName,stripCPE);
129  iRecord.getRecord<TkStripCPERecord>().get(matcherName,hitMatcher);
130  iRecord.getRecord<TrackerDigiGeometryRecord>().get(trackerGeom);
131  iRecord.getRecord<TrackerRecoGeometryRecord>().get(geometricSearchTracker);
132 
133  if (!onDemand){
134  _measurementTracker = boost::shared_ptr<MeasurementTracker>(new MeasurementTrackerImpl(pset_,
135  pixelCPE.product(),
136  stripCPE.product(),
137  hitMatcher.product(),
138  trackerGeom.product(),
139  geometricSearchTracker.product(),
140  ptr_stripQuality,
141  stripQualityFlags,
142  stripQualityDebugFlags,
143  ptr_pixelQuality,
144  ptr_pixelCabling,
145  pixelQualityFlags,
146  pixelQualityDebugFlags,
147  regional) );
148  }
149  else{
150  const SiStripRegionCabling * ptr_stripRegionCabling =0;
151  //get regional cabling
153  iRecord.getRecord<SiStripRegionCablingRcd>().get(rcabling);
154  ptr_stripRegionCabling = rcabling.product();
155 
156  _measurementTracker = boost::shared_ptr<MeasurementTracker>( new OnDemandMeasurementTracker(pset_,
157  pixelCPE.product(),
158  stripCPE.product(),
159  hitMatcher.product(),
160  trackerGeom.product(),
161  geometricSearchTracker.product(),
162  ptr_stripQuality,
163  stripQualityFlags,
164  stripQualityDebugFlags,
165  ptr_pixelQuality,
166  ptr_pixelCabling,
167  pixelQualityFlags,
168  pixelQualityDebugFlags,
169  ptr_stripRegionCabling,
170  regional) );
171 
172  }
173  return _measurementTracker;
174 }
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:184
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.