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

virtual void beginJob ()
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
 TrackerizerFP420 (const edm::ParameterSet &conf)
 
virtual ~TrackerizerFP420 ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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
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)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 30 of file TrackerizerFP420.h.

Member Typedef Documentation

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

Definition at line 45 of file TrackerizerFP420.h.

Constructor & Destructor Documentation

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

Definition at line 27 of file TrackerizerFP420.cc.

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

27  :conf_(conf) {
28 
29  std::string alias ( conf.getParameter<std::string>("@module_label") );
30 
31  produces<TrackCollectionFP420>().setBranchAlias( alias );
32 
33  trackerContainers.clear();
34  trackerContainers = conf.getParameter<std::vector<std::string> >("ROUList");
35 
36  verbosity = conf_.getUntrackedParameter<int>("VerbosityLevel");
37  if (verbosity > 0) {
38  std::cout << "Creating a TrackerizerFP420" << std::endl;
39  }
40 
41  // Initialization:
43 
44  }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
FP420TrackMain * sFP420TrackMain_
edm::ParameterSet conf_
cms::TrackerizerFP420::~TrackerizerFP420 ( )
virtual

Definition at line 47 of file TrackerizerFP420.cc.

References sFP420TrackMain_.

47  {
48  delete sFP420TrackMain_;
49  }
FP420TrackMain * sFP420TrackMain_

Member Function Documentation

void cms::TrackerizerFP420::beginJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 52 of file TrackerizerFP420.cc.

References gather_cfg::cout, and verbosity.

52  {
53  if (verbosity > 0) {
54  std::cout << "BeginJob method " << std::endl;
55  }
56  }
void cms::TrackerizerFP420::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Definition at line 59 of file TrackerizerFP420.cc.

References edm::Event::getByLabel(), input, estimatePileup::inputRange, eostools::move(), edm::Event::put(), FP420TrackMain::run(), sFP420TrackMain_, and trackerContainers.

60  {
61  // beginJob;
62  // be lazy and include the appropriate namespaces
63  using namespace edm;
64  using namespace std;
65 
66  // Get input
67  //A
68  // edm::Handle<ClusterCollectionFP420> icf_simhit;
69  /*
70  Handle<ClusterCollectionFP420> cf_simhit;
71  std::vector<const ClusterCollectionFP420 *> cf_simhitvec;
72  for(uint32_t i = 0; i< trackerContainers.size();i++){
73  iEvent.getByLabel( trackerContainers[i], cf_simhit);
74  cf_simhitvec.push_back(cf_simhit.product()); }
75  std::auto_ptr<ClusterCollectionFP420 > input(new DigiCollectionFP420(cf_simhitvec));
76  */
77 
78  //B
79 
81  iEvent.getByLabel( trackerContainers[0] , input);
82 
83 
84 
85 
86  // Step C: create empty output collection
87  auto toutput = std::make_unique<TrackCollectionFP420>();
88 
89 
90 
91  // put zero to container info from the beginning (important! because not any detID is updated with coming of new event !!!!!!
92  // clean info of container from previous event
93 
94  std::vector<TrackFP420> collector;
95  collector.clear();
97  inputRange.first = collector.begin();
98  inputRange.second = collector.end();
99 
100  unsigned int detID = 0;
101  toutput->putclear(inputRange,detID);
102 
103  unsigned int StID = 1111;
104  toutput->putclear(inputRange,StID);
105  StID = 2222;
106  toutput->putclear(inputRange,StID);
107 
108 
109  // !!!!!!
110  // if we want to keep Track container/Collection for one event ---> uncomment the line below and vice versa
111  toutput->clear(); //container_.clear() --> start from the beginning of the container
112 
113  // RUN now: !!!!!!
114  // startFP420TrackMain_.run(input, toutput);
115  sFP420TrackMain_->run(input, toutput.get());
116  // std::cout <<"======= TrackerizerFP420: end of produce " << std::endl;
117 
118  // Step D: write output to file
119  iEvent.put(std::move(toutput));
120  }//produce
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
Definition: EdmProvDump.cc:44
FP420TrackMain * sFP420TrackMain_
int iEvent
Definition: GenABIO.cc:230
void run(edm::Handle< ClusterCollectionFP420 > &input, TrackCollectionFP420 *toutput)
Runs the algorithm.
HLT enums.
inputRange
Get input source.
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

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

Definition at line 46 of file TrackerizerFP420.h.

Referenced by TrackerizerFP420().

FP420TrackMain* cms::TrackerizerFP420::sFP420TrackMain_
private

Definition at line 49 of file TrackerizerFP420.h.

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

vstring cms::TrackerizerFP420::trackerContainers
private

Definition at line 47 of file TrackerizerFP420.h.

Referenced by produce(), and TrackerizerFP420().

int cms::TrackerizerFP420::verbosity
private

Definition at line 52 of file TrackerizerFP420.h.

Referenced by beginJob(), and TrackerizerFP420().