CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTStreamFilter.cc
Go to the documentation of this file.
1 
15 
19 
21  EDFilter(),
22  saveTags_(config.getParameter<bool>("saveTags"))
23 {
24  // register common HLTStreamFilter products
25  produces<trigger::TriggerFilterObjectWithRefs>();
26 }
27 
28 void
30  desc.add<bool>("saveTags",false);
31 }
32 
34 { }
35 
37  std::auto_ptr<trigger::TriggerFilterObjectWithRefs> filterproduct( new trigger::TriggerFilterObjectWithRefs(path(event), module(event)) );
38 
39  // compute the result of the HLTStreamFilter implementation
40  bool result = hltFilter(event, setup, * filterproduct);
41 
42  // put filter object into the Event
43  event.put(filterproduct);
44 
45  // retunr the result of the HLTStreamFilter
46  return result;
47 }
48 
50  return static_cast<int>(event.moduleCallingContext()->placeInPathContext()->pathContext()->pathID());
51 }
52 
54  return static_cast<int>(event.moduleCallingContext()->placeInPathContext()->placeInPath());
55 }
56 
57 std::pair<int,int> HLTStreamFilter::pmid(edm::Event const& event) const {
58  edm::PlaceInPathContext const* placeInPathContext = event.moduleCallingContext()->placeInPathContext();
59  return std::make_pair(static_cast<int>(placeInPathContext->pathContext()->pathID()),
60  static_cast<int>(placeInPathContext->placeInPath()));
61 }
62 
64  return &event.moduleCallingContext()->placeInPathContext()->pathContext()->pathName();
65 }
66 
68  return &moduleDescription().moduleLabel();
69 }
int module(edm::Event const &) const
bool filter(edm::Event &event, const edm::EventSetup &setup) overridefinal
virtual ~HLTStreamFilter()
ModuleDescription const & moduleDescription() const
Definition: EDFilterBase.h:58
std::string const & moduleLabel() const
const std::string * pathName(edm::Event const &) const
virtual bool hltFilter(edm::Event &event, const edm::EventSetup &setup, trigger::TriggerFilterObjectWithRefs &filterobject)=0
PathContext const * pathContext() const
HLTStreamFilter(const edm::ParameterSet &config)
tuple result
Definition: query.py:137
const std::string * moduleLabel() const
std::pair< int, int > pmid(edm::Event const &) const
unsigned int pathID() const
Definition: PathContext.h:39
ParameterDescriptionBase * add(U const &iLabel, T const &value)
unsigned int placeInPath() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int path(edm::Event const &) const
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")