CMS 3D CMS Logo

TriggerPath.cc
Go to the documentation of this file.
1 //
2 //
3 
4 
6 
7 
8 using namespace pat;
9 
10 
11 // Constructors and Destructor
12 
13 
14 // Default constructor
16  name_(),
17  index_(),
18  prescale_(),
19  run_(),
20  accept_(),
21  error_(),
22  lastActiveFilterSlot_(),
23  l3Filters_( 0 )
24 {
25  modules_.clear();
26  filterIndices_.clear();
27 }
28 
29 
30 // Constructor from path name only
32  name_( name ),
33  index_(),
34  prescale_(),
35  run_(),
36  accept_(),
37  error_(),
39  l3Filters_( 0 )
40 {
41  modules_.clear();
42  filterIndices_.clear();
43 }
44 
45 
46 // Constructor from values
47 TriggerPath::TriggerPath( const std::string & name, unsigned index, unsigned prescale, bool run, bool accept, bool error, unsigned lastActiveFilterSlot, unsigned l3Filters ) :
48  name_( name ),
49  index_( index ),
50  prescale_( prescale ),
51  run_( run ),
52  accept_( accept ),
53  error_( error ),
54  lastActiveFilterSlot_( lastActiveFilterSlot ),
55  l3Filters_( l3Filters )
56 {
57  modules_.clear();
58  filterIndices_.clear();
59 }
60 
61 
62 // Methods
63 
64 
65 // Get the index of a certain module
67 {
68  if ( modules_.begin() == modules_.end() ) return -1;
69  return ( std::find( modules_.begin(), modules_.end(), name ) - modules_.begin() );
70 }
71 
72 
73 // Get names of all L1 seeds with a certain decision
74 std::vector< std::string > TriggerPath::l1Seeds( const bool decision ) const
75 {
76 
77  std::vector< std::string > seeds;
78  for ( L1SeedCollection::const_iterator iSeed = l1Seeds().begin(); iSeed != l1Seeds().end(); ++iSeed ) {
79  if ( iSeed->first == decision ) seeds.push_back( iSeed->second );
80  }
81  return seeds;
82 
83 }
const L1SeedCollection & l1Seeds() const
Get all L1 seeds.
Definition: TriggerPath.h:141
unsigned prescale_
Pre-scale.
Definition: TriggerPath.h:48
bool accept_
Did path succeed?
Definition: TriggerPath.h:52
bool run_
Was path run?
Definition: TriggerPath.h:50
int indexModule(const std::string &name) const
Definition: TriggerPath.cc:66
std::vector< std::string > modules_
Definition: TriggerPath.h:59
std::vector< unsigned > filterIndices_
Definition: TriggerPath.h:64
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
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:44
Definition: HeavyIon.h:7
unsigned l3Filters_
Definition: TriggerPath.h:69
unsigned prescale() const
Get the path pre-scale.
Definition: TriggerPath.h:117
unsigned l3Filters() const
Definition: TriggerPath.h:128
TriggerPath()
Constructors and Desctructor.
Definition: TriggerPath.cc:15
bool error_
Was path in error?
Definition: TriggerPath.h:54
const std::string & name() const
Get the path name.
Definition: TriggerPath.h:113
unsigned index() const
Get the path index.
Definition: TriggerPath.h:115
#define begin
Definition: vmac.h:32
unsigned lastActiveFilterSlot_
Index of the last active filter in the list of modules.
Definition: TriggerPath.h:66
unsigned lastActiveFilterSlot() const
Get the index of the last active filter.
Definition: TriggerPath.h:125
unsigned index_
Path index in trigger table.
Definition: TriggerPath.h:46