CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTFilter.cc
Go to the documentation of this file.
1 
15 
19 
21  EDFilter(),
22  saveTags_(config.getParameter<bool>("saveTags"))
23 {
24  // register common HLTFilter 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 HLTFilter 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 HLTFilter
46  return result;
47 }
48 
49 int HLTFilter::path(edm::Event const& event) const {
50  return static_cast<int>(event.moduleCallingContext()->placeInPathContext()->pathContext()->pathID());
51 }
52 
53 int HLTFilter::module(edm::Event const& event) const {
54  return static_cast<int>(event.moduleCallingContext()->placeInPathContext()->placeInPath());
55 }
56 
57 std::pair<int,int> HLTFilter::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 }
virtual ~HLTFilter()
Definition: HLTFilter.cc:33
std::pair< int, int > pmid(edm::Event const &) const
Definition: HLTFilter.cc:57
bool filter(edm::StreamID, edm::Event &event, const edm::EventSetup &setup) const overridefinal
Definition: HLTFilter.cc:36
std::string const & moduleLabel() const
PathContext const * pathContext() const
tuple result
Definition: query.py:137
const std::string * pathName(edm::Event const &) const
Definition: HLTFilter.cc:63
int module(edm::Event const &) const
Definition: HLTFilter.cc:53
virtual bool hltFilter(edm::Event &event, const edm::EventSetup &setup, trigger::TriggerFilterObjectWithRefs &filterobject) const =0
unsigned int pathID() const
Definition: PathContext.h:39
ModuleDescription const & moduleDescription() const
Definition: EDFilterBase.h:63
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
const std::string * moduleLabel() const
Definition: HLTFilter.cc:67
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:20
int path(edm::Event const &) const
Definition: HLTFilter.cc:49
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
Definition: HLTFilter.cc:29
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")