CMS 3D CMS Logo

TriggerPath.cc
Go to the documentation of this file.
2 
3 // Constructors and Destructor
4 
5 // Default constructor
7  : name_(), index_(), prescale_(), run_(), accept_(), error_(), lastActiveFilterSlot_(), l3Filters_(0) {
8  modules_.clear();
9  filterIndices_.clear();
10 }
11 
12 // Constructor from path name only
14  : name_(name), index_(), prescale_(), run_(), accept_(), error_(), lastActiveFilterSlot_(), l3Filters_(0) {
15  modules_.clear();
16  filterIndices_.clear();
17 }
18 
19 // Constructor from values
21  unsigned index,
22  double prescale,
23  bool run,
24  bool accept,
25  bool error,
26  unsigned lastActiveFilterSlot,
27  unsigned l3Filters)
28  : name_(name),
29  index_(index),
30  prescale_(prescale),
31  run_(run),
32  accept_(accept),
33  error_(error),
34  lastActiveFilterSlot_(lastActiveFilterSlot),
35  l3Filters_(l3Filters) {
36  modules_.clear();
37  filterIndices_.clear();
38 }
39 
40 // Methods
41 
42 // Get the index of a certain module
44  if (modules_.begin() == modules_.end())
45  return -1;
46  return (std::find(modules_.begin(), modules_.end(), name) - modules_.begin());
47 }
48 
49 // Get names of all L1 seeds with a certain decision
50 std::vector<std::string> pat::TriggerPath::l1Seeds(const bool decision) const {
51  std::vector<std::string> seeds;
52  for (L1SeedCollection::const_iterator iSeed = l1Seeds().begin(); iSeed != l1Seeds().end(); ++iSeed) {
53  if (iSeed->first == decision)
54  seeds.push_back(iSeed->second);
55  }
56  return seeds;
57 }
std::vector< unsigned > filterIndices_
Definition: TriggerPath.h:61
TriggerPath()
Constructors and Desctructor.
Definition: TriggerPath.cc:6
std::vector< std::string > modules_
Definition: TriggerPath.h:56
const L1SeedCollection & l1Seeds() const
Get all L1 seeds.
Definition: TriggerPath.h:150
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
int indexModule(const std::string &name) const
Definition: TriggerPath.cc:43