CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_(),
38  lastActiveFilterSlot_(),
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
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:7
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:24
TriggerPath()
Constructors and Desctructor.
Definition: TriggerPath.cc:15
const std::string & name() const
Get the path name.
Definition: TriggerPath.h:113
#define begin
Definition: vmac.h:30