CMS 3D CMS Logo

TriggerPath.cc
Go to the documentation of this file.
1 //
2 //
3 
5 
6 using namespace pat;
7 
8 // Constructors and Destructor
9 
10 // Default constructor
12  : name_(), index_(), prescale_(), run_(), accept_(), error_(), lastActiveFilterSlot_(), l3Filters_(0) {
13  modules_.clear();
14  filterIndices_.clear();
15 }
16 
17 // Constructor from path name only
20  modules_.clear();
21  filterIndices_.clear();
22 }
23 
24 // Constructor from values
26  unsigned index,
27  unsigned prescale,
28  bool run,
29  bool accept,
30  bool error,
31  unsigned lastActiveFilterSlot,
32  unsigned l3Filters)
33  : name_(name),
34  index_(index),
35  prescale_(prescale),
36  run_(run),
37  accept_(accept),
38  error_(error),
39  lastActiveFilterSlot_(lastActiveFilterSlot),
40  l3Filters_(l3Filters) {
41  modules_.clear();
42  filterIndices_.clear();
43 }
44 
45 // Methods
46 
47 // Get the index of a certain module
49  if (modules_.begin() == modules_.end())
50  return -1;
51  return (std::find(modules_.begin(), modules_.end(), name) - modules_.begin());
52 }
53 
54 // Get names of all L1 seeds with a certain decision
55 std::vector<std::string> TriggerPath::l1Seeds(const bool decision) const {
56  std::vector<std::string> seeds;
57  for (L1SeedCollection::const_iterator iSeed = l1Seeds().begin(); iSeed != l1Seeds().end(); ++iSeed) {
58  if (iSeed->first == decision)
59  seeds.push_back(iSeed->second);
60  }
61  return seeds;
62 }
std::vector< unsigned > filterIndices_
Definition: TriggerPath.h:60
const L1SeedCollection & l1Seeds() const
Get all L1 seeds.
Definition: TriggerPath.h:143
unsigned prescale_
Pre-scale.
Definition: TriggerPath.h:44
bool accept_
Did path succeed?
Definition: TriggerPath.h:48
std::vector< std::string > modules_
Definition: TriggerPath.h:55
bool run_
Was path run?
Definition: TriggerPath.h:46
int indexModule(const std::string &name) const
Definition: TriggerPath.cc:48
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:30
std::string name_
Data Members.
Definition: TriggerPath.h:40
Definition: HeavyIon.h:7
unsigned l3Filters_
Definition: TriggerPath.h:65
unsigned l3Filters() const
Definition: TriggerPath.h:130
TriggerPath()
Constructors and Desctructor.
Definition: TriggerPath.cc:11
bool error_
Was path in error?
Definition: TriggerPath.h:50
const std::string & name() const
Get the path name.
Definition: TriggerPath.h:115
unsigned index() const
Get the path index.
Definition: TriggerPath.h:117
#define begin
Definition: vmac.h:32
unsigned lastActiveFilterSlot_
Index of the last active filter in the list of modules.
Definition: TriggerPath.h:62
unsigned lastActiveFilterSlot() const
Get the index of the last active filter.
Definition: TriggerPath.h:127
unsigned index_
Path index in trigger table.
Definition: TriggerPath.h:42