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
MixingInputConfig::ioot_
int ioot_
Definition: MixingModuleConfig.h:66
MixingModuleConfig::minb_
int minb_
Definition: MixingModuleConfig.h:87
MixingModuleConfig::configs_
std::vector< MixingInputConfig > configs_
Definition: MixingModuleConfig.h:85
mps_fire.i
i
Definition: mps_fire.py:428
edm
HLT enums.
Definition: AlignableModifier.h:19
MixingInputConfig::dpfv_
std::vector< int > dpfv_
Definition: MixingModuleConfig.h:63
MixingInputConfig::read
void read(edm::ParameterSet &pset)
Definition: MixingModuleConfig.cc:30
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
MixingInputConfig::outOfTime
const int outOfTime() const
Definition: MixingModuleConfig.h:54
MixingModuleConfig::maxb_
int maxb_
Definition: MixingModuleConfig.h:88
MixingModuleConfig::config
const MixingInputConfig & config(unsigned int i=0) const
Definition: MixingModuleConfig.h:76
alignCSCRings.s
s
Definition: alignCSCRings.py:92
MixingInputConfig::an_
double an_
Definition: MixingModuleConfig.h:61
MixingModuleConfig::bs_
int bs_
Definition: MixingModuleConfig.h:89
MixingInputConfig::fixedOutOfTime
const int fixedOutOfTime() const
Definition: MixingModuleConfig.h:55
MixingModuleConfig::maxBunch
const int & maxBunch() const
Definition: MixingModuleConfig.h:80
MixingInputConfig::averageNumber
const double averageNumber() const
Definition: MixingModuleConfig.h:50
operator<<
std::ostream & operator<<(std::ostream &, const MixingModuleConfig &beam)
Definition: MixingModuleConfig.cc:9
EcalCondDBWriter_cfi.beam
beam
Definition: EcalCondDBWriter_cfi.py:45
MixingModuleConfig::read
void read(edm::ParameterSet &pset)
Definition: MixingModuleConfig.cc:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MixingInputConfig::type
std::string type() const
Definition: MixingModuleConfig.h:20
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
MixingModuleConfig
Definition: MixingModuleConfig.h:71
Serializable.h
MixingModuleConfig::MixingModuleConfig
MixingModuleConfig()
Definition: MixingModuleConfig.cc:6
MixingInputConfig::~MixingInputConfig
virtual ~MixingInputConfig()
Definition: MixingModuleConfig.h:17
MixingModuleConfig::~MixingModuleConfig
virtual ~MixingModuleConfig()
Definition: MixingModuleConfig.h:74
MixingModuleConfig::minBunch
const int & minBunch() const
Definition: MixingModuleConfig.h:79
MixingInputConfig::dp_
std::vector< double > dp_
Definition: MixingModuleConfig.h:64
MixingInputConfig::moot_
int moot_
Definition: MixingModuleConfig.h:65
MixingModuleConfig::bunchSpace
const int & bunchSpace() const
Definition: MixingModuleConfig.h:78
MixingInputConfig::MixingInputConfig
MixingInputConfig()
Definition: MixingModuleConfig.cc:7
MixingInputConfig::itype
const int itype() const
Definition: MixingModuleConfig.h:19
MixingInputConfig::probValue
const std::vector< double > & probValue() const
Definition: MixingModuleConfig.h:53
MixingInputConfig::probFunctionVariable
const std::vector< int > & probFunctionVariable() const
Definition: MixingModuleConfig.h:52
MixingInputConfig
Definition: MixingModuleConfig.h:14
MixingInputConfig::t_
int t_
Definition: MixingModuleConfig.h:60
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MixingInputConfig::itype
int itype(std::string s) const
Definition: MixingModuleConfig.h:36