ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/grimes/L1Menu/interface/l1menu/implementation/MenuRateImplementation.h
Revision: 1.2
Committed: Wed Jul 24 11:48:54 2013 UTC (11 years, 9 months ago) by grimes
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +12 -3 lines
Log Message:
Big commit of lots of changes before migrating to Git.

File Contents

# User Rev Content
1 grimes 1.1 #ifndef l1menu_implementation_MenuRateImplementation_h
2     #define l1menu_implementation_MenuRateImplementation_h
3    
4     #include "l1menu/IMenuRate.h"
5     #include <vector>
6     #include "l1menu/implementation/TriggerRateImplementation.h"
7    
8     //
9     // Forward declarations
10     //
11     namespace l1menu
12     {
13     class ITrigger;
14     class ITriggerRate;
15 grimes 1.2 class TriggerMenu;
16     class ISample;
17 grimes 1.1 }
18    
19    
20     namespace l1menu
21     {
22     namespace implementation
23     {
24     /** @brief Implementation of the IMenuRate interface.
25     *
26     * @author Mark Grimes (mark.grimes@bristol.ac.uk)
27     * @date 28/Jun/2013
28     */
29     class MenuRateImplementation : public l1menu::IMenuRate
30     {
31     public:
32 grimes 1.2 MenuRateImplementation( const l1menu::TriggerMenu& menu, const l1menu::ISample& sample );
33     float weightOfAllEvents() const;
34     float weightOfAllEventsPassingAnyTrigger() const;
35     void setWeightOfAllEvents( float weightOfAllEvents );
36     void setWeightOfEventsPassingAnyTrigger( float weightOfEventsPassingAnyTrigger );
37    
38 grimes 1.1 void setScaling( float scaling );
39     float scaling() const;
40 grimes 1.2 void addTriggerRate( const l1menu::ITrigger& trigger, float weightOfEventsPassingTheTrigger, float weightOfEventsOnlyPassingTheTrigger );
41 grimes 1.1 // Methods required by the l1menu::IMenuRate interface
42     virtual float totalFraction() const;
43     virtual float totalRate() const;
44     virtual const std::vector<const l1menu::ITriggerRate*>& triggerRates() const;
45     protected:
46 grimes 1.2 float weightOfAllEvents_;
47     float weightOfEventsPassingAnyTrigger_;
48 grimes 1.1 float scaling_;
49     std::vector<TriggerRateImplementation> triggerRates_;
50 grimes 1.2 private:
51 grimes 1.1 mutable std::vector<const l1menu::ITriggerRate*> baseClassReferences_;
52     };
53    
54    
55     } // end of the implementation namespace
56     } // end of the l1menu namespace
57     #endif