CMS 3D CMS Logo

MixingModuleConfig.h
Go to the documentation of this file.
1 #ifndef MixingModuleConfig_H
2 #define MixingModuleConfig_H
3 
5 
6 #include <vector>
7 #include <string>
8 #include <iostream>
9 
10 namespace edm {
11  class ParameterSet;
12 }
13 
15 public:
17  virtual ~MixingInputConfig(){};
18 
19  const int itype() const { return t_; }
20  std::string type() const {
21  switch (t_) {
22  case 0:
23  return "none";
24  case 1:
25  return "fixed";
26  case 2:
27  return "poisson";
28  case 3:
29  return "histo";
30  case 4:
31  return "probFunction";
32  // FIX ME: add default
33  }
34  return "";
35  }
36  int itype(std::string s) const {
37  if (s == "none")
38  return 0;
39  if (s == "fixed")
40  return 1;
41  if (s == "poisson")
42  return 2;
43  if (s == "histo")
44  return 3;
45  if (s == "probFunction")
46  return 4;
47  return 0;
48  }
49 
50  const double averageNumber() const { return an_; }
51  // const int intAverage() const { return ia_;}
52  const std::vector<int>& probFunctionVariable() const { return dpfv_; }
53  const std::vector<double>& probValue() const { return dp_; }
54  const int outOfTime() const { return moot_; }
55  const int fixedOutOfTime() const { return ioot_; }
56 
58 
59 private:
60  int t_;
61  double an_;
62  // int ia_;
63  std::vector<int> dpfv_;
64  std::vector<double> dp_;
65  int moot_;
66  int ioot_;
67 
69 };
70 
72 public:
74  virtual ~MixingModuleConfig(){};
75 
76  const MixingInputConfig& config(unsigned int i = 0) const { return configs_[i]; }
77 
78  const int& bunchSpace() const { return bs_; }
79  const int& minBunch() const { return minb_; }
80  const int& maxBunch() const { return maxb_; }
81 
83 
84 private:
85  std::vector<MixingInputConfig> configs_;
86 
87  int minb_;
88  int maxb_;
89  int bs_;
90 
92 };
93 
94 std::ostream& operator<<(std::ostream&, const MixingModuleConfig& beam);
95 std::ostream& operator<<(std::ostream&, const MixingInputConfig& beam);
96 
97 #endif
virtual ~MixingInputConfig()
const MixingInputConfig & config(unsigned int i=0) const
void read(edm::ParameterSet &pset)
std::ostream & operator<<(std::ostream &, const MixingModuleConfig &beam)
std::vector< double > dp_
const int itype() const
const std::vector< double > & probValue() const
const std::vector< int > & probFunctionVariable() const
const int outOfTime() const
std::vector< int > dpfv_
int itype(std::string s) const
const int & bunchSpace() const
const int fixedOutOfTime() const
const double averageNumber() const
std::string type() const
const int & maxBunch() const
#define COND_SERIALIZABLE
Definition: Serializable.h:39
HLT enums.
const int & minBunch() const
void read(edm::ParameterSet &pset)
std::vector< MixingInputConfig > configs_