test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1TMuonTriggerPrimitiveProducer Class Reference
Inheritance diagram for L1TMuonTriggerPrimitiveProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TMuonTriggerPrimitiveProducer (const PSet &)
 
void produce (edm::Event &, const edm::EventSetup &)
 
 ~L1TMuonTriggerPrimitiveProducer ()
 
- 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)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

collector_list collectors
 
std::unique_ptr
< GeometryTranslator
geom
 

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 41 of file L1TMuonTriggerPrimitiveProducer.cc.

Constructor & Destructor Documentation

L1TMuonTriggerPrimitiveProducer::L1TMuonTriggerPrimitiveProducer ( const PSet p)

Definition at line 52 of file L1TMuonTriggerPrimitiveProducer.cc.

References relativeConstraints::geom, reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), edm::ParameterSet::getParameterSetNames(), mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

52  {
53  std::unique_ptr<SubsystemCollectorFactory>
55 
56  geom.reset(new GeometryTranslator());
57 
58  vstring psetNames;
59  p.getParameterSetNames(psetNames);
60  auto name = psetNames.cbegin();
61  auto nend = psetNames.cend();
62  for( ; name != nend; ++name ) {
63  PSet collector_cfg = p.getParameterSet(*name);
64  std::string collector_type =
65  collector_cfg.getParameter<std::string>("collectorType");
66  collectors[*name] = collector_ptr( factory->create( collector_type,
67  collector_cfg ) );
68 
69  if(*name=="DT"){
70  consumes<L1MuDTChambPhContainer>(collector_cfg.getParameter<edm::InputTag>("src"));
71  consumes<L1MuDTChambThContainer>(collector_cfg.getParameter<edm::InputTag>("src"));
72  }
73  if(*name=="CSC"){
74  consumes<CSCCorrelatedLCTDigiCollection>(collector_cfg.getParameter<edm::InputTag>("src"));
75  }
76  if(*name=="RPC"){
77  consumes<RPCDigiCollection>(collector_cfg.getParameter<edm::InputTag>("src"));
78  }
79 
80  produces<TriggerPrimitiveCollection>(*name);
81  }
82  produces<TriggerPrimitiveCollection>();
83  factory.release();
84 }
T getParameter(std::string const &) const
vector< string > vstring
Definition: ExoticaDQM.cc:8
std::unique_ptr< SubsystemCollector > collector_ptr
std::unique_ptr< GeometryTranslator > geom
ParameterSet const & getParameterSet(std::string const &) const
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
T get(const Candidate &c)
Definition: component.h:55
L1TMuonTriggerPrimitiveProducer::~L1TMuonTriggerPrimitiveProducer ( )
inline

Definition at line 44 of file L1TMuonTriggerPrimitiveProducer.cc.

44 {}

Member Function Documentation

void L1TMuonTriggerPrimitiveProducer::produce ( edm::Event ev,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 86 of file L1TMuonTriggerPrimitiveProducer.cc.

References eta, relativeConstraints::geom, phi(), and edm::Event::put().

87  {
88  std::auto_ptr<TriggerPrimitiveCollection>
89  master_out(new TriggerPrimitiveCollection);
90 
91  geom->checkAndUpdateGeometry(es);
92 
93  auto coll_itr = collectors.cbegin();
94  auto cend = collectors.cend();
95 
96  double eta,phi,bend;
97  for( ; coll_itr != cend; ++coll_itr ) {
98  std::auto_ptr<TriggerPrimitiveCollection>
99  subs_out(new TriggerPrimitiveCollection);
100  auto& collector = coll_itr->second;
101 
102  collector->extractPrimitives(ev,es,*subs_out);
103 
104  auto the_tp = subs_out->begin();
105  auto tp_end = subs_out->end();
106  for ( ; the_tp != tp_end; ++the_tp ) {
107  eta = geom->calculateGlobalEta(*the_tp);
108  phi = geom->calculateGlobalPhi(*the_tp);
109  bend = geom->calculateBendAngle(*the_tp);
110  the_tp->setCMSGlobalEta(eta);
111  the_tp->setCMSGlobalPhi(phi);
112  the_tp->setThetaBend(bend);
113  }
114 
115  master_out->insert(master_out->end(),
116  subs_out->begin(),
117  subs_out->end());
118 
119  ev.put(subs_out,coll_itr->first);
120  }
121 
122  ev.put(master_out);
123 }
std::unique_ptr< GeometryTranslator > geom
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
std::vector< TriggerPrimitive > TriggerPrimitiveCollection

Member Data Documentation

collector_list L1TMuonTriggerPrimitiveProducer::collectors
private

Definition at line 48 of file L1TMuonTriggerPrimitiveProducer.cc.

std::unique_ptr<GeometryTranslator> L1TMuonTriggerPrimitiveProducer::geom
private

Definition at line 49 of file L1TMuonTriggerPrimitiveProducer.cc.