CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cms::SiPixelRecHitConverter Class Reference

#include <SiPixelRecHitConverter.h>

Inheritance diagram for cms::SiPixelRecHitConverter:
edm::stream::EDProducer<>

Public Member Functions

void produce (edm::Event &e, const edm::EventSetup &c) override
 The "Event" entrypoint: gets called by framework for every event. More...
 
void run (const edmNew::DetSetVector< SiPixelCluster > &input, SiPixelRecHitCollectionNew &output, edm::ESHandle< TrackerGeometry > &geom)
 
void run (edm::Handle< edmNew::DetSetVector< SiPixelCluster >> inputhandle, SiPixelRecHitCollectionNew &output, edm::ESHandle< TrackerGeometry > &geom)
 
 SiPixelRecHitConverter (const edm::ParameterSet &conf)
 Constructor: set the ParameterSet and defer all thinking to setupCPE(). More...
 
 ~SiPixelRecHitConverter () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

edm::ParameterSet conf_
 
PixelCPEBase const * cpe_ = 0
 const PixelClusterParameterEstimator * cpe_; // what we got (for now, one ptr to base class) More...
 
std::string cpeName_ = "None"
 
bool m_newCont
 
edm::InputTag src_
 
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > tPixelCluster
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 61 of file SiPixelRecHitConverter.h.

Constructor & Destructor Documentation

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

Constructor: set the ParameterSet and defer all thinking to setupCPE().

Definition at line 40 of file SiPixelRecHitConverter.cc.

41  : conf_(conf),
42  src_(conf.getParameter<edm::InputTag>("src")),
44  //--- Declare to the EDM what kind of collections we will be making.
45  produces<SiPixelRecHitCollection>();
46  }
T getParameter(std::string const &) const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > tPixelCluster
SiPixelRecHitConverter::~SiPixelRecHitConverter ( )
override

Definition at line 49 of file SiPixelRecHitConverter.cc.

49 {}

Member Function Documentation

void SiPixelRecHitConverter::produce ( edm::Event e,
const edm::EventSetup c 
)
override

The "Event" entrypoint: gets called by framework for every event.

Definition at line 54 of file SiPixelRecHitConverter.cc.

References edmNew::DetSetVector< T >::begin(), conf_, cpe_, cpeName_, edmNew::DetSetVector< T >::end(), relativeConstraints::geom, edm::EventSetup::get(), edm::Event::getByToken(), edm::ParameterSet::getParameter(), PixelCPEBase::getParameters(), TrackerGeometry::idToDetUnit(), input, edmNew::makeRefTo(), eostools::move(), convertSQLitetoXML_cfg::output, edmNew::DetSetVector< T >::FastFiller::push_back(), edm::Event::put(), run(), AlCaHLTBitMon_QueryRunRegistry::string, and tPixelCluster.

54  {
55  // Step A.1: get input data
57  e.getByToken(tPixelCluster, input);
58 
59  // Step A.2: get event setup
61  es.get<TrackerDigiGeometryRecord>().get(geom);
62 
63  // Step B: create empty output collection
64  auto output = std::make_unique<SiPixelRecHitCollectionNew>();
65 
66  // Step B*: create CPE
69  es.get<TkPixelCPERecord>().get(cpeName_, hCPE);
70  cpe_ = dynamic_cast<const PixelCPEBase*>(&(*hCPE));
71 
72  // Step C: Iterate over DetIds and invoke the strip CPE algorithm
73  // on each DetUnit
74 
75  run(input, *output, geom);
76 
77  output->shrink_to_fit();
78  e.put(std::move(output));
79  }
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void run(const edmNew::DetSetVector< SiPixelCluster > &input, SiPixelRecHitCollectionNew &output, edm::ESHandle< TrackerGeometry > &geom)
static std::string const input
Definition: EdmProvDump.cc:48
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > tPixelCluster
PixelCPEBase const * cpe_
const PixelClusterParameterEstimator * cpe_; // what we got (for now, one ptr to base class) ...
def move(src, dest)
Definition: eostools.py:511
void cms::SiPixelRecHitConverter::run ( const edmNew::DetSetVector< SiPixelCluster > &  input,
SiPixelRecHitCollectionNew output,
edm::ESHandle< TrackerGeometry > &  geom 
)

Referenced by produce().

void cms::SiPixelRecHitConverter::run ( edm::Handle< edmNew::DetSetVector< SiPixelCluster >>  inputhandle,
SiPixelRecHitCollectionNew output,
edm::ESHandle< TrackerGeometry > &  geom 
)

Member Data Documentation

edm::ParameterSet cms::SiPixelRecHitConverter::conf_
private

Definition at line 89 of file SiPixelRecHitConverter.h.

Referenced by produce().

PixelCPEBase const* cms::SiPixelRecHitConverter::cpe_ = 0
private

const PixelClusterParameterEstimator * cpe_; // what we got (for now, one ptr to base class)

Definition at line 93 of file SiPixelRecHitConverter.h.

Referenced by produce().

std::string cms::SiPixelRecHitConverter::cpeName_ = "None"
private

Definition at line 91 of file SiPixelRecHitConverter.h.

Referenced by produce().

bool cms::SiPixelRecHitConverter::m_newCont
private

Definition at line 96 of file SiPixelRecHitConverter.h.

edm::InputTag cms::SiPixelRecHitConverter::src_
private

Definition at line 94 of file SiPixelRecHitConverter.h.

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > cms::SiPixelRecHitConverter::tPixelCluster
private

Definition at line 95 of file SiPixelRecHitConverter.h.

Referenced by produce().