CMS 3D CMS Logo

TriggerSummaryProducerRAW.cc
Go to the documentation of this file.
1 
12 
21 
22 #include <memory>
23 #include <vector>
24 
25 //
26 // constructors and destructor
27 //
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
45  callWhenNewProductsRegistered(getterOfProducts_);
46 }
47 
49 
50 //
51 // member functions
52 //
53 
56  desc.add<std::string>("processName", "@");
57  descriptions.add("triggerSummaryProducerRAW", desc);
58 }
59 
60 // ------------ method called to produce the data ------------
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 << endl
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  << endl;
93  LogTrace("TriggerSummaryProducerRaw")
94  << "TriggerSummaryProducerRaw::addFilterObjects( )"
95  << "\n fobs[ifob]->l1tmuonIds().size() = " << fobs[ifob]->l1tmuonIds().size()
96  << "\n fobs[ifob]->l1tmuonRefs().size() = " << fobs[ifob]->l1tmuonRefs().size() << endl;
97  LogTrace("TriggerSummaryProducerRaw")
98  << "TriggerSummaryProducerRaw::addFilterObjects( )"
99  << "\n fobs[ifob]->l1tegammaIds().size() = " << fobs[ifob]->l1tegammaIds().size()
100  << "\n fobs[ifob]->l1tegammaRefs().size() = " << fobs[ifob]->l1tegammaRefs().size() << endl;
101  LogTrace("TriggerSummaryProducerRaw")
102  << "TriggerSummaryProducerRaw::addFilterObjects( )"
103  << "\n fobs[ifob]->l1tjetIds().size() = " << fobs[ifob]->l1tjetIds().size()
104  << "\n fobs[ifob]->l1tjetRefs().size() = " << fobs[ifob]->l1tjetRefs().size() << endl;
105  LogTrace("TriggerSummaryProducerRaw")
106  << "TriggerSummaryProducerRaw::addFilterObjects( )"
107  << "\n fobs[ifob]->l1ttauIds().size() = " << fobs[ifob]->l1ttauIds().size()
108  << "\n fobs[ifob]->l1ttauRefs().size() = " << fobs[ifob]->l1ttauRefs().size() << endl;
109  LogTrace("TriggerSummaryProducerRaw")
110  << "TriggerSummaryProducerRaw::addFilterObjects( )"
111  << "\n fobs[ifob]->l1tetsumIds().size() = " << fobs[ifob]->l1tetsumIds().size()
112  << "\n fobs[ifob]->l1tetsumRefs().size() = " << fobs[ifob]->l1tetsumRefs().size() << endl;
113  product.addFilterObject(tag, *fobs[ifob]);
114  }
115 
116  // place product in Event
118  LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size();
119 
120  return;
121 }
ConfigurationDescriptions.h
trigger::TriggerEventWithRefs
Definition: TriggerEventWithRefs.h:27
edm::StreamID
Definition: StreamID.h:30
Handle.h
edm::ProcessMatch
Definition: ProcessMatch.h:19
MessageLogger.h
TriggerNamesService.h
edm
HLT enums.
Definition: AlignableModifier.h:19
TriggerSummaryProducerRAW::getterOfProducts_
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs > getterOfProducts_
Definition: TriggerSummaryProducerRAW.h:45
edm::service::TriggerNamesService::getProcessName
std::string const & getProcessName() const
Definition: TriggerNamesService.h:107
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
TriggerSummaryProducerRAW.h
TriggerSummaryProducerRAW::TriggerSummaryProducerRAW
TriggerSummaryProducerRAW(const edm::ParameterSet &)
Definition: TriggerSummaryProducerRAW.cc:28
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
Service.h
OrphanHandle.h
ProcessMatch.h
Provenance.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerSummaryProducerRAW::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: TriggerSummaryProducerRAW.cc:61
TriggerSummaryProducerRAW::pn_
std::string pn_
process name
Definition: TriggerSummaryProducerRAW.h:43
TriggerSummaryProducerRAW::putToken_
const edm::EDPutTokenT< trigger::TriggerEventWithRefs > putToken_
Definition: TriggerSummaryProducerRAW.h:46
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::GetterOfProducts< trigger::TriggerFilterObjectWithRefs >
edm::EventSetup
Definition: EventSetup.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
InputTag.h
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
trigger::TriggerEventWithRefs::size
size_type size() const
number of filters
Definition: TriggerEventWithRefs.h:180
edm::GetterOfProducts::fillHandles
void fillHandles(edm::Event const &event, std::vector< edm::Handle< T >> &handles) const
Definition: GetterOfProducts.h:142
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::OrphanHandle
Definition: EDProductfwd.h:39
trigger
Definition: HLTPrescaleTableCond.h:8
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
trigger::TriggerEventWithRefs::addFilterObject
void addFilterObject(const edm::InputTag &filterTag, const TriggerFilterObjectWithRefs &tfowr)
setters - to build EDProduct
Definition: TriggerEventWithRefs.h:147
TriggerSummaryProducerRAW::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TriggerSummaryProducerRAW.cc:54
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
edm::Event
Definition: Event.h:73
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW
~TriggerSummaryProducerRAW() override
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11