10 |
|
|
11 |
|
|
12 |
|
class YieldStats { |
13 |
– |
|
14 |
– |
|
13 |
|
public: |
14 |
< |
typedef std::vector<std::vector<double> > YieldMap; |
17 |
< |
|
18 |
< |
YieldStats(std::string yieldName); |
14 |
> |
YieldStats(std::string sampleName, std::string yieldName); |
15 |
|
~YieldStats(){;} |
16 |
|
YieldStats(){;} |
21 |
– |
void InitialiseStepNames(std::vector<std::string> const& stepNames); |
22 |
– |
void InitialiseStepNames(unsigned, ... ); |
23 |
– |
void InitialiseSplitNames(std::vector<std::string> const& splitNames); |
24 |
– |
void InitialiseSplitNames(unsigned numArgs, ... ); |
25 |
– |
void IncrementCount(unsigned run, std::string stepName, std::string splitName, double value); |
26 |
– |
void IncrementCount(unsigned run, unsigned stepIndex, unsigned splitIndex, double value); |
27 |
– |
|
28 |
– |
void PrintMap(); |
29 |
– |
|
17 |
|
|
18 |
+ |
//Setters |
19 |
+ |
void SetSampleName(std::string const& sampleName); |
20 |
+ |
void SetYieldName(std::string const& yieldName); |
21 |
+ |
void SetStepNames(std::vector<std::string> const& stepNames); |
22 |
+ |
void SetBinNames(std::vector<std::string> const& binNames); |
23 |
+ |
|
24 |
+ |
//Getters |
25 |
+ |
std::vector<std::string> GetStepNames() const; |
26 |
+ |
std::vector<std::string> GetBinNames() const; |
27 |
+ |
std::string GetSampleName() const { return sampleName_; } |
28 |
+ |
std::string GetYieldName() const { return yieldName_; } |
29 |
+ |
|
30 |
+ |
void IncrementCount(unsigned run, unsigned binIndex, unsigned stepIndex, double value); |
31 |
+ |
void IncrementCount(unsigned run, std::string binName, std::string stepName, double value); |
32 |
+ |
|
33 |
+ |
double CalculateYield(std::string stepName) const; |
34 |
+ |
double CalculateYield(std::string stepName, unsigned minRun, unsigned maxRun) const; |
35 |
+ |
double CalculateYield(std::string stepName, std::vector<std::string> binNames) const; |
36 |
+ |
double CalculateYield(std::string stepName, unsigned minRun, unsigned maxRun, std::vector<std::string> binNames) const; |
37 |
+ |
|
38 |
+ |
//Access Methods |
39 |
+ |
double & at(unsigned runIndex, unsigned binIndex, unsigned stepIndex); |
40 |
+ |
double at(unsigned runIndex, unsigned binIndex, unsigned stepIndex) const; |
41 |
|
|
42 |
+ |
void Print() const; |
43 |
+ |
|
44 |
|
private: |
45 |
+ |
std::string sampleName_; |
46 |
|
std::string yieldName_; |
47 |
< |
YieldMap runMap_; |
47 |
> |
std::vector<double> yieldVector_; |
48 |
|
std::vector<std::string> stepNames_; |
49 |
< |
std::vector<std::string> splitNames_; |
49 |
> |
std::vector<std::string> binNames_; |
50 |
|
std::map<std::string,unsigned> stepIndexMap_; |
51 |
< |
std::map<std::string,unsigned> splitIndexMap_; |
51 |
> |
std::map<std::string,unsigned> binIndexMap_; |
52 |
|
std::map<unsigned, unsigned> runIndexMap_; |
40 |
– |
void BuildStepIndexMap(); |
41 |
– |
void BuildSplitIndexMap(); |
42 |
– |
|
53 |
|
}; |
54 |
|
|
55 |
|
}//namespace |