test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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: return "none";
23  case 1: return "fixed";
24  case 2: return "poisson";
25  case 3: return "histo";
26  case 4: return "probFunction";
27  // FIX ME: add default
28  }
29  return "";
30  }
31  int itype(std::string s)const {
32  if (s=="none") return 0;
33  if (s=="fixed") return 1;
34  if (s=="poisson") return 2;
35  if (s=="histo") return 3;
36  if (s=="probFunction") return 4;
37  return 0;
38  }
39 
40  const double averageNumber() const { return an_;}
41  // const int intAverage() const { return ia_;}
42  const std::vector<int> & probFunctionVariable() const { return dpfv_;}
43  const std::vector<double> & probValue() const { return dp_;}
44  const int outOfTime() const { return moot_;}
45  const int fixedOutOfTime() const { return ioot_;}
46 
47  void read(edm::ParameterSet & pset);
48 
49  private:
50  int t_;
51  double an_;
52  // int ia_;
53  std::vector<int> dpfv_;
54  std::vector<double>dp_;
55  int moot_;
56  int ioot_;
57 
58 
60 };
61 
63  public:
65  virtual ~MixingModuleConfig(){};
66 
67  const MixingInputConfig & config (unsigned int i=0) const { return configs_[i];}
68 
69  const int & bunchSpace() const { return bs_;}
70  const int & minBunch() const { return minb_;}
71  const int & maxBunch() const { return maxb_;}
72 
73  void read(edm::ParameterSet & pset);
74 
75  private:
76  std::vector<MixingInputConfig> configs_;
77 
78  int minb_;
79  int maxb_;
80  int bs_;
81 
83 };
84 
85 
86 
87 std::ostream& operator<< ( std::ostream&, const MixingModuleConfig & beam );
88 std::ostream& operator<< ( std::ostream&, const MixingInputConfig & beam );
89 
90 #endif
virtual ~MixingInputConfig()
int i
Definition: DBlmapReader.cc:9
void read(edm::ParameterSet &pset)
const int & bunchSpace() const
std::vector< double > dp_
const int fixedOutOfTime() const
const std::vector< double > & probValue() const
std::vector< int > dpfv_
const double averageNumber() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
const int & maxBunch() const
const int outOfTime() const
const int itype() const
const std::vector< int > & probFunctionVariable() const
#define COND_SERIALIZABLE
Definition: Serializable.h:37
int itype(std::string s) const
void read(edm::ParameterSet &pset)
const int & minBunch() const
std::string type() const
std::vector< MixingInputConfig > configs_
const MixingInputConfig & config(unsigned int i=0) const