CMS 3D CMS Logo

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

#include <GenLumiInfoProduct.h>

Classes

struct  FinalStat
 
struct  ProcessInfo
 
struct  XSec
 

Public Member Functions

 GenLumiInfoProduct ()
 
 GenLumiInfoProduct (const int id)
 
 GenLumiInfoProduct (const GenLumiInfoProduct &other)
 
const int getHEPIDWTUP () const
 
const std::vector< ProcessInfo > & getProcessInfos () const
 
virtual bool isProductEqual (const GenLumiInfoProduct &other) const
 
virtual bool mergeProduct (const GenLumiInfoProduct &other)
 
virtual bool samePhysics (const GenLumiInfoProduct &other) const
 
void setHEPIDWTUP (const int id)
 
void setProcessInfo (const std::vector< ProcessInfo > &processes)
 
virtual ~GenLumiInfoProduct ()
 

Private Attributes

int hepidwtup_
 
std::vector< ProcessInfointernalProcesses_
 

Detailed Description

Definition at line 8 of file GenLumiInfoProduct.h.

Constructor & Destructor Documentation

GenLumiInfoProduct::GenLumiInfoProduct ( )

Definition at line 85 of file GenLumiInfoProduct.cc.

References internalProcesses_.

85  :
86  hepidwtup_(-1)
87 {
88  internalProcesses_.clear();
89 
90 }
std::vector< ProcessInfo > internalProcesses_
GenLumiInfoProduct::GenLumiInfoProduct ( const int  id)

Definition at line 92 of file GenLumiInfoProduct.cc.

References internalProcesses_.

92  :
93  hepidwtup_(id)
94 {
95  internalProcesses_.clear();
96 }
std::vector< ProcessInfo > internalProcesses_
GenLumiInfoProduct::GenLumiInfoProduct ( const GenLumiInfoProduct other)

Definition at line 98 of file GenLumiInfoProduct.cc.

98  :
99  hepidwtup_(other.hepidwtup_),
101 {
102 }
std::vector< ProcessInfo > internalProcesses_
GenLumiInfoProduct::~GenLumiInfoProduct ( )
virtual

Definition at line 104 of file GenLumiInfoProduct.cc.

105 {
106 }

Member Function Documentation

const int GenLumiInfoProduct::getHEPIDWTUP ( ) const
inline

Definition at line 22 of file GenLumiInfoProduct.h.

References hepidwtup_.

Referenced by operator!=(), operator==(), and samePhysics().

22 {return hepidwtup_;}
const std::vector<ProcessInfo>& GenLumiInfoProduct::getProcessInfos ( ) const
inline

Definition at line 23 of file GenLumiInfoProduct.h.

References internalProcesses_.

Referenced by mergeProduct(), operator!=(), operator==(), and samePhysics().

23 {return internalProcesses_;}
std::vector< ProcessInfo > internalProcesses_
bool GenLumiInfoProduct::isProductEqual ( const GenLumiInfoProduct other) const
virtual

Definition at line 128 of file GenLumiInfoProduct.cc.

129 {
130  return ((*this) == other);
131 }
bool GenLumiInfoProduct::mergeProduct ( const GenLumiInfoProduct other)
virtual

Definition at line 108 of file GenLumiInfoProduct.cc.

References getProcessInfos(), i, and internalProcesses_.

109 {
110  if ( (*this) != other)
111  {
112 
113  edm::LogWarning("GenLumiInfoProduct|ProductsNotMergeable")
114  << "You are merging runs with different cross-sections"
115  "The resulting cross-section will not be consistent." << std::endl;
116 
117  return false;
118  }
119  for(unsigned int i=0; i < internalProcesses_.size(); i++)
120  {
121  internalProcesses_[i].addOthers(other.getProcessInfos()[i]);
122 
123  }
124 
125  return true;
126 }
const std::vector< ProcessInfo > & getProcessInfos() const
int i
Definition: DBlmapReader.cc:9
std::vector< ProcessInfo > internalProcesses_
bool GenLumiInfoProduct::samePhysics ( const GenLumiInfoProduct other) const
virtual

Definition at line 134 of file GenLumiInfoProduct.cc.

References getHEPIDWTUP(), and getProcessInfos().

135 {
136 
137  unsigned int lhssize=getProcessInfos().size();
138  unsigned int rhssize=other.getProcessInfos().size();
139  return ( (getHEPIDWTUP() == other.getHEPIDWTUP()) &&
140  (lhssize == rhssize));
141 
142 }
const std::vector< ProcessInfo > & getProcessInfos() const
const int getHEPIDWTUP() const
void GenLumiInfoProduct::setHEPIDWTUP ( const int  id)
inline
void GenLumiInfoProduct::setProcessInfo ( const std::vector< ProcessInfo > &  processes)
inline

Definition at line 28 of file GenLumiInfoProduct.h.

References internalProcesses_.

28 {internalProcesses_ = processes;}
std::vector< ProcessInfo > internalProcesses_

Member Data Documentation

int GenLumiInfoProduct::hepidwtup_
private

Definition at line 153 of file GenLumiInfoProduct.h.

Referenced by getHEPIDWTUP(), and setHEPIDWTUP().

std::vector<ProcessInfo> GenLumiInfoProduct::internalProcesses_
private