1 |
grimes |
1.1 |
#ifndef l1menu_implementation_TriggerRateImplementation_h
|
2 |
|
|
#define l1menu_implementation_TriggerRateImplementation_h
|
3 |
|
|
|
4 |
|
|
#include "l1menu/ITriggerRate.h"
|
5 |
|
|
#include <vector>
|
6 |
|
|
#include <memory>
|
7 |
|
|
|
8 |
|
|
//
|
9 |
|
|
// Forward declarations
|
10 |
|
|
//
|
11 |
|
|
namespace l1menu
|
12 |
|
|
{
|
13 |
|
|
class ITrigger;
|
14 |
|
|
namespace implementation
|
15 |
|
|
{
|
16 |
|
|
class MenuRateImplementation;
|
17 |
|
|
}
|
18 |
|
|
}
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
namespace l1menu
|
22 |
|
|
{
|
23 |
|
|
namespace implementation
|
24 |
|
|
{
|
25 |
|
|
/** @brief Implementation of the ITriggerRate interface.
|
26 |
|
|
*
|
27 |
|
|
* @author Mark Grimes (mark.grimes@bristol.ac.uk)
|
28 |
|
|
* @date 28/Jun/2013
|
29 |
|
|
*/
|
30 |
|
|
class TriggerRateImplementation : public l1menu::ITriggerRate
|
31 |
|
|
{
|
32 |
|
|
public:
|
33 |
grimes |
1.2 |
TriggerRateImplementation( const l1menu::ITrigger& trigger, float weightOfEventsPassingThisTrigger, float weightOfEventsOnlyPassingThisTrigger, const MenuRateImplementation& menuRate );
|
34 |
grimes |
1.1 |
TriggerRateImplementation& operator=( TriggerRateImplementation&& otherTriggerRate ); // Move assignment
|
35 |
|
|
virtual ~TriggerRateImplementation();
|
36 |
|
|
|
37 |
|
|
// Methods required by the l1menu::ITriggerRate interface
|
38 |
|
|
virtual const l1menu::ITrigger& trigger() const;
|
39 |
|
|
virtual float fraction() const;
|
40 |
|
|
virtual float rate() const;
|
41 |
grimes |
1.2 |
virtual float pureFraction() const;
|
42 |
|
|
virtual float pureRate() const;
|
43 |
grimes |
1.1 |
protected:
|
44 |
|
|
std::unique_ptr<l1menu::ITrigger> pTrigger_;
|
45 |
grimes |
1.2 |
float weightOfEventsPassingThisTrigger_;
|
46 |
|
|
float weightOfEventsOnlyPassingThisTrigger_;
|
47 |
grimes |
1.1 |
const MenuRateImplementation& menuRate_;
|
48 |
|
|
};
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
} // end of the implementation namespace
|
52 |
|
|
} // end of the l1menu namespace
|
53 |
|
|
#endif
|