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

#include <SiStripRecHitConverter.h>

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

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 
 SiStripRecHitConverter (const edm::ParameterSet &)
 
- 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::InputTag clusterProducer
 
edm::InputTag lazyGetterProducer
 
std::string matchedRecHitsTag
 
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm
 
bool regional
 
std::string rphiRecHitsTag
 
std::string stereoRecHitsTag
 

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)
 
- 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 8 of file SiStripRecHitConverter.h.

Constructor & Destructor Documentation

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

Definition at line 4 of file SiStripRecHitConverter.cc.

References matchedRecHitsTag, rphiRecHitsTag, and stereoRecHitsTag.

6  matchedRecHitsTag( conf.getParameter<std::string>( "matchedRecHits" ) ),
7  rphiRecHitsTag( conf.getParameter<std::string>( "rphiRecHits" ) ),
8  stereoRecHitsTag( conf.getParameter<std::string>( "stereoRecHits" ) ),
9  clusterProducer(conf.getParameter<edm::InputTag>("ClusterProducer")),
10  lazyGetterProducer(conf.getParameter<edm::InputTag>("LazyGetterProducer")),
11  regional(conf.getParameter<bool>("Regional"))
12 {
13  produces<SiStripMatchedRecHit2DCollection>( matchedRecHitsTag );
14  produces<SiStripRecHit2DCollection>( rphiRecHitsTag );
15  produces<SiStripRecHit2DCollection>( stereoRecHitsTag );
16  produces<SiStripRecHit2DCollection>( rphiRecHitsTag + "Unmatched" );
17  produces<SiStripRecHit2DCollection>( stereoRecHitsTag + "Unmatched" );
18 }
T getParameter(std::string const &) const
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm

Member Function Documentation

void SiStripRecHitConverter::produce ( edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 21 of file SiStripRecHitConverter.cc.

References clusterProducer, edm::Event::getByLabel(), SiStripRecHitConverterAlgorithm::initialize(), lazyGetterProducer, LogDebug, SiStripRecHitConverterAlgorithm::products::matched, matchedRecHitsTag, convertSQLitetoXML_cfg::output, edm::Event::put(), recHitConverterAlgorithm, regional, SiStripRecHitConverterAlgorithm::products::rphi, rphiRecHitsTag, SiStripRecHitConverterAlgorithm::products::rphiUnmatched, SiStripRecHitConverterAlgorithm::run(), SiStripRecHitConverterAlgorithm::products::stereo, stereoRecHitsTag, and SiStripRecHitConverterAlgorithm::products::stereoUnmatched.

22 {
26 
27  if (regional){
28  e.getByLabel(clusterProducer, refclusters);
29  e.getByLabel(lazyGetterProducer, lazygetter);
30  } else e.getByLabel(clusterProducer, clusters);
31 
34 
35  if (regional) recHitConverterAlgorithm.run(refclusters,lazygetter,output);
36  else recHitConverterAlgorithm.run(clusters, output);
37 
38  LogDebug("SiStripRecHitConverter") << "found\n"
39  << output.rphi->dataSize() << " clusters in mono detectors\n"
40  << output.stereo->dataSize() << " clusters in partners stereo detectors\n";
41 
42  e.put( output.matched, matchedRecHitsTag );
43  e.put( output.rphi, rphiRecHitsTag );
44  e.put( output.stereo, stereoRecHitsTag );
45  e.put( output.rphiUnmatched, rphiRecHitsTag + "Unmatched" );
46  e.put( output.stereoUnmatched, stereoRecHitsTag + "Unmatched" );
47 
48 }
#define LogDebug(id)
void run(edm::Handle< edmNew::DetSetVector< SiStripCluster > > input, products &output)
std::auto_ptr< SiStripRecHit2DCollection > rphiUnmatched
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
std::auto_ptr< SiStripRecHit2DCollection > stereoUnmatched
std::auto_ptr< SiStripRecHit2DCollection > rphi
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
std::auto_ptr< SiStripMatchedRecHit2DCollection > matched
std::auto_ptr< SiStripRecHit2DCollection > stereo
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm

Member Data Documentation

edm::InputTag SiStripRecHitConverter::clusterProducer
private

Definition at line 20 of file SiStripRecHitConverter.h.

Referenced by produce().

edm::InputTag SiStripRecHitConverter::lazyGetterProducer
private

Definition at line 20 of file SiStripRecHitConverter.h.

Referenced by produce().

std::string SiStripRecHitConverter::matchedRecHitsTag
private

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

SiStripRecHitConverterAlgorithm SiStripRecHitConverter::recHitConverterAlgorithm
private

Definition at line 18 of file SiStripRecHitConverter.h.

Referenced by produce().

bool SiStripRecHitConverter::regional
private

Definition at line 21 of file SiStripRecHitConverter.h.

Referenced by produce().

std::string SiStripRecHitConverter::rphiRecHitsTag
private

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

std::string SiStripRecHitConverter::stereoRecHitsTag
private

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().