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" ) ) {
77 produces< TriggerEvent >();
95 if ( processHistory.getConfigurationForProcess( iHist->processName(), processConfiguration ) &&
105 LogError(
"autoProcessName" ) <<
"trigger::TriggerEvent product with label '" <<
tagTriggerEvent_.
label() <<
"' not produced according to process history of input data\n" 106 <<
"No trigger information produced.";
109 LogInfo(
"autoProcessName" ) <<
"HLT process name " <<
nameProcess_ <<
" used for PAT trigger information";
127 if ( condRunBlock.
isValid() ) {
131 LogError(
"conditionsInEdm" ) <<
"ConditionsInRunBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in run";
137 bool changed(
true );
139 LogError(
"hltConfigExtraction" ) <<
"HLT config extraction error with process name '" <<
nameProcess_ <<
"'";
141 LogError(
"hltConfigSize" ) <<
"HLT config size error";
156 if ( condLumiBlock.
isValid() ) {
160 LogError(
"conditionsInEdm" ) <<
"ConditionsInLumiBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in lumi";
180 if ( ! handleTriggerResults.
isValid() ) {
182 <<
"No trigger information produced";
196 bool physDecl(
false );
200 if ( handleL1GlobalTriggerReadoutRecord.
isValid() ) {
206 LogError(
"l1GlobalTriggerReadoutRecordValid" ) <<
"L1GlobalTriggerReadoutRecord product with InputTag '" <<
tagL1Gt_.
encode() <<
"' not in event";
217 if ( handleTriggerAlgorithms.
isValid() ) {
218 triggerEvent->setAlgorithms( handleTriggerAlgorithms );
222 if ( handleTriggerConditions.
isValid() ) {
223 triggerEvent->setConditions( handleTriggerConditions );
227 if ( handleTriggerPaths.
isValid() ) {
228 triggerEvent->setPaths( handleTriggerPaths );
232 if ( handleTriggerFilters.
isValid() ) {
233 triggerEvent->setFilters( handleTriggerFilters );
237 if ( handleTriggerObjects.
isValid() ) {
238 triggerEvent->setObjects( handleTriggerObjects );
257 if ( condEventBlock.
isValid() ) {
261 LogError(
"conditionsInEdm" ) <<
"ConditionsInEventBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in event";
266 if ( handleTriggerObjects.
isValid() ) {
273 if ( ! handleTriggerObjectStandAloneMatch.isValid() ) {
274 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectStandAloneMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
279 if ( it != itEnd ) iEvent.
get( it->first.id(), handleCands );
280 std::vector< int > indices;
281 while ( it != itEnd ) {
282 indices.push_back( it->second.key() );
285 auto triggerObjectMatch = std::make_unique<TriggerObjectMatch>(handleTriggerObjects);
287 if ( handleCands.isValid() ) {
288 matchFiller.insert( handleCands, indices.begin(), indices.
end() );
293 if ( ! handleTriggerObjectMatch.isValid() ) {
294 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
297 if ( ! ( triggerEvent->addObjectMatchResult( handleTriggerObjectMatch, labelTriggerObjectMatcher ) ) ) {
298 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
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
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
#define DEFINE_FWK_MODULE(type)
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
const std::string & tableName() const
HLT ConfDB table name.
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 >
edm::EDGetTokenT< edm::ConditionsInLumiBlock > tagCondGtLumiToken_
Produces the central entry point to full PAT trigger information.
edm::InputTag tagTriggerEvent_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
boost::uint32_t totalIntensityBeam2
Helper class that fetches some type of Ref given ProductID and index, using the edm::Event.
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_
virtual void beginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtToken_
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
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< TriggerFilterCollection > triggerFilterCollectionToken_
edm::EDGetTokenT< TriggerPathCollection > triggerPathCollectionToken_
edm::EDGetTokenT< TriggerAlgorithmCollection > triggerAlgorithmCollectionToken_