CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TriggerSummaryProducerRAW Class Reference

#include <TriggerSummaryProducerRAW.h>

Inheritance diagram for TriggerSummaryProducerRAW:
edm::stream::EDProducer<>

Public Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 
 TriggerSummaryProducerRAW (const edm::ParameterSet &)
 
 ~TriggerSummaryProducerRAW () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

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::service::TriggerNamesService::getProcessName(), getterOfProducts_, edm::Service< T >::isAvailable(), LogDebug, pn_, and ~TriggerSummaryProducerRAW().

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

Member Function Documentation

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

Definition at line 56 of file TriggerSummaryProducerRAW.cc.

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

56  {
58  desc.add<std::string>("processName", "@");
59  descriptions.add("triggerSummaryProducerRAW", desc);
60 }
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  
)
override

Definition at line 63 of file TriggerSummaryProducerRAW.cc.

References edm::GetterOfProducts< T >::fillHandles(), getterOfProducts_, instance, label, LogDebug, LogTrace, HerwigMaxPtPartonFilter_cfi::moduleLabel, eostools::move(), pn_, LaserDQM_cfg::process, SimL1EmulatorRepack_CalouGT_cff::processName, edm::Event::put(), trigger::TriggerEventWithRefs::size(), and GlobalPosition_Frontier_DevDB_cff::tag.

63  {
64  using namespace std;
65  using namespace edm;
66  using namespace reco;
67  using namespace trigger;
68 
69  std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > fobs;
70  getterOfProducts_.fillHandles(iEvent, fobs);
71 
72  const unsigned int nfob(fobs.size());
73  LogDebug("TriggerSummaryProducerRaw") << "Number of filter objects found: " << nfob;
74 
75  // construct single RAW product
76  unique_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() << " 2/" << fobs[ifob]->electronSize() << " 3/" << fobs[ifob]->muonSize()
86  << " 4/" << fobs[ifob]->jetSize() << " 5/" << fobs[ifob]->compositeSize() << " 6/" << fobs[ifob]->basemetSize()
87  << " 7/" << fobs[ifob]->calometSize()
88 
89  << " 8/" << fobs[ifob]->pixtrackSize() << " 9/" << fobs[ifob]->l1emSize() << " A/" << fobs[ifob]->l1muonSize()
90  << " B/" << fobs[ifob]->l1jetSize() << " C/" << fobs[ifob]->l1etmissSize() << " D/"
91  << fobs[ifob]->l1hfringsSize() << " E/" << fobs[ifob]->pfjetSize() << " F/" << fobs[ifob]->pftauSize() << " G/"
92  << fobs[ifob]->pfmetSize() << " I/" << fobs[ifob]->l1tmuonSize() << " J/" << fobs[ifob]->l1tegammaSize()
93  << " K/" << fobs[ifob]->l1tjetSize() << " L/" << fobs[ifob]->l1ttauSize() << " M/" << fobs[ifob]->l1tetsumSize()
94  << endl;
95  LogTrace("TriggerSummaryProducerRaw")
96  << "TriggerSummaryProducerRaw::addFilterObjects( )"
97  << "\n fobs[ifob]->l1tmuonIds().size() = " << fobs[ifob]->l1tmuonIds().size()
98  << "\n fobs[ifob]->l1tmuonRefs().size() = " << fobs[ifob]->l1tmuonRefs().size() << endl;
99  LogTrace("TriggerSummaryProducerRaw")
100  << "TriggerSummaryProducerRaw::addFilterObjects( )"
101  << "\n fobs[ifob]->l1tegammaIds().size() = " << fobs[ifob]->l1tegammaIds().size()
102  << "\n fobs[ifob]->l1tegammaRefs().size() = " << fobs[ifob]->l1tegammaRefs().size() << endl;
103  LogTrace("TriggerSummaryProducerRaw")
104  << "TriggerSummaryProducerRaw::addFilterObjects( )"
105  << "\n fobs[ifob]->l1tjetIds().size() = " << fobs[ifob]->l1tjetIds().size()
106  << "\n fobs[ifob]->l1tjetRefs().size() = " << fobs[ifob]->l1tjetRefs().size() << endl;
107  LogTrace("TriggerSummaryProducerRaw")
108  << "TriggerSummaryProducerRaw::addFilterObjects( )"
109  << "\n fobs[ifob]->l1ttauIds().size() = " << fobs[ifob]->l1ttauIds().size()
110  << "\n fobs[ifob]->l1ttauRefs().size() = " << fobs[ifob]->l1ttauRefs().size() << endl;
111  LogTrace("TriggerSummaryProducerRaw")
112  << "TriggerSummaryProducerRaw::addFilterObjects( )"
113  << "\n fobs[ifob]->l1tetsumIds().size() = " << fobs[ifob]->l1tetsumIds().size()
114  << "\n fobs[ifob]->l1tetsumRefs().size() = " << fobs[ifob]->l1tetsumRefs().size() << endl;
115  product->addFilterObject(tag, *fobs[ifob]);
116  }
117 
118  // place product in Event
119  OrphanHandle<TriggerEventWithRefs> ref = iEvent.put(std::move(product));
120  LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size();
121 
122  return;
123 }
#define LogDebug(id)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
static PFTauRenderPlugin instance
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getterOfProducts_
void fillHandles(edm::Event const &event, std::vector< edm::Handle< T >> &handles) const
char const * label
#define LogTrace(id)
std::string pn_
process name
size_type size() const
number of filters
fixed size matrix
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

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

Definition at line 44 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().

std::string TriggerSummaryProducerRAW::pn_
private

process name

Definition at line 42 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().