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)
 
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!=(), and operator==().

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

Definition at line 23 of file GenLumiInfoProduct.h.

References internalProcesses_.

Referenced by GenXSecAnalyzer::compute(), GenXSecAnalyzer::endRun(), mergeProduct(), operator!=(), and operator==().

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

Definition at line 137 of file GenLumiInfoProduct.cc.

138 {
139  return ((*this) == other);
140 }
bool GenLumiInfoProduct::mergeProduct ( const GenLumiInfoProduct other)
virtual

Definition at line 108 of file GenLumiInfoProduct.cc.

References GenLumiInfoProduct::ProcessInfo::addOthers(), getProcessInfos(), i, internalProcesses_, getDQMSummary::iter, GenLumiInfoProduct::ProcessInfo::lheXSec(), GenLumiInfoProduct::XSec::value(), and x.

Referenced by GenXSecAnalyzer::endLuminosityBlock().

109 {
110  std::map<int, ProcessInfo> processes;
111 
112  for(unsigned int i = 0; i < getProcessInfos().size(); i++) {
113  int id = getProcessInfos()[i].process();
114  ProcessInfo &x = processes[id];
115  x=getProcessInfos()[i];
116  }
117 
118  // the two GenLuminInfoProducts may not have the same number
119  // of processes
120  for(unsigned int i = 0; i < other.getProcessInfos().size(); i++) {
121  int id = other.getProcessInfos()[i].process();
122  ProcessInfo &x = processes[id];
123  if(x.lheXSec().value()>0)
124  x.addOthers(other.getProcessInfos()[i]);
125  else
126  x = other.getProcessInfos()[i];
127  }
128 
129  internalProcesses_.resize(processes.size());
130  unsigned int i = 0;
131  for(std::map<int, ProcessInfo>::const_iterator iter = processes.begin();
132  iter != processes.end(); ++iter, i++)
133  internalProcesses_[i]=iter->second;
134  return true;
135 }
const std::vector< ProcessInfo > & getProcessInfos() const
int i
Definition: DBlmapReader.cc:9
Definition: DDAxes.h:10
std::vector< ProcessInfo > internalProcesses_
void GenLumiInfoProduct::setHEPIDWTUP ( const int  id)
inline

Definition at line 27 of file GenLumiInfoProduct.h.

References hepidwtup_.

void GenLumiInfoProduct::setProcessInfo ( const std::vector< ProcessInfo > &  processes)
inline

Definition at line 28 of file GenLumiInfoProduct.h.

References internalProcesses_.

Referenced by GenXSecAnalyzer::endRun().

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

Member Data Documentation

int GenLumiInfoProduct::hepidwtup_
private

Definition at line 152 of file GenLumiInfoProduct.h.

Referenced by getHEPIDWTUP(), and setHEPIDWTUP().

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