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 // -----------------------------------------------------------------------------
37 
38 // -----------------------------------------------------------------------------
41  const edm::EventSetup& setup ) {
42 
43  // Retrieve unpacking tool from event
44  edm::Handle< LazyGetter > lazygetter;
45  event.getByLabel(inputModuleLabel_,lazygetter);
46 
47  // Construct default RefGetter object
48  std::auto_ptr<RefGetter> refgetter(new RefGetter());
49 
50  //retreive the measurement tracker.
53 
54  //cast it to the proper type
55  const OnDemandMeasurementTracker * tOD = dynamic_cast<const OnDemandMeasurementTracker *>(mtESH.product());
56 
57  if (!tOD){
58  edm::LogError("MeasurementTrackerSiStripRefGetterProducer")<<"casting of MeasurementTracker named: "<<measurementTrackerName_<<" into OnDemandMeasurementTracker does not work.";
59  }
60  else{
61  //define the regions for each individual module
62  tOD->define(lazygetter, refgetter);
63  }
64 
65  // Add to event
66  event.put(refgetter);
67 }
68 
virtual void endRun(edm::Run &, const edm::EventSetup &)
virtual void produce(edm::Event &, const edm::EventSetup &)
virtual void beginRun(edm::Run &, const edm::EventSetup &)
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
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:33
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...