Skip to content

Commit

Permalink
Merge pull request #7108 from fwyzard/TriggerResultFilter_update_74x
Browse files Browse the repository at this point in the history
TriggerResultFilters: accept arbitrary Path names
  • Loading branch information
cmsbuild committed Jan 14, 2015
2 parents 51761f8 + 5535045 commit ff55fbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 2 additions & 4 deletions DQMOffline/Trigger/python/FSQHLTOfflineSource_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def getHighMultVPSet():
ret.append(tracksCount)

tracksCountDenom = tracksCount.clone()
alwaysTrue = partialPathName+"*" + " OR NOT " + partialPathName+"*"
tracksCountDenom.triggerSelection = cms.string(alwaysTrue)
tracksCountDenom.triggerSelection = cms.string( "TRUE" )
tracksCountDenom.combinedObjectDrawables = cms.VPSet(
cms.PSet (name = cms.string("count_denominator"), expression = cms.string("at(0)"),
bins = cms.int32(tracksBins), min = cms.double(tracksL), max = cms.double(tracksH))
Expand Down Expand Up @@ -338,9 +337,8 @@ def getPTAveVPSet():
ret.append(recoPFtopology)
recoPFtopologyDenom = recoPFtopology.clone()
#recoPFtopologyDenom.triggerSelection = cms.string("HLTriggerFirstPath*")
alwaysTrue = partialPathName+"*" + " OR NOT " + partialPathName+"*"
#recoPFtopologyDenom.triggerSelection = cms.string(partialPathName+"*")
recoPFtopologyDenom.triggerSelection = cms.string(alwaysTrue)
recoPFtopologyDenom.triggerSelection = cms.string( "TRUE" )
recoPFtopologyDenom.combinedObjectDrawables = cms.VPSet(
cms.PSet (name = cms.string("ptAve_denominator"), expression = cms.string("(at(0).pt+at(1).pt)/2"),
bins = cms.int32(ptBins), min = cms.double(ptBinLow), max = cms.double(ptBinHigh) )
Expand Down
13 changes: 8 additions & 5 deletions DQMOffline/Trigger/src/FSQDiJetAve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ namespace FSQ {
//################################################################################################
class BaseHandler {
public:
BaseHandler();
~BaseHandler(){
delete m_expression;
}
virtual ~BaseHandler() { }

BaseHandler(const edm::ParameterSet& iConfig, triggerExpression::Data & eventCache):
m_expression(triggerExpression::parse( iConfig.getParameter<std::string>("triggerSelection")))
{
if (not m_expression)
edm::LogError("FSQ::BaseHandler") << "Failed to parse TriggerResults expression '" << iConfig.getParameter<std::string>("triggerSelection") << "'";

// extract list of used paths
std::vector<std::string> strs;
std::string triggerSelection = iConfig.getParameter<std::string>("triggerSelection");
Expand All @@ -92,7 +93,7 @@ class BaseHandler {
virtual void book(DQMStore::IBooker & booker) = 0;
virtual void getAndStoreTokens(edm::ConsumesCollector && iC) = 0;

triggerExpression::Evaluator * m_expression;
std::unique_ptr<triggerExpression::Evaluator> m_expression;
triggerExpression::Data * m_eventCache;
std::string m_dirname;
std::map<std::string, MonitorElement*> m_histos;
Expand Down Expand Up @@ -319,6 +320,8 @@ class HandlerTemplate: public BaseHandler {
return;
}

if (not m_expression)
return;
if (m_eventCache->configurationUpdated()) {
m_expression->init(*m_eventCache);
}
Expand Down

0 comments on commit ff55fbb

Please sign in to comment.