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 
4 #include <vector>
5 #include <string>
6 #include <iostream>
7 
8 namespace edm{
9  class ParameterSet;
10 }
11 
13  public:
15  virtual ~MixingInputConfig(){};
16 
17  const int itype() const {return t_;}
18  std::string type() const {
19  switch(t_){
20  case 0: return "none";
21  case 1: return "fixed";
22  case 2: return "poisson";
23  case 3: return "histo";
24  case 4: return "probFunction";
25  // FIX ME: add default
26  }
27  return "";
28  }
29  int itype(std::string s)const {
30  if (s=="none") return 0;
31  if (s=="fixed") return 1;
32  if (s=="poisson") return 2;
33  if (s=="histo") return 3;
34  if (s=="probFunction") return 4;
35  return 0;
36  }
37 
38  const double averageNumber() const { return an_;}
39  // const int intAverage() const { return ia_;}
40  const std::vector<int> & probFunctionVariable() const { return dpfv_;}
41  const std::vector<double> & probValue() const { return dp_;}
42  const int outOfTime() const { return moot_;}
43  const int fixedOutOfTime() const { return ioot_;}
44 
45  void read(edm::ParameterSet & pset);
46 
47  private:
48  int t_;
49  double an_;
50  // int ia_;
51  std::vector<int> dpfv_;
52  std::vector<double>dp_;
53  int moot_;
54  int ioot_;
55 
56 };
57 
59  public:
61  virtual ~MixingModuleConfig(){};
62 
63  const MixingInputConfig & config (unsigned int i=0) const { return configs_[i];}
64 
65  const int & bunchSpace() const { return bs_;}
66  const int & minBunch() const { return minb_;}
67  const int & maxBunch() const { return maxb_;}
68 
69  void read(edm::ParameterSet & pset);
70 
71  private:
72  std::vector<MixingInputConfig> configs_;
73 
74  int minb_;
75  int maxb_;
76  int bs_;
77 };
78 
79 
80 
81 std::ostream& operator<< ( std::ostream&, const MixingModuleConfig & beam );
82 std::ostream& operator<< ( std::ostream&, const MixingInputConfig & beam );
83 
84 #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:187
const int & maxBunch() const
const int outOfTime() const
const int itype() const
const std::vector< int > & probFunctionVariable() const
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