CMS 3D CMS Logo

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

#include <TrackerizerFP420.h>

Inheritance diagram for cms::TrackerizerFP420:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void produce (edm::StreamID, edm::Event &e, const edm::EventSetup &c) const override
 
 TrackerizerFP420 (const edm::ParameterSet &conf)
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef std::vector< std::string > vstring
 

Private Attributes

const FP420TrackMain sFP420TrackMain_
 
vstring trackerContainers
 
int verbosity
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 26 of file TrackerizerFP420.h.

Member Typedef Documentation

◆ vstring

typedef std::vector<std::string> cms::TrackerizerFP420::vstring
private

Definition at line 35 of file TrackerizerFP420.h.

Constructor & Destructor Documentation

◆ TrackerizerFP420()

cms::TrackerizerFP420::TrackerizerFP420 ( const edm::ParameterSet conf)
explicit

Definition at line 25 of file TrackerizerFP420.cc.

References SiStripOfflineCRack_cfg::alias, gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), AlCaHLTBitMon_QueryRunRegistry::string, trackerContainers, and verbosity.

25  : sFP420TrackMain_(conf) {
26  std::string alias(conf.getParameter<std::string>("@module_label"));
27 
28  produces<TrackCollectionFP420>().setBranchAlias(alias);
29 
30  trackerContainers.clear();
31  trackerContainers = conf.getParameter<std::vector<std::string> >("ROUList");
32 
33  verbosity = conf.getUntrackedParameter<int>("VerbosityLevel");
34  if (verbosity > 0) {
35  std::cout << "Creating a TrackerizerFP420" << std::endl;
36  }
37  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const
const FP420TrackMain sFP420TrackMain_

Member Function Documentation

◆ produce()

void cms::TrackerizerFP420::produce ( edm::StreamID  ,
edm::Event e,
const edm::EventSetup c 
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 39 of file TrackerizerFP420.cc.

References iEvent, input, pileupCalc::inputRange, eostools::move(), FP420TrackMain::run(), sFP420TrackMain_, and trackerContainers.

39  {
40  // beginJob;
41  // be lazy and include the appropriate namespaces
42  using namespace edm;
43  using namespace std;
44 
45  // Get input
46  //A
47  // edm::Handle<ClusterCollectionFP420> icf_simhit;
48  /*
49  Handle<ClusterCollectionFP420> cf_simhit;
50  std::vector<const ClusterCollectionFP420 *> cf_simhitvec;
51  for(uint32_t i = 0; i< trackerContainers.size();i++){
52  iEvent.getByLabel( trackerContainers[i], cf_simhit);
53  cf_simhitvec.push_back(cf_simhit.product()); }
54  std::unique_ptr<ClusterCollectionFP420 > input(new DigiCollectionFP420(cf_simhitvec));
55  */
56 
57  //B
58 
60  iEvent.getByLabel(trackerContainers[0], input);
61 
62  // Step C: create empty output collection
63  auto toutput = std::make_unique<TrackCollectionFP420>();
64 
65  // put zero to container info from the beginning (important! because not any detID is updated with coming of new event !!!!!!
66  // clean info of container from previous event
67 
68  std::vector<TrackFP420> collector;
69  collector.clear();
71  inputRange.first = collector.begin();
72  inputRange.second = collector.end();
73 
74  unsigned int detID = 0;
75  toutput->putclear(inputRange, detID);
76 
77  unsigned int StID = 1111;
78  toutput->putclear(inputRange, StID);
79  StID = 2222;
80  toutput->putclear(inputRange, StID);
81 
82  // !!!!!!
83  // if we want to keep Track container/Collection for one event ---> uncomment the line below and vice versa
84  toutput->clear(); //container_.clear() --> start from the beginning of the container
85 
86  // RUN now: !!!!!!
87  // startFP420TrackMain_.run(input, toutput);
88  sFP420TrackMain_.run(input, toutput.get());
89  // std::cout <<"======= TrackerizerFP420: end of produce " << std::endl;
90 
91  // Step D: write output to file
92  iEvent.put(std::move(toutput));
93  } //produce
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
Definition: EdmProvDump.cc:47
void run(edm::Handle< ClusterCollectionFP420 > &input, TrackCollectionFP420 *toutput) const
Runs the algorithm.
int iEvent
Definition: GenABIO.cc:224
const FP420TrackMain sFP420TrackMain_
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ sFP420TrackMain_

const FP420TrackMain cms::TrackerizerFP420::sFP420TrackMain_
private

Definition at line 38 of file TrackerizerFP420.h.

Referenced by produce().

◆ trackerContainers

vstring cms::TrackerizerFP420::trackerContainers
private

Definition at line 36 of file TrackerizerFP420.h.

Referenced by produce(), and TrackerizerFP420().

◆ verbosity

int cms::TrackerizerFP420::verbosity
private

Definition at line 41 of file TrackerizerFP420.h.

Referenced by TrackerizerFP420().