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::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 TriggerSummaryProducerRAW (const edm::ParameterSet &)
 
 ~TriggerSummaryProducerRAW () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

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 34 of file TriggerSummaryProducerRAW.h.

Constructor & Destructor Documentation

◆ TriggerSummaryProducerRAW()

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

Definition at line 28 of file TriggerSummaryProducerRAW.cc.

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

◆ ~TriggerSummaryProducerRAW()

TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 54 of file TriggerSummaryProducerRAW.cc.

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

54  {
56  desc.add<std::string>("processName", "@");
57  descriptions.add("triggerSummaryProducerRAW", desc);
58 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Implements edm::global::EDProducerBase.

Definition at line 61 of file TriggerSummaryProducerRAW.cc.

References trigger::TriggerEventWithRefs::addFilterObject(), edm::GetterOfProducts< T >::fillHandles(), getterOfProducts_, iEvent, instance, label, LogDebug, LogTrace, HerwigMaxPtPartonFilter_cfi::moduleLabel, eostools::move(), pn_, LaserDQM_cfg::process, SimL1EmulatorRepack_CalouGT_cff::processName, crab_script::provenance, putToken_, trigger::TriggerEventWithRefs::size(), and makeGlobalPositionRcd_cfg::tag.

61  {
62  using namespace std;
63  using namespace edm;
64  using namespace reco;
65  using namespace trigger;
66 
67  std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > fobs;
69 
70  const unsigned int nfob(fobs.size());
71  LogDebug("TriggerSummaryProducerRaw") << "Number of filter objects found: " << nfob;
72 
73  // construct single RAW product
74  TriggerEventWithRefs product(pn_, nfob);
75  for (unsigned int ifob = 0; ifob != nfob; ++ifob) {
76  const string& label(fobs[ifob].provenance()->moduleLabel());
77  const string& instance(fobs[ifob].provenance()->productInstanceName());
78  const string& process(fobs[ifob].provenance()->processName());
80  LogTrace("TriggerSummaryProducerRaw")
81  << ifob << " " << tag << "\n"
82  << " Sizes: "
83  << " 1/" << fobs[ifob]->photonSize() << " 2/" << fobs[ifob]->electronSize() << " 3/" << fobs[ifob]->muonSize()
84  << " 4/" << fobs[ifob]->jetSize() << " 5/" << fobs[ifob]->compositeSize() << " 6/" << fobs[ifob]->basemetSize()
85  << " 7/" << fobs[ifob]->calometSize()
86 
87  << " 8/" << fobs[ifob]->pixtrackSize() << " 9/" << fobs[ifob]->l1emSize() << " A/" << fobs[ifob]->l1muonSize()
88  << " B/" << fobs[ifob]->l1jetSize() << " C/" << fobs[ifob]->l1etmissSize() << " D/"
89  << fobs[ifob]->l1hfringsSize() << " E/" << fobs[ifob]->pfjetSize() << " F/" << fobs[ifob]->pftauSize() << " G/"
90  << fobs[ifob]->pfmetSize() << " I/" << fobs[ifob]->l1tmuonSize() << " J/" << fobs[ifob]->l1tegammaSize()
91  << " K/" << fobs[ifob]->l1tjetSize() << " L/" << fobs[ifob]->l1ttauSize() << " M/" << fobs[ifob]->l1tetsumSize()
92  << " N/" << fobs[ifob]->l1ttkmuonSize() << " O/" << fobs[ifob]->l1ttkeleSize() << " P/"
93  << fobs[ifob]->l1ttkemSize() << " Q/" << fobs[ifob]->l1tpfjetSize() << " R/" << fobs[ifob]->l1tpftauSize()
94  << " S/" << fobs[ifob]->l1thpspftauSize() << " T/" << fobs[ifob]->l1tpftrackSize() << " U/"
95  << fobs[ifob]->l1tmuonShowerSize();
96  LogTrace("TriggerSummaryProducerRaw")
97  << "TriggerSummaryProducerRaw::addFilterObjects( )"
98  << "\n fobs[ifob]->l1tmuonIds().size() = " << fobs[ifob]->l1tmuonIds().size()
99  << "\n fobs[ifob]->l1tmuonRefs().size() = " << fobs[ifob]->l1tmuonRefs().size();
100  LogTrace("TriggerSummaryProducerRaw")
101  << "TriggerSummaryProducerRaw::addFilterObjects( )"
102  << "\n fobs[ifob]->l1tegammaIds().size() = " << fobs[ifob]->l1tegammaIds().size()
103  << "\n fobs[ifob]->l1tegammaRefs().size() = " << fobs[ifob]->l1tegammaRefs().size();
104  LogTrace("TriggerSummaryProducerRaw") << "TriggerSummaryProducerRaw::addFilterObjects( )"
105  << "\n fobs[ifob]->l1tjetIds().size() = " << fobs[ifob]->l1tjetIds().size()
106  << "\n fobs[ifob]->l1tjetRefs().size() = " << fobs[ifob]->l1tjetRefs().size();
107  LogTrace("TriggerSummaryProducerRaw") << "TriggerSummaryProducerRaw::addFilterObjects( )"
108  << "\n fobs[ifob]->l1ttauIds().size() = " << fobs[ifob]->l1ttauIds().size()
109  << "\n fobs[ifob]->l1ttauRefs().size() = " << fobs[ifob]->l1ttauRefs().size();
110  LogTrace("TriggerSummaryProducerRaw")
111  << "TriggerSummaryProducerRaw::addFilterObjects( )"
112  << "\n fobs[ifob]->l1tetsumIds().size() = " << fobs[ifob]->l1tetsumIds().size()
113  << "\n fobs[ifob]->l1tetsumRefs().size() = " << fobs[ifob]->l1tetsumRefs().size();
114  LogTrace("TriggerSummaryProducerRaw")
115  << "TriggerSummaryProducerRaw::addFilterObjects( )"
116  << "\n fobs[ifob]->l1tmuonShowerIds().size() = " << fobs[ifob]->l1tmuonShowerIds().size()
117  << "\n fobs[ifob]->l1tmuonShowerRefs().size() = " << fobs[ifob]->l1tmuonShowerRefs().size();
118  LogTrace("TriggerSummaryProducerRaw")
119  << "TriggerSummaryProducerRaw::addFilterObjects( )"
120  << "\n fobs[ifob]->l1tp2gtcandSize() = " << fobs[ifob]->l1tp2gtcandSize()
121  << "\n fobs[ifob]->l1tp2gtcandIds().size() = " << fobs[ifob]->l1tp2gtcandIds().size()
122  << "\n fobs[ifob]->11tp2gtcandRefs().size() = " << fobs[ifob]->l1tp2gtcandRefs().size();
123  product.addFilterObject(tag, *fobs[ifob]);
124  }
125 
126  // place product in Event
128  LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size();
129 
130  return;
131 }
static PFTauRenderPlugin instance
const edm::EDPutTokenT< trigger::TriggerEventWithRefs > putToken_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getterOfProducts_
#define LogTrace(id)
char const * label
int iEvent
Definition: GenABIO.cc:224
void fillHandles(ProductContainer const &productContainer, std::vector< edm::Handle< T >> &handles) const
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
#define LogDebug(id)

Member Data Documentation

◆ getterOfProducts_

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

Definition at line 45 of file TriggerSummaryProducerRAW.h.

Referenced by produce().

◆ pn_

std::string TriggerSummaryProducerRAW::pn_
private

process name

Definition at line 43 of file TriggerSummaryProducerRAW.h.

Referenced by produce().

◆ putToken_

const edm::EDPutTokenT<trigger::TriggerEventWithRefs> TriggerSummaryProducerRAW::putToken_
private

Definition at line 46 of file TriggerSummaryProducerRAW.h.

Referenced by produce().