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 Member Functions | Private Attributes | Friends
METCorrectorParameters::Definitions Class Reference

#include <METCorrectorParameters.h>

Public Member Functions

std::vector< std::string > binVar () const
 
std::string binVar (unsigned fIndex) const
 
 Definitions ()
 
 Definitions (const std::vector< std::string > &fVar, const std::vector< std::string > &fParVar, const std::string &fFormula)
 
 Definitions (const std::string &fLine)
 
std::string formula () const
 
unsigned nBinVar () const
 
unsigned nParVar () const
 
std::vector< std::string > parVar () const
 
std::string parVar (unsigned fIndex) const
 

Private Member Functions

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

Private Attributes

std::vector< std::string > mBinVar
 
std::string mFormula
 
std::vector< std::string > mParVar
 
int ptclType
 

Friends

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

Detailed Description

Definition at line 21 of file METCorrectorParameters.h.

Constructor & Destructor Documentation

METCorrectorParameters::Definitions::Definitions ( )
inline

Definition at line 25 of file METCorrectorParameters.h.

25 {}
METCorrectorParameters::Definitions::Definitions ( const std::vector< std::string > &  fVar,
const std::vector< std::string > &  fParVar,
const std::string &  fFormula 
)

Definition at line 19 of file METCorrectorParameters.cc.

References i, mBinVar, mFormula, and mParVar.

20 {
21  for(unsigned i=0;i<fBinVar.size();i++)
22  mBinVar.push_back(fBinVar[i]);
23  for(unsigned i=0;i<fParVar.size();i++)
24  mParVar.push_back(fParVar[i]);
25  mFormula = fFormula;
26 }
int i
Definition: DBlmapReader.cc:9
METCorrectorParameters::Definitions::Definitions ( const std::string &  fLine)

Definition at line 31 of file METCorrectorParameters.cc.

References gather_cfg::cout, and i.

32 {
33  std::vector<std::string> tokens = getTokens(fLine);
34  // corrType N_bin binVa.. N_var var... formula
35  if (!tokens.empty())
36  {
37  if (tokens.size() < 6)
38  {
39  std::stringstream sserr;
40  sserr<<"(line "<<fLine<<"): less than 6 expected tokens:"<<tokens.size();
41  handleError("METCorrectorParameters::Definitions",sserr.str());
42  }
43  // No. of Bin Variable
44  std::cout<<"Definitions==========="<<std::endl;
45  ptclType = getSigned(tokens[0]);
46  std::cout<<tokens[0]<<"\t";
47  unsigned nBinVar = getUnsigned(tokens[1]);
48  std::cout<<tokens[1]<<"\t";
49  // No of Parameterization Variable
50  unsigned nParVar = getUnsigned(tokens[nBinVar+2]);
51  std::cout<<tokens[2]<<"\t";
52  for(unsigned i=0;i<nBinVar;i++)
53  {
54  mBinVar.push_back(tokens[i+2]);
55  std::cout<<tokens[i+2]<<"\t";
56  }
57  for(unsigned i=0;i<nParVar;i++)
58  {
59  mParVar.push_back(tokens[nBinVar+3+i]);
60  std::cout<<tokens[nBinVar+3+i]<<"\t";
61  }
62  mFormula = tokens[nParVar+nBinVar+3];
63  std::cout<<tokens[nParVar+nBinVar+3]<<std::endl;
64  }
65 }
int i
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

std::vector<std::string> METCorrectorParameters::Definitions::binVar ( ) const
inline

Definition at line 32 of file METCorrectorParameters.h.

References mBinVar.

Referenced by METCorrectorParameters::printFile(), and METCorrectorParameters::printScreen().

32 {return mBinVar; }
std::string METCorrectorParameters::Definitions::binVar ( unsigned  fIndex) const
inline

Definition at line 34 of file METCorrectorParameters.h.

References mBinVar.

34 {return mBinVar[fIndex];}
std::string METCorrectorParameters::Definitions::formula ( ) const
inline
unsigned METCorrectorParameters::Definitions::nBinVar ( ) const
inline
unsigned METCorrectorParameters::Definitions::nParVar ( ) const
inline

Definition at line 30 of file METCorrectorParameters.h.

References mParVar.

Referenced by METCorrectorParameters::printFile(), and METCorrectorParameters::printScreen().

30 {return mParVar.size(); }
std::vector<std::string> METCorrectorParameters::Definitions::parVar ( ) const
inline

Definition at line 31 of file METCorrectorParameters.h.

References mParVar.

Referenced by METCorrectorParameters::printFile(), and METCorrectorParameters::printScreen().

31 {return mParVar; }
std::string METCorrectorParameters::Definitions::parVar ( unsigned  fIndex) const
inline

Definition at line 33 of file METCorrectorParameters.h.

References mParVar.

33 {return mParVar[fIndex];}
template<class Archive >
void METCorrectorParameters::Definitions::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 43 of file METCorrectorParameters.h.

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

Definition at line 43 of file METCorrectorParameters.h.

Member Data Documentation

std::vector<std::string> METCorrectorParameters::Definitions::mBinVar
private

Definition at line 41 of file METCorrectorParameters.h.

Referenced by binVar(), Definitions(), and nBinVar().

std::string METCorrectorParameters::Definitions::mFormula
private

Definition at line 39 of file METCorrectorParameters.h.

Referenced by Definitions(), and formula().

std::vector<std::string> METCorrectorParameters::Definitions::mParVar
private

Definition at line 40 of file METCorrectorParameters.h.

Referenced by Definitions(), nParVar(), and parVar().

int METCorrectorParameters::Definitions::ptclType
private

Definition at line 38 of file METCorrectorParameters.h.