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 // $Id: TriggerPath.cc,v 1.7 2011/05/24 15:56:25 vadler Exp $
3 //
4 
5 
7 
8 
9 using namespace pat;
10 
11 
12 // Constructors and Destructor
13 
14 
15 // Default constructor
17  name_(),
18  index_(),
19  prescale_(),
20  run_(),
21  accept_(),
22  error_(),
23  lastActiveFilterSlot_(),
24  l3Filters_( 0 )
25 {
26  modules_.clear();
27  filterIndices_.clear();
28 }
29 
30 
31 // Constructor from path name only
33  name_( name ),
34  index_(),
35  prescale_(),
36  run_(),
37  accept_(),
38  error_(),
39  lastActiveFilterSlot_(),
40  l3Filters_( 0 )
41 {
42  modules_.clear();
43  filterIndices_.clear();
44 }
45 
46 
47 // Constructor from values
48 TriggerPath::TriggerPath( const std::string & name, unsigned index, unsigned prescale, bool run, bool accept, bool error, unsigned lastActiveFilterSlot, unsigned l3Filters ) :
49  name_( name ),
50  index_( index ),
51  prescale_( prescale ),
52  run_( run ),
53  accept_( accept ),
54  error_( error ),
55  lastActiveFilterSlot_( lastActiveFilterSlot ),
56  l3Filters_( l3Filters )
57 {
58  modules_.clear();
59  filterIndices_.clear();
60 }
61 
62 
63 // Methods
64 
65 
66 // Get the index of a certain module
68 {
69  if ( modules_.begin() == modules_.end() ) return -1;
70  return ( std::find( modules_.begin(), modules_.end(), name ) - modules_.begin() );
71 }
72 
73 
74 // Get names of all L1 seeds with a certain decision
75 std::vector< std::string > TriggerPath::l1Seeds( const bool decision ) const
76 {
77 
78  std::vector< std::string > seeds;
79  for ( L1SeedCollection::const_iterator iSeed = l1Seeds().begin(); iSeed != l1Seeds().end(); ++iSeed ) {
80  if ( iSeed->first == decision ) seeds.push_back( iSeed->second );
81  }
82  return seeds;
83 
84 }
const L1SeedCollection & l1Seeds() const
Get all L1 seeds.
Definition: TriggerPath.h:143
int indexModule(const std::string &name) const
Definition: TriggerPath.cc:67
std::vector< std::string > modules_
Definition: TriggerPath.h:61
std::vector< unsigned > filterIndices_
Definition: TriggerPath.h:66
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:22
TriggerPath()
Constructors and Desctructor.
Definition: TriggerPath.cc:16
const std::string & name() const
Get the path name.
Definition: TriggerPath.h:115
#define begin
Definition: vmac.h:31