CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeasurementTrackerSiStripRefGetterProducer.cc
Go to the documentation of this file.
2 
5 
7 
8 //measurement tracker
11 
12 
13 using namespace std;
14 //using namespace sistrip;
15 
16 // -----------------------------------------------------------------------------
17 //
19  inputModuleLabel_(conf.getParameter<edm::InputTag>("InputModuleLabel")),
20  cabling_(),
21  measurementTrackerName_(conf.getParameter<string>("measurementTrackerName"))
22 {
23  produces< RefGetter >();
24 }
25 
26 // -----------------------------------------------------------------------------
28 
29 // -----------------------------------------------------------------------------
31  //get cabling
32  setup.get<SiStripRegionCablingRcd>().get(cabling_);
33 }
34 
35 // -----------------------------------------------------------------------------
38  const edm::EventSetup& setup ) {
39 
40  // Retrieve unpacking tool from event
41  edm::Handle< LazyGetter > lazygetter;
42  event.getByLabel(inputModuleLabel_,lazygetter);
43 
44  // Construct default RefGetter object
45  std::auto_ptr<RefGetter> refgetter(new RefGetter());
46 
47  //retreive the measurement tracker.
50 
51  //cast it to the proper type
52  const OnDemandMeasurementTracker * tOD = dynamic_cast<const OnDemandMeasurementTracker *>(mtESH.product());
53 
54  if (!tOD){
55  edm::LogError("MeasurementTrackerSiStripRefGetterProducer")<<"casting of MeasurementTracker named: "<<measurementTrackerName_<<" into OnDemandMeasurementTracker does not work.";
56  }
57  else{
58  //define the regions for each individual module
59  tOD->define(lazygetter, refgetter);
60  }
61 
62  // Add to event
63  event.put(refgetter);
64 }
65 
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag inputModuleLabel_
Input module label of SiStripLazyGetter.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
tuple conf
Definition: dbtoconf.py:185
edm::ESHandle< SiStripRegionCabling > cabling_
Cabling.
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
std::string measurementTrackerName_
name of the defined Measurement Tracker On Demand
virtual void beginRun(edm::Run const &, const edm::EventSetup &) override
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:36
void define(const edm::Handle< edm::LazyGetter< SiStripCluster > > &, std::auto_ptr< RefGetter > &) const
OnDemandMeasurementTracker specific function to be called to define the region in the RefGetter accor...