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 | Static 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 ()
 
ModuleDescription const & moduleDescription () const
 
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 ()
 
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 (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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

Author
Martin Grunewald

See header file for documentation

Author
Martin Grunewald

Definition at line 33 of file TriggerSummaryProducerRAW.h.

Constructor & Destructor Documentation

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

Definition at line 29 of file TriggerSummaryProducerRAW.cc.

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

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

Definition at line 52 of file TriggerSummaryProducerRAW.cc.

53 {
54 }

Member Function Documentation

void TriggerSummaryProducerRAW::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 60 of file TriggerSummaryProducerRAW.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.

60  {
62  desc.add<std::string>("processName","@");
63  descriptions.add("triggerSummaryProducerRAW", desc);
64 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TriggerSummaryProducerRAW::produce ( edm::Event iEvent,
const edm::EventSetup  
)
virtual

Implements edm::EDProducer.

Definition at line 68 of file TriggerSummaryProducerRAW.cc.

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

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

Referenced by produce(), and TriggerSummaryProducerRAW().

std::string TriggerSummaryProducerRAW::pn_
private

process name

Definition at line 43 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().