CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MixingInputConfig Class Reference

#include <MixingModuleConfig.h>

Public Member Functions

const double averageNumber () const
 
const int fixedOutOfTime () const
 
const int itype () const
 
int itype (std::string s) const
 
 MixingInputConfig ()
 
const int outOfTime () const
 
const std::vector< int > & probFunctionVariable () const
 
const std::vector< double > & probValue () const
 
void read (edm::ParameterSet &pset)
 
std::string type () const
 
virtual ~MixingInputConfig ()
 

Private Attributes

double an_
 
std::vector< double > dp_
 
std::vector< int > dpfv_
 
int ioot_
 
int moot_
 
int t_
 

Detailed Description

Definition at line 12 of file MixingModuleConfig.h.

Constructor & Destructor Documentation

MixingInputConfig::MixingInputConfig ( )

Definition at line 9 of file MixingModuleConfig.cc.

9 {}
virtual MixingInputConfig::~MixingInputConfig ( )
inlinevirtual

Definition at line 15 of file MixingModuleConfig.h.

15 {};

Member Function Documentation

const double MixingInputConfig::averageNumber ( ) const
inline

Definition at line 38 of file MixingModuleConfig.h.

References an_.

Referenced by edm::PileUp::reload().

38 { return an_;}
const int MixingInputConfig::fixedOutOfTime ( ) const
inline

Definition at line 43 of file MixingModuleConfig.h.

References ioot_.

Referenced by edm::PileUp::reload().

43 { return ioot_;}
const int MixingInputConfig::itype ( ) const
inline

Definition at line 17 of file MixingModuleConfig.h.

References t_.

Referenced by read().

17 {return t_;}
int MixingInputConfig::itype ( std::string  s) const
inline

Definition at line 29 of file MixingModuleConfig.h.

29  {
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  }
const int MixingInputConfig::outOfTime ( ) const
inline

Definition at line 42 of file MixingModuleConfig.h.

References moot_.

Referenced by edm::PileUp::reload().

42 { return moot_;}
const std::vector<int>& MixingInputConfig::probFunctionVariable ( ) const
inline

Definition at line 40 of file MixingModuleConfig.h.

References dpfv_.

Referenced by edm::PileUp::reload().

40 { return dpfv_;}
std::vector< int > dpfv_
const std::vector<double>& MixingInputConfig::probValue ( ) const
inline

Definition at line 41 of file MixingModuleConfig.h.

References dp_.

Referenced by edm::PileUp::reload().

41 { return dp_;}
std::vector< double > dp_
void MixingInputConfig::read ( edm::ParameterSet pset)

Definition at line 34 of file MixingModuleConfig.cc.

References an_, dp_, dpfv_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), ioot_, itype(), moot_, and t_.

Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().

34  {
35  t_=itype(pset.getParameter<std::string>("type"));
36  an_=0;
37  // ia_=0;
38  dpfv_.clear();
39  dp_.clear();
40  moot_=0;
41  ioot_=0;
42 
43  switch(t_){
44  case 1:
45  an_=pset.getParameter<double>("averageNumber");
46  break;
47  case 2:
48  an_=pset.getParameter<double>("averageNumber");
49  break;
50  case 3:
51  //not supposed to be valid
52  case 4:
53  dpfv_=pset.getParameter<edm::ParameterSet>("nbPileupEvents").getParameter<std::vector<int> >("probFunctionVariable");
54  dp_=pset.getParameter<edm::ParameterSet>("nbPileupEvents").getParameter<std::vector<double> >("probValue");
55  break;
56  }
57 
58  if (pset.getUntrackedParameter<bool>("manage_OOT"))
59  {
60  std::string OOT_type = pset.getUntrackedParameter<std::string>("OOT_type");
61 
62  if(OOT_type == "Poisson" || OOT_type == "poisson")
63  moot_=2;
64  else if (OOT_type == "Fixed" || OOT_type == "fixed") {
65  moot_=1;
66  ioot_=pset.getUntrackedParameter<int>("intFixed_OOT", -1);
67  }
68  }
69 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > dp_
std::vector< int > dpfv_
const int itype() const
std::string MixingInputConfig::type ( ) const
inline

Definition at line 18 of file MixingModuleConfig.h.

References t_.

Referenced by Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputCommands(), operator<<(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputCommands(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), and edm::PileUp::reload().

18  {
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  }

Member Data Documentation

double MixingInputConfig::an_
private

Definition at line 49 of file MixingModuleConfig.h.

Referenced by averageNumber(), and read().

std::vector<double> MixingInputConfig::dp_
private

Definition at line 52 of file MixingModuleConfig.h.

Referenced by probValue(), and read().

std::vector<int> MixingInputConfig::dpfv_
private

Definition at line 51 of file MixingModuleConfig.h.

Referenced by probFunctionVariable(), and read().

int MixingInputConfig::ioot_
private

Definition at line 54 of file MixingModuleConfig.h.

Referenced by fixedOutOfTime(), and read().

int MixingInputConfig::moot_
private

Definition at line 53 of file MixingModuleConfig.h.

Referenced by outOfTime(), and read().

int MixingInputConfig::t_
private

Definition at line 48 of file MixingModuleConfig.h.

Referenced by itype(), read(), and type().