CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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)
 
 ~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

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
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< B > consumes (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 () noexcept
 
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...
 
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

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

Definition at line 39 of file TrackerizerFP420.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file TrackerizerFP420.cc.

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

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  }
T getUntrackedParameter(std::string const &, T const &) const
FP420TrackMain * sFP420TrackMain_
edm::ParameterSet conf_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
tuple cout
Definition: gather_cfg.py:144
cms::TrackerizerFP420::~TrackerizerFP420 ( )
override

Definition at line 44 of file TrackerizerFP420.cc.

References sFP420TrackMain_.

44 { delete sFP420TrackMain_; }
FP420TrackMain * sFP420TrackMain_

Member Function Documentation

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

Reimplemented from edm::EDProducer.

Definition at line 47 of file TrackerizerFP420.cc.

References gather_cfg::cout, and verbosity.

47  {
48  if (verbosity > 0) {
49  std::cout << "BeginJob method " << std::endl;
50  }
51  }
tuple cout
Definition: gather_cfg.py:144
void cms::TrackerizerFP420::produce ( edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 53 of file TrackerizerFP420.cc.

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

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
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
Definition: EdmProvDump.cc:47
FP420TrackMain * sFP420TrackMain_
int iEvent
Definition: GenABIO.cc:224
def move
Definition: eostools.py:511
void run(edm::Handle< ClusterCollectionFP420 > &input, TrackCollectionFP420 *toutput)
Runs the algorithm.
tuple inputRange
Definition: pileupCalc.py:168

Member Data Documentation

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

Definition at line 40 of file TrackerizerFP420.h.

Referenced by TrackerizerFP420().

FP420TrackMain* cms::TrackerizerFP420::sFP420TrackMain_
private

Definition at line 43 of file TrackerizerFP420.h.

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

vstring cms::TrackerizerFP420::trackerContainers
private

Definition at line 41 of file TrackerizerFP420.h.

Referenced by produce(), and TrackerizerFP420().

int cms::TrackerizerFP420::verbosity
private

Definition at line 46 of file TrackerizerFP420.h.

Referenced by beginJob(), and TrackerizerFP420().