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
TriggerSummaryProducerRAW Class Reference

#include <TriggerSummaryProducerRAW.h>

Inheritance diagram for TriggerSummaryProducerRAW:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 
 TriggerSummaryProducerRAW (const edm::ParameterSet &)
 
 ~TriggerSummaryProducerRAW ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::GetterOfProducts
< trigger::TriggerFilterObjectWithRefs
getterOfProducts_
 
std::string pn_
 process name More...
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

This class is an EDProducer making the HLT summary object for RAW

Date:
2012/08/09 20:00:18
Revision:
1.2
Author
Martin Grunewald

See header file for documentation

Date:
2012/08/09 20:00:20
Revision:
1.14
Author
Martin Grunewald

Definition at line 31 of file TriggerSummaryProducerRAW.h.

Constructor & Destructor Documentation

TriggerSummaryProducerRAW::TriggerSummaryProducerRAW ( const edm::ParameterSet ps)
explicit

Definition at line 30 of file TriggerSummaryProducerRAW.cc.

References edm::ProducerBase::callWhenNewProductsRegistered(), edm::service::TriggerNamesService::getProcessName(), getterOfProducts_, edm::Service< T >::isAvailable(), LogDebug, and pn_.

30  :
31  pn_(ps.getParameter<std::string>("processName"))
32 {
33  if (pn_=="@") {
34 
36  if (tns.isAvailable()) {
37  pn_ = tns->getProcessName();
38  } else {
39  edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService not available!";
40  pn_="*";
41  }
42  }
43 
44  LogDebug("TriggerSummaryProducerRaw") << "Using process name: '" << pn_ <<"'";
45  produces<trigger::TriggerEventWithRefs>();
46 
47  // Tell the getter what type of products to get and
48  // also the process to get them from
50  callWhenNewProductsRegistered(getterOfProducts_);
51 }
#define LogDebug(id)
T getParameter(std::string const &) const
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
Definition: ProducerBase.h:44
std::string const & getProcessName() const
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getterOfProducts_
bool isAvailable() const
Definition: Service.h:47
std::string pn_
process name
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW ( )

Definition at line 53 of file TriggerSummaryProducerRAW.cc.

54 {
55 }

Member Function Documentation

void TriggerSummaryProducerRAW::produce ( edm::Event iEvent,
const edm::EventSetup  
)
virtual

Implements edm::EDProducer.

Definition at line 63 of file TriggerSummaryProducerRAW.cc.

References edm::GetterOfProducts< T >::fillHandles(), getterOfProducts_, instance, diffTwoXMLs::label, LogDebug, LogTrace, pn_, LaserDQM_cfg::process, edm::Event::put(), L1Trigger_dataformats::reco, and GlobalPosition_Frontier_DevDB_cff::tag.

64 {
65  using namespace std;
66  using namespace edm;
67  using namespace reco;
68  using namespace trigger;
69 
70  std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > fobs;
71  getterOfProducts_.fillHandles(iEvent, fobs);
72 
73  const unsigned int nfob(fobs.size());
74  LogDebug("TriggerSummaryProducerRaw") << "Number of filter objects found: " << nfob;
75 
76  // construct single RAW product
77  auto_ptr<TriggerEventWithRefs> product(new TriggerEventWithRefs(pn_,nfob));
78  for (unsigned int ifob=0; ifob!=nfob; ++ifob) {
79  const string& label (fobs[ifob].provenance()->moduleLabel());
80  const string& instance (fobs[ifob].provenance()->productInstanceName());
81  const string& process (fobs[ifob].provenance()->processName());
83  LogTrace("TriggerSummaryProducerRaw")
84  << ifob << " " << tag << endl
85  << " Sizes: "
86  << " 1/" << fobs[ifob]->photonSize()
87  << " 2/" << fobs[ifob]->electronSize()
88  << " 3/" << fobs[ifob]->muonSize()
89  << " 4/" << fobs[ifob]->jetSize()
90  << " 5/" << fobs[ifob]->compositeSize()
91  << " 6/" << fobs[ifob]->basemetSize()
92  << " 7/" << fobs[ifob]->calometSize()
93 
94  << " 8/" << fobs[ifob]->pixtrackSize()
95  << " 9/" << fobs[ifob]->l1emSize()
96  << " A/" << fobs[ifob]->l1muonSize()
97  << " B/" << fobs[ifob]->l1jetSize()
98  << " C/" << fobs[ifob]->l1etmissSize()
99  << " D/" << fobs[ifob]->l1hfringsSize()
100  << " E/" << fobs[ifob]->pfjetSize()
101  << " F/" << fobs[ifob]->pftauSize()
102  << endl;
103  product->addFilterObject(tag,*fobs[ifob]);
104  }
105 
106  // place product in Event
107  OrphanHandle<TriggerEventWithRefs> ref = iEvent.put(product);
108  LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size();
109 
110  return;
111 }
#define LogDebug(id)
static PFTauRenderPlugin instance
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getterOfProducts_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
#define LogTrace(id)
std::string pn_
process name
void fillHandles(edm::Event const &event, std::vector< edm::Handle< T > > &handles) const
tuple process
Definition: LaserDQM_cfg.py:3

Member Data Documentation

edm::GetterOfProducts<trigger::TriggerFilterObjectWithRefs> TriggerSummaryProducerRAW::getterOfProducts_
private

Definition at line 42 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().

std::string TriggerSummaryProducerRAW::pn_
private

process name

Definition at line 40 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().