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

#include <RoadSearchCloudMaker.h>

Inheritance diagram for RoadSearchCloudMaker:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
 RoadSearchCloudMaker (const edm::ParameterSet &conf)
 
virtual ~RoadSearchCloudMaker ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::ParameterSet conf_
 
edm::InputTag matchedStripRecHitsInputTag_
 
edm::InputTag pixelRecHitsInputTag_
 
RoadSearchCloudMakerAlgorithm roadSearchCloudMakerAlgorithm_
 
edm::InputTag rphiStripRecHitsInputTag_
 
edm::InputTag seedProducer_
 
edm::InputTag stereoStripRecHitsInputTag_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 30 of file RoadSearchCloudMaker.h.

Constructor & Destructor Documentation

RoadSearchCloudMaker::RoadSearchCloudMaker ( const edm::ParameterSet conf)
explicit

Definition at line 30 of file RoadSearchCloudMaker.cc.

References conf_, edm::ParameterSet::getParameter(), matchedStripRecHitsInputTag_, pixelRecHitsInputTag_, rphiStripRecHitsInputTag_, seedProducer_, and stereoStripRecHitsInputTag_.

30  :
32  conf_(conf)
33 {
34  produces<RoadSearchCloudCollection>();
35 
36  // retrieve InputTags for rechits
41 
42  // retrieve InputTags of input SeedCollection
43  seedProducer_ = conf_.getParameter<edm::InputTag>("SeedProducer");
44 
45 }
T getParameter(std::string const &) const
RoadSearchCloudMakerAlgorithm roadSearchCloudMakerAlgorithm_
edm::ParameterSet conf_
edm::InputTag matchedStripRecHitsInputTag_
edm::InputTag pixelRecHitsInputTag_
edm::InputTag rphiStripRecHitsInputTag_
edm::InputTag stereoStripRecHitsInputTag_
RoadSearchCloudMaker::~RoadSearchCloudMaker ( )
virtual

Definition at line 49 of file RoadSearchCloudMaker.cc.

49 { }

Member Function Documentation

void RoadSearchCloudMaker::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 52 of file RoadSearchCloudMaker.cc.

References edm::Event::getByLabel(), LogDebug, matchedStripRecHitsInputTag_, convertSQLitetoXML_cfg::output, pixelRecHitsInputTag_, edm::Handle< T >::product(), edm::Event::put(), roadSearchCloudMakerAlgorithm_, rphiStripRecHitsInputTag_, RoadSearchCloudMakerAlgorithm::run(), seedProducer_, and stereoStripRecHitsInputTag_.

53 {
54 
55  // Step A: Get Inputs
57  e.getByLabel(seedProducer_, seedHandle);
58 
59  // get Inputs
61  e.getByLabel(rphiStripRecHitsInputTag_ ,rphirecHitHandle);
62  const SiStripRecHit2DCollection *rphiRecHitCollection = rphirecHitHandle.product();
63  edm::Handle<SiStripRecHit2DCollection> stereorecHitHandle;
64  e.getByLabel(stereoStripRecHitsInputTag_ ,stereorecHitHandle);
65  const SiStripRecHit2DCollection *stereoRecHitCollection = stereorecHitHandle.product();
66 
67  // special treatment for getting matched RecHit collection
68  // if collection exists in file, use collection from file
69  // if collection does not exist in file, create empty collection
70  static const SiStripMatchedRecHit2DCollection s_empty0;
71  const SiStripMatchedRecHit2DCollection *matchedRecHitCollection = &s_empty0;
73  if( e.getByLabel(matchedStripRecHitsInputTag_, matchedRecHits)) {
74  matchedRecHitCollection = matchedRecHits.product();
75  } else {
76  LogDebug("RoadSearch") << "Collection SiStripMatchedRecHit2DCollection with InputTag " << matchedStripRecHitsInputTag_ << " cannot be found, using empty collection of same type. The RoadSearch algorithm is also fully functional without matched RecHits.";
77  }
78 
79  // special treatment for getting pixel collection
80  // if collection exists in file, use collection from file
81  // if collection does not exist in file, create empty collection
82  static const SiPixelRecHitCollection s_empty1;
83  const SiPixelRecHitCollection *pixelRecHitCollection = &s_empty1;
85  if( e.getByLabel(pixelRecHitsInputTag_, pixelRecHits)) {
86  pixelRecHitCollection = pixelRecHits.product();
87  } else {
88  LogDebug("RoadSearch") << "Collection SiPixelRecHitCollection with InputTag " << pixelRecHitsInputTag_ << " cannot be found, using empty collection of same type. The RoadSearch algorithm is also fully functional without Pixel RecHits.";
89  }
90 
91 
92  // Step B: create empty output collection
93  std::auto_ptr<RoadSearchCloudCollection> output(new RoadSearchCloudCollection);
94 
95  // Step C: Invoke the seed finding algorithm
97  rphiRecHitCollection,
98  stereoRecHitCollection,
99  matchedRecHitCollection,
100  pixelRecHitCollection,
101  es,
102  *output);
103 
104  // Step D: write output to file
105  e.put(output);
106 
107 }
#define LogDebug(id)
RoadSearchCloudMakerAlgorithm roadSearchCloudMakerAlgorithm_
void run(edm::Handle< RoadSearchSeedCollection > input, const SiStripRecHit2DCollection *rphiRecHits, const SiStripRecHit2DCollection *stereoRecHits, const SiStripMatchedRecHit2DCollection *matchedRecHits, const SiPixelRecHitCollection *pixRecHits, const edm::EventSetup &es, RoadSearchCloudCollection &output)
Runs the algorithm.
edm::InputTag matchedStripRecHitsInputTag_
edm::InputTag pixelRecHitsInputTag_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
edm::InputTag rphiStripRecHitsInputTag_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
T const * product() const
Definition: Handle.h:74
edm::InputTag stereoStripRecHitsInputTag_
std::vector< RoadSearchCloud > RoadSearchCloudCollection

Member Data Documentation

edm::ParameterSet RoadSearchCloudMaker::conf_
private

Definition at line 42 of file RoadSearchCloudMaker.h.

Referenced by RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::matchedStripRecHitsInputTag_
private

Definition at line 44 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::pixelRecHitsInputTag_
private

Definition at line 47 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

RoadSearchCloudMakerAlgorithm RoadSearchCloudMaker::roadSearchCloudMakerAlgorithm_
private

Definition at line 41 of file RoadSearchCloudMaker.h.

Referenced by produce().

edm::InputTag RoadSearchCloudMaker::rphiStripRecHitsInputTag_
private

Definition at line 45 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::seedProducer_
private

Definition at line 43 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::stereoStripRecHitsInputTag_
private

Definition at line 46 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().