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::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 &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

std::vector< edm::Handle
< trigger::TriggerFilterObjectWithRefs > > 
fobs_
 handles to the filter objects More...
 
std::string pn_
 process name More...
 
edm::ProcessNameSelector selector_
 selector for getMany methods More...
 
edm::service::TriggerNamesServicetns_
 the pointer to the current TriggerNamesService 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
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

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

Date:
2007/12/06 08:27:31
Revision:
1.1
Author
Martin Grunewald

See header file for documentation

Date:
2012/01/30 09:40:35
Revision:
1.13
Author
Martin Grunewald

Definition at line 33 of file TriggerSummaryProducerRAW.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file TriggerSummaryProducerRAW.cc.

References edm::service::TriggerNamesService::getProcessName(), LogDebug, cppFunctionSkipper::operator, pn_, selector_, and tns_.

22  :
23  pn_(ps.getParameter<std::string>("processName")),
25  tns_(), fobs_()
26 {
27  if (pn_=="@") {
28  // use tns
30  // get tns pointer
32  if (tns_!=0) {
34  } else {
35  edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService pointer = 0!";
36  pn_="*";
37  }
38  } else {
39  edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService not available!";
40  pn_="*";
41  }
43  }
44 
45  LogDebug("TriggerSummaryProducerRaw") << "Using process name: '" << pn_ <<"'";
46  produces<trigger::TriggerEventWithRefs>();
47 
48 }
#define LogDebug(id)
T getParameter(std::string const &) const
std::string const & getProcessName() const
std::vector< edm::Handle< trigger::TriggerFilterObjectWithRefs > > fobs_
handles to the filter objects
std::string pn_
process name
edm::service::TriggerNamesService * tns_
the pointer to the current TriggerNamesService
edm::ProcessNameSelector selector_
selector for getMany methods
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW ( )

Definition at line 50 of file TriggerSummaryProducerRAW.cc.

51 {
52 }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 60 of file TriggerSummaryProducerRAW.cc.

References fobs_, edm::Event::getMany(), instance, diffTwoXMLs::label, LogDebug, LogTrace, pn_, LaserDQM_cfg::process, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, selector_, and GlobalPosition_Frontier_DevDB_cff::tag.

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

Member Data Documentation

std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > TriggerSummaryProducerRAW::fobs_
private

handles to the filter objects

Definition at line 48 of file TriggerSummaryProducerRAW.h.

Referenced by produce().

std::string TriggerSummaryProducerRAW::pn_
private

process name

Definition at line 42 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().

edm::ProcessNameSelector TriggerSummaryProducerRAW::selector_
private

selector for getMany methods

Definition at line 44 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().

edm::service::TriggerNamesService* TriggerSummaryProducerRAW::tns_
private

the pointer to the current TriggerNamesService

Definition at line 46 of file TriggerSummaryProducerRAW.h.

Referenced by TriggerSummaryProducerRAW().