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  << " 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() << 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
120  LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size();
121 
122  return;
123 }
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:46
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
Service.h
OrphanHandle.h
ProcessMatch.h
Provenance.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
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:233
edm::ParameterSet
Definition: ParameterSet.h:47
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
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:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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:215
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:234
trigger::TriggerEventWithRefs::addFilterObject
void addFilterObject(const edm::InputTag &filterTag, const TriggerFilterObjectWithRefs &tfowr)
setters - to build EDProduct
Definition: TriggerEventWithRefs.h:175
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