CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
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 Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

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

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 14 of file MixingModuleConfig.h.

Constructor & Destructor Documentation

◆ MixingInputConfig()

MixingInputConfig::MixingInputConfig ( )

Definition at line 7 of file MixingModuleConfig.cc.

7 {}

◆ ~MixingInputConfig()

virtual MixingInputConfig::~MixingInputConfig ( )
inlinevirtual

Definition at line 17 of file MixingModuleConfig.h.

17 {};

Member Function Documentation

◆ averageNumber()

const double MixingInputConfig::averageNumber ( ) const
inline

Definition at line 50 of file MixingModuleConfig.h.

References an_.

50 { return an_; }

◆ fixedOutOfTime()

const int MixingInputConfig::fixedOutOfTime ( ) const
inline

Definition at line 55 of file MixingModuleConfig.h.

References ioot_.

55 { return ioot_; }

◆ itype() [1/2]

const int MixingInputConfig::itype ( ) const
inline

Definition at line 19 of file MixingModuleConfig.h.

References t_.

Referenced by read().

19 { return t_; }

◆ itype() [2/2]

int MixingInputConfig::itype ( std::string  s) const
inline

Definition at line 36 of file MixingModuleConfig.h.

References alignCSCRings::s.

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

◆ outOfTime()

const int MixingInputConfig::outOfTime ( ) const
inline

Definition at line 54 of file MixingModuleConfig.h.

References moot_.

54 { return moot_; }

◆ probFunctionVariable()

const std::vector<int>& MixingInputConfig::probFunctionVariable ( ) const
inline

Definition at line 52 of file MixingModuleConfig.h.

References dpfv_.

52 { return dpfv_; }
std::vector< int > dpfv_

◆ probValue()

const std::vector<double>& MixingInputConfig::probValue ( ) const
inline

Definition at line 53 of file MixingModuleConfig.h.

References dp_.

53 { return dp_; }
std::vector< double > dp_

◆ read()

void MixingInputConfig::read ( edm::ParameterSet pset)

Definition at line 30 of file MixingModuleConfig.cc.

References an_, dp_, dpfv_, ioot_, itype(), moot_, mix_2012_lumiLevel_15_20_50ns_PoissonOOTPU_cfi::OOT_type, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and t_.

Referenced by edmIntegrityCheck.PublishToFileSystem::get().

30  {
31  t_ = itype(pset.getParameter<std::string>("type"));
32  an_ = 0;
33  // ia_=0;
34  dpfv_.clear();
35  dp_.clear();
36  moot_ = 0;
37  ioot_ = 0;
38 
39  switch (t_) {
40  case 1:
41  an_ = pset.getParameter<double>("averageNumber");
42  break;
43  case 2:
44  an_ = pset.getParameter<double>("averageNumber");
45  break;
46  case 3:
47  //not supposed to be valid
48  case 4:
49  dpfv_ = pset.getParameter<edm::ParameterSet>("nbPileupEvents")
50  .getParameter<std::vector<int> >("probFunctionVariable");
51  dp_ = pset.getParameter<edm::ParameterSet>("nbPileupEvents").getParameter<std::vector<double> >("probValue");
52  break;
53  }
54 
55  if (pset.getUntrackedParameter<bool>("manage_OOT")) {
56  std::string OOT_type = pset.getUntrackedParameter<std::string>("OOT_type");
57 
58  if (OOT_type == "Poisson" || OOT_type == "poisson")
59  moot_ = 2;
60  else if (OOT_type == "Fixed" || OOT_type == "fixed") {
61  moot_ = 1;
62  ioot_ = pset.getUntrackedParameter<int>("intFixed_OOT", -1);
63  }
64  }
65 }
std::vector< double > dp_
const int itype() const
OOT_type
manage out-of-time pileup setting this to True means that the out-of-time pileup will have a differen...
std::vector< int > dpfv_

◆ serialize()

template<class Archive >
void MixingInputConfig::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ type()

std::string MixingInputConfig::type ( ) const
inline

Definition at line 20 of file MixingModuleConfig.h.

References t_.

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 68 of file MixingModuleConfig.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 68 of file MixingModuleConfig.h.

Member Data Documentation

◆ an_

double MixingInputConfig::an_
private

Definition at line 61 of file MixingModuleConfig.h.

Referenced by averageNumber(), and read().

◆ dp_

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

Definition at line 64 of file MixingModuleConfig.h.

Referenced by probValue(), and read().

◆ dpfv_

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

Definition at line 63 of file MixingModuleConfig.h.

Referenced by probFunctionVariable(), and read().

◆ ioot_

int MixingInputConfig::ioot_
private

Definition at line 66 of file MixingModuleConfig.h.

Referenced by fixedOutOfTime(), and read().

◆ moot_

int MixingInputConfig::moot_
private

Definition at line 65 of file MixingModuleConfig.h.

Referenced by outOfTime(), and read().

◆ t_

int MixingInputConfig::t_
private

Definition at line 60 of file MixingModuleConfig.h.

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