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

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &) override
 
 TriggerSummaryProducerRAW (const edm::ParameterSet &)
 
virtual ~TriggerSummaryProducerRAW ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, 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
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::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...
 

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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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, pn_, and ~TriggerSummaryProducerRAW().

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:71
std::string const & getProcessName() const
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getterOfProducts_
bool isAvailable() const
Definition: Service.h:46
std::string pn_
process name
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW ( )
virtualdefault

Member Function Documentation

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

Definition at line 58 of file TriggerSummaryProducerRAW.cc.

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

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

Definition at line 66 of file TriggerSummaryProducerRAW.cc.

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

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

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().