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 )
60 produces< TriggerEvent >();
78 if ( processHistory.getConfigurationForProcess( iHist->processName(), processConfiguration ) &&
88 LogError(
"autoProcessName" ) <<
"trigger::TriggerEvent product with label '" <<
tagTriggerEvent_.
label() <<
"' not produced according to process history of input data\n"
89 <<
"No trigger information produced.";
92 LogInfo(
"autoProcessName" ) <<
"HLT process name " <<
nameProcess_ <<
" used for PAT trigger information";
110 if ( condRunBlock.
isValid() ) {
114 LogError(
"conditionsInEdm" ) <<
"ConditionsInRunBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in run";
120 bool changed(
true );
122 LogError(
"hltConfigExtraction" ) <<
"HLT config extraction error with process name '" <<
nameProcess_ <<
"'";
124 LogError(
"hltConfigSize" ) <<
"HLT config size error";
139 if ( condLumiBlock.
isValid() ) {
143 LogError(
"conditionsInEdm" ) <<
"ConditionsInLumiBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in lumi";
162 if ( ! handleTriggerResults.
isValid() ) {
164 <<
"No trigger information produced";
178 bool physDecl(
false );
182 if ( handleL1GlobalTriggerReadoutRecord.
isValid() ) {
183 L1GtFdlWord fdlWord = handleL1GlobalTriggerReadoutRecord->gtFdlWord();
188 LogError(
"l1GlobalTriggerReadoutRecordValid" ) <<
"L1GlobalTriggerReadoutRecord product with InputTag '" <<
tagL1Gt_.
encode() <<
"' not in event";
197 std::auto_ptr< TriggerEvent > triggerEvent(
new TriggerEvent( handleL1GtTriggerMenu->gtTriggerMenuName(), std::string(
hltConfig_.
tableName() ), handleTriggerResults->wasrun(), handleTriggerResults->accept(), handleTriggerResults->error(), physDecl ) );
199 if ( handleTriggerAlgorithms.
isValid() ) {
200 triggerEvent->setAlgorithms( handleTriggerAlgorithms );
204 if ( handleTriggerConditions.
isValid() ) {
205 triggerEvent->setConditions( handleTriggerConditions );
209 if ( handleTriggerPaths.
isValid() ) {
210 triggerEvent->setPaths( handleTriggerPaths );
214 if ( handleTriggerFilters.
isValid() ) {
215 triggerEvent->setFilters( handleTriggerFilters );
219 if ( handleTriggerObjects.
isValid() ) {
220 triggerEvent->setObjects( handleTriggerObjects );
239 if ( condEventBlock.
isValid() ) {
240 triggerEvent->setBstMasterStatus( condEventBlock->bstMasterStatus );
241 triggerEvent->setTurnCount( condEventBlock->turnCountNumber );
243 LogError(
"conditionsInEdm" ) <<
"ConditionsInEventBlock product with InputTag '" <<
tagCondGt_.
encode() <<
"' not in event";
248 if ( handleTriggerObjects.
isValid() ) {
254 iEvent.
getByLabel( labelTriggerObjectMatcher, handleTriggerObjectStandAloneMatch );
255 if ( ! handleTriggerObjectStandAloneMatch.isValid() ) {
256 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectStandAloneMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
261 if ( it != itEnd ) iEvent.
get( it->first.id(), handleCands );
263 while ( it != itEnd ) {
264 indices.push_back( it->second.key() );
267 std::auto_ptr< TriggerObjectMatch > triggerObjectMatch(
new TriggerObjectMatch( handleTriggerObjects ) );
269 if ( handleCands.isValid() ) {
270 matchFiller.
insert( handleCands, indices.begin(), indices.
end() );
275 if ( ! handleTriggerObjectMatch.isValid() ) {
276 LogError(
"triggerMatchValid" ) <<
"pat::TriggerObjectMatch product with InputTag '" << labelTriggerObjectMatcher <<
"' not in event";
279 if ( ! ( triggerEvent->addObjectMatchResult( handleTriggerObjectMatch, labelTriggerObjectMatcher ) ) ) {
280 LogWarning(
"triggerObjectMatchReplication" ) <<
"pat::TriggerEvent contains already a pat::TriggerObjectMatch from matcher module '" << labelTriggerObjectMatcher <<
"'";
285 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
bool getByLabel(std::string const &label, Handle< PROD > &result) const
virtual void beginLuminosityBlock(edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup)
virtual void beginRun(edm::Run &iRun, const edm::EventSetup &iSetup)
static PFTauRenderPlugin instance
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.
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Produces the central entry point to full PAT trigger information.
edm::InputTag tagTriggerEvent_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::InputTag tagTriggerProducer_
bool get(ProductID const &oid, Handle< PROD > &result) const
ProcessHistory const & processHistory() const
HLTConfigProvider hltConfig_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< edm::InputTag > tagsTriggerMatcher_
Analysis-level trigger event class.
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::ConditionsInLumiBlock condLumi_
boost::uint16_t beamMomentum