30 nameProcess_( iConfig.getParameter<
std::
string >(
"processName" ) ),
31 autoProcessName_( nameProcess_ ==
"*" ),
32 tagTriggerProducer_(
"patTrigger" ),
33 tagsTriggerMatcher_(),
37 hltConfigInit_(
false ),
39 tagTriggerResults_(
"TriggerResults" ),
40 tagTriggerEvent_(
"hltTriggerSummaryAOD" ),
46 gtCondRunInit_(
false ),
47 gtCondLumiInit_(
false )
59 if ( iConfig.
exists(
"condGtTag" ) ) {
79 produces< TriggerEvent >();
97 if ( processHistory.getConfigurationForProcess( iHist->processName(), processConfiguration ) &&
107 LogError(
"autoProcessName" ) <<
"trigger::TriggerEvent product with label '" <<
tagTriggerEvent_.
label() <<
"' not produced according to process history of input data\n" 108 <<
"No trigger information produced.";
111 LogInfo(
"autoProcessName" ) <<
"HLT process name " <<
nameProcess_ <<
" used for PAT trigger information";
129 if ( condRunBlock.
isValid() ) {
133 LogError(
"conditionsInEdm" ) <<
"ConditionsInRunBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in run";
139 bool changed(
true );
141 LogError(
"hltConfigExtraction" ) <<
"HLT config extraction error with process name '" <<
nameProcess_ <<
"'";
143 LogError(
"hltConfigSize" ) <<
"HLT config size error";
158 if ( condLumiBlock.
isValid() ) {
162 LogError(
"conditionsInEdm" ) <<
"ConditionsInLumiBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in lumi";
182 if ( ! handleTriggerResults.
isValid() ) {
184 <<
"No trigger information produced";
198 bool physDecl(
false );
202 if ( handleL1GlobalTriggerReadoutRecord.
isValid() ) {
208 LogError(
"l1GlobalTriggerReadoutRecordValid" ) <<
"L1GlobalTriggerReadoutRecord product with InputTag '" <<
tagL1Gt_.
encode() <<
"' not in event";
219 if ( handleTriggerAlgorithms.
isValid() ) {
220 triggerEvent->setAlgorithms( handleTriggerAlgorithms );
224 if ( handleTriggerConditions.
isValid() ) {
225 triggerEvent->setConditions( handleTriggerConditions );
229 if ( handleTriggerPaths.
isValid() ) {
230 triggerEvent->setPaths( handleTriggerPaths );
234 if ( handleTriggerFilters.
isValid() ) {
235 triggerEvent->setFilters( handleTriggerFilters );
239 if ( handleTriggerObjects.
isValid() ) {
240 triggerEvent->setObjects( handleTriggerObjects );
259 if ( condEventBlock.
isValid() ) {
263 LogError(
"conditionsInEdm" ) <<
"ConditionsInEventBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in event";
268 if ( handleTriggerObjects.
isValid() ) {
275 if ( ! handleTriggerObjectStandAloneMatch.isValid() ) {
276 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectStandAloneMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
279 auto it = makeAssociativeIterator< reco::CandidateBaseRef>( *handleTriggerObjectStandAloneMatch,
iEvent );
280 auto itEnd = it.end();
282 if ( it != itEnd ) iEvent.
get( it->first.id(), handleCands );
283 std::vector< int > indices;
284 while ( it != itEnd ) {
285 indices.push_back( it->second.key() );
288 auto triggerObjectMatch = std::make_unique<TriggerObjectMatch>(handleTriggerObjects);
291 matchFiller.insert( handleCands, indices.begin(), indices.end() );
296 if ( ! handleTriggerObjectMatch.isValid() ) {
297 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
300 if ( ! ( triggerEvent->addObjectMatchResult( handleTriggerObjectMatch, labelTriggerObjectMatcher ) ) ) {
301 LogWarning(
"triggerObjectMatchReplication" ) <<
"pat::TriggerEvent contains already a pat::TriggerObjectMatch from matcher module '" << labelTriggerObjectMatcher <<
"'";
unsigned int size() const
number of trigger paths in trigger table
collection_type::const_iterator const_iterator
T getParameter(std::string const &) const
bool wasrun() const
Was at least one path run?
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< TriggerConditionCollection > triggerConditionCollectionToken_
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool accept() const
Has at least one path accepted the event?
boost::uint32_t lhcFillNumber
bool exists(std::string const ¶meterName) const
checks if a parameter exists
boost::uint32_t totalIntensityBeam1
std::string const & processName() const
const std::string & tableName() const
HLT ConfDB table name.
edm::EDGetTokenT< edm::ConditionsInLumiBlock > tagCondGtLumiToken_
Produces the central entry point to full PAT trigger information.
edm::InputTag tagTriggerEvent_
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
#define DEFINE_FWK_MODULE(type)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
boost::uint32_t totalIntensityBeam2
PATTriggerEventProducer(const edm::ParameterSet &iConfig)
edm::GetterOfProducts< edm::TriggerResults > triggerResultsGetter_
bool error() const
Has any path encountered an error (exception)
edm::EDGetTokenT< TriggerObjectCollection > triggerObjectCollectionToken_
edm::InputTag tagTriggerProducer_
bool get(ProductID const &oid, Handle< PROD > &result) const
ProcessHistory const & processHistory() const
std::vector< edm::EDGetTokenT< TriggerObjectStandAloneMatch > > triggerMatcherTokens_
HLTConfigProvider hltConfig_
boost::uint16_t bstMasterStatus
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< edm::InputTag > tagsTriggerMatcher_
void beginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtToken_
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
const cms_uint16_t physicsDeclared() const
get/set "physics declared" bit
edm::InputTag tagTriggerResults_
edm::ConditionsInRunBlock condRun_
edm::EDGetTokenT< edm::ConditionsInRunBlock > tagCondGtRunToken_
boost::uint32_t turnCountNumber
edm::EDGetTokenT< edm::ConditionsInEventBlock > tagCondGtEventToken_
edm::ConditionsInLumiBlock condLumi_
boost::uint16_t beamMomentum
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< TriggerFilterCollection > triggerFilterCollectionToken_
edm::EDGetTokenT< TriggerPathCollection > triggerPathCollectionToken_
edm::EDGetTokenT< TriggerAlgorithmCollection > triggerAlgorithmCollectionToken_