28 nameProcess_( iConfig.getParameter< std::
string >(
"processName" ) ),
29 autoProcessName_( nameProcess_ ==
"*" ),
30 tagTriggerProducer_(
"patTrigger" ),
31 tagsTriggerMatcher_(),
35 hltConfigInit_(
false ),
37 tagTriggerResults_(
"TriggerResults" ),
38 tagTriggerEvent_(
"hltTriggerSummaryAOD" ),
44 gtCondRunInit_(
false ),
45 gtCondLumiInit_(
false )
56 if ( iConfig.
exists(
"condGtTag" ) ) {
70 produces< TriggerEvent >();
98 LogError(
"autoProcessName" ) <<
"trigger::TriggerEvent product with label '" <<
tagTriggerEvent_.
label() <<
"' not produced according to process history of input data\n"
99 <<
"No trigger information produced.";
102 LogInfo(
"autoProcessName" ) <<
"HLT process name " <<
nameProcess_ <<
" used for PAT trigger information";
121 if ( condRunBlock.
isValid() ) {
125 LogError(
"conditionsInEdm" ) <<
"ConditionsInRunBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in run";
131 bool changed(
true );
133 LogError(
"hltConfigExtraction" ) <<
"HLT config extraction error with process name '" <<
nameProcess_ <<
"'";
135 LogError(
"hltConfigSize" ) <<
"HLT config size error";
150 if ( condLumiBlock.
isValid() ) {
154 LogError(
"conditionsInEdm" ) <<
"ConditionsInLumiBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in lumi";
174 if ( ! handleTriggerResults.
isValid() ) {
176 <<
"No trigger information produced";
190 bool physDecl(
false );
194 if ( handleL1GlobalTriggerReadoutRecord.
isValid() ) {
195 L1GtFdlWord fdlWord = handleL1GlobalTriggerReadoutRecord->gtFdlWord();
200 LogError(
"l1GlobalTriggerReadoutRecordValid" ) <<
"L1GlobalTriggerReadoutRecord product with InputTag '" <<
tagL1Gt_.
encode() <<
"' not in event";
209 std::auto_ptr< TriggerEvent > triggerEvent(
new TriggerEvent( handleL1GtTriggerMenu->gtTriggerMenuName(),
std::string(
hltConfig_.
tableName() ), handleTriggerResults->wasrun(), handleTriggerResults->accept(), handleTriggerResults->error(), physDecl ) );
211 if ( handleTriggerAlgorithms.
isValid() ) {
212 triggerEvent->setAlgorithms( handleTriggerAlgorithms );
216 if ( handleTriggerConditions.
isValid() ) {
217 triggerEvent->setConditions( handleTriggerConditions );
221 if ( handleTriggerPaths.
isValid() ) {
222 triggerEvent->setPaths( handleTriggerPaths );
226 if ( handleTriggerFilters.
isValid() ) {
227 triggerEvent->setFilters( handleTriggerFilters );
231 if ( handleTriggerObjects.
isValid() ) {
232 triggerEvent->setObjects( handleTriggerObjects );
251 if ( condEventBlock.
isValid() ) {
252 triggerEvent->setBstMasterStatus( condEventBlock->bstMasterStatus );
253 triggerEvent->setTurnCount( condEventBlock->turnCountNumber );
255 LogError(
"conditionsInEdm" ) <<
"ConditionsInEventBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in event";
260 if ( handleTriggerObjects.
isValid() ) {
267 if ( ! handleTriggerObjectStandAloneMatch.isValid() ) {
268 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectStandAloneMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
273 if ( it != itEnd ) iEvent.
get( it->first.id(), handleCands );
274 std::vector< int > indices;
275 while ( it != itEnd ) {
276 indices.push_back( it->second.key() );
279 std::auto_ptr< TriggerObjectMatch > triggerObjectMatch(
new TriggerObjectMatch( handleTriggerObjects ) );
281 if ( handleCands.isValid() ) {
282 matchFiller.
insert( handleCands, indices.begin(), indices.
end() );
287 if ( ! handleTriggerObjectMatch.isValid() ) {
288 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
291 if ( ! ( triggerEvent->addObjectMatchResult( handleTriggerObjectMatch, labelTriggerObjectMatcher ) ) ) {
292 LogWarning(
"triggerObjectMatchReplication" ) <<
"pat::TriggerEvent contains already a pat::TriggerObjectMatch from matcher module '" << labelTriggerObjectMatcher <<
"'";
297 iEvent.
put( triggerEvent );
unsigned int size() const
number of trigger paths in trigger table
collection_type::const_iterator const_iterator
T getParameter(std::string const &) const
edm::EDGetTokenT< TriggerConditionCollection > triggerConditionCollectionToken_
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::Association< TriggerObjectCollection > TriggerObjectMatch
Association of TriggerObjects to store matches to Candidates.
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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::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_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< edm::InputTag > tagsTriggerMatcher_
Analysis-level trigger event class.
virtual void beginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtToken_
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_
edm::EDGetTokenT< edm::ConditionsInEventBlock > tagCondGtEventToken_
edm::ConditionsInLumiBlock condLumi_
boost::uint16_t beamMomentum
volatile std::atomic< bool > shutdown_flag false
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< TriggerFilterCollection > triggerFilterCollectionToken_
edm::EDGetTokenT< TriggerPathCollection > triggerPathCollectionToken_
edm::EDGetTokenT< TriggerAlgorithmCollection > triggerAlgorithmCollectionToken_