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::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginJob () override
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 TrackerizerFP420 (const edm::ParameterSet &conf)
 
 ~TrackerizerFP420 () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
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

edm::ParameterSet conf_
 
FP420TrackMainsFP420TrackMain_
 
vstring trackerContainers
 
int verbosity
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer 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::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

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 39 of file TrackerizerFP420.h.

Constructor & Destructor Documentation

◆ TrackerizerFP420()

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

Definition at line 26 of file TrackerizerFP420.cc.

26  : conf_(conf) {
27  std::string alias(conf.getParameter<std::string>("@module_label"));
28 
29  produces<TrackCollectionFP420>().setBranchAlias(alias);
30 
31  trackerContainers.clear();
32  trackerContainers = conf.getParameter<std::vector<std::string> >("ROUList");
33 
34  verbosity = conf_.getUntrackedParameter<int>("VerbosityLevel");
35  if (verbosity > 0) {
36  std::cout << "Creating a TrackerizerFP420" << std::endl;
37  }
38 
39  // Initialization:
41  }

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

◆ ~TrackerizerFP420()

cms::TrackerizerFP420::~TrackerizerFP420 ( )
override

Definition at line 44 of file TrackerizerFP420.cc.

44 { delete sFP420TrackMain_; }

References sFP420TrackMain_.

Member Function Documentation

◆ beginJob()

void cms::TrackerizerFP420::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDProducer.

Definition at line 47 of file TrackerizerFP420.cc.

47  {
48  if (verbosity > 0) {
49  std::cout << "BeginJob method " << std::endl;
50  }
51  }

References gather_cfg::cout, and verbosity.

◆ produce()

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

Implements edm::EDProducer.

Definition at line 53 of file TrackerizerFP420.cc.

53  {
54  // beginJob;
55  // be lazy and include the appropriate namespaces
56  using namespace edm;
57  using namespace std;
58 
59  // Get input
60  //A
61  // edm::Handle<ClusterCollectionFP420> icf_simhit;
62  /*
63  Handle<ClusterCollectionFP420> cf_simhit;
64  std::vector<const ClusterCollectionFP420 *> cf_simhitvec;
65  for(uint32_t i = 0; i< trackerContainers.size();i++){
66  iEvent.getByLabel( trackerContainers[i], cf_simhit);
67  cf_simhitvec.push_back(cf_simhit.product()); }
68  std::unique_ptr<ClusterCollectionFP420 > input(new DigiCollectionFP420(cf_simhitvec));
69  */
70 
71  //B
72 
74  iEvent.getByLabel(trackerContainers[0], input);
75 
76  // Step C: create empty output collection
77  auto toutput = std::make_unique<TrackCollectionFP420>();
78 
79  // put zero to container info from the beginning (important! because not any detID is updated with coming of new event !!!!!!
80  // clean info of container from previous event
81 
82  std::vector<TrackFP420> collector;
83  collector.clear();
85  inputRange.first = collector.begin();
86  inputRange.second = collector.end();
87 
88  unsigned int detID = 0;
89  toutput->putclear(inputRange, detID);
90 
91  unsigned int StID = 1111;
92  toutput->putclear(inputRange, StID);
93  StID = 2222;
94  toutput->putclear(inputRange, StID);
95 
96  // !!!!!!
97  // if we want to keep Track container/Collection for one event ---> uncomment the line below and vice versa
98  toutput->clear(); //container_.clear() --> start from the beginning of the container
99 
100  // RUN now: !!!!!!
101  // startFP420TrackMain_.run(input, toutput);
102  sFP420TrackMain_->run(input, toutput.get());
103  // std::cout <<"======= TrackerizerFP420: end of produce " << std::endl;
104 
105  // Step D: write output to file
106  iEvent.put(std::move(toutput));
107  } //produce

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

Member Data Documentation

◆ conf_

edm::ParameterSet cms::TrackerizerFP420::conf_
private

Definition at line 40 of file TrackerizerFP420.h.

Referenced by TrackerizerFP420().

◆ sFP420TrackMain_

FP420TrackMain* cms::TrackerizerFP420::sFP420TrackMain_
private

Definition at line 43 of file TrackerizerFP420.h.

Referenced by produce(), TrackerizerFP420(), and ~TrackerizerFP420().

◆ trackerContainers

vstring cms::TrackerizerFP420::trackerContainers
private

Definition at line 41 of file TrackerizerFP420.h.

Referenced by produce(), and TrackerizerFP420().

◆ verbosity

int cms::TrackerizerFP420::verbosity
private

Definition at line 46 of file TrackerizerFP420.h.

Referenced by beginJob(), and TrackerizerFP420().

input
static const std::string input
Definition: EdmProvDump.cc:48
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
cms::TrackerizerFP420::trackerContainers
vstring trackerContainers
Definition: TrackerizerFP420.h:41
edm::Handle
Definition: AssociativeIterator.h:50
pileupCalc.inputRange
inputRange
Definition: pileupCalc.py:218
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cms::TrackerizerFP420::sFP420TrackMain_
FP420TrackMain * sFP420TrackMain_
Definition: TrackerizerFP420.h:43
cms::TrackerizerFP420::conf_
edm::ParameterSet conf_
Definition: TrackerizerFP420.h:40
TrackCollectionFP420::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: TrackCollectionFP420.h:12
FP420TrackMain
Definition: FP420TrackMain.h:21
iEvent
int iEvent
Definition: GenABIO.cc:224
FP420TrackMain::run
void run(edm::Handle< ClusterCollectionFP420 > &input, TrackCollectionFP420 *toutput)
Runs the algorithm.
Definition: FP420TrackMain.cc:151
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
cms::TrackerizerFP420::verbosity
int verbosity
Definition: TrackerizerFP420.h:46