CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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)
 
void swap (GenLumiInfoProduct &other)
 
virtual ~GenLumiInfoProduct ()
 

Private Attributes

int hepidwtup_
 
std::vector< ProcessInfointernalProcesses_
 

Detailed Description

Definition at line 11 of file GenLumiInfoProduct.h.

Constructor & Destructor Documentation

GenLumiInfoProduct::GenLumiInfoProduct ( )

Definition at line 70 of file GenLumiInfoProduct.cc.

References internalProcesses_.

70 : hepidwtup_(-1) { internalProcesses_.clear(); }
std::vector< ProcessInfo > internalProcesses_
GenLumiInfoProduct::GenLumiInfoProduct ( const int  id)

Definition at line 72 of file GenLumiInfoProduct.cc.

References internalProcesses_.

72 : hepidwtup_(id) { internalProcesses_.clear(); }
std::vector< ProcessInfo > internalProcesses_
GenLumiInfoProduct::GenLumiInfoProduct ( const GenLumiInfoProduct other)

Definition at line 74 of file GenLumiInfoProduct.cc.

std::vector< ProcessInfo > internalProcesses_
GenLumiInfoProduct::~GenLumiInfoProduct ( )
virtual

Definition at line 77 of file GenLumiInfoProduct.cc.

77 {}

Member Function Documentation

const int GenLumiInfoProduct::getHEPIDWTUP ( ) const
inline

Definition at line 25 of file GenLumiInfoProduct.h.

References hepidwtup_.

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

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

Definition at line 26 of file GenLumiInfoProduct.h.

References internalProcesses_.

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

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

Definition at line 111 of file GenLumiInfoProduct.cc.

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

Definition at line 79 of file GenLumiInfoProduct.cc.

References GenLumiInfoProduct::ProcessInfo::addOthers(), getProcessInfos(), mps_fire::i, gpuClustering::id, internalProcesses_, GenLumiInfoProduct::ProcessInfo::lheXSec(), parallelization::processes, GenLumiInfoProduct::XSec::value(), and x.

79  {
80  std::map<int, ProcessInfo> processes;
81 
82  for (unsigned int i = 0; i < getProcessInfos().size(); i++) {
83  int id = getProcessInfos()[i].process();
84  ProcessInfo& x = processes[id];
85  x = getProcessInfos()[i];
86  }
87 
88  // the two GenLuminInfoProducts may not have the same number
89  // of processes
90  for (unsigned int i = 0; i < other.getProcessInfos().size(); i++) {
91  int id = other.getProcessInfos()[i].process();
92  ProcessInfo& x = processes[id];
93  if (x.lheXSec().value() > 0)
94  x.addOthers(other.getProcessInfos()[i]);
95  else
96  x = other.getProcessInfos()[i];
97  }
98 
99  internalProcesses_.resize(processes.size());
100  unsigned int i = 0;
101  for (std::map<int, ProcessInfo>::const_iterator iter = processes.begin(); iter != processes.end(); ++iter, i++)
102  internalProcesses_[i] = iter->second;
103  return true;
104 }
const std::vector< ProcessInfo > & getProcessInfos() const
list processes
Run mode ##.
uint16_t *__restrict__ id
std::vector< ProcessInfo > internalProcesses_
void GenLumiInfoProduct::setHEPIDWTUP ( const int  id)
inline
void GenLumiInfoProduct::setProcessInfo ( const std::vector< ProcessInfo > &  processes)
inline
void GenLumiInfoProduct::swap ( GenLumiInfoProduct other)

Definition at line 106 of file GenLumiInfoProduct.cc.

References hepidwtup_, internalProcesses_, and std::swap().

106  {
109 }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< ProcessInfo > internalProcesses_

Member Data Documentation

int GenLumiInfoProduct::hepidwtup_
private

Definition at line 167 of file GenLumiInfoProduct.h.

Referenced by getHEPIDWTUP(), setHEPIDWTUP(), and swap().

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