CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
LHEEventProduct Class Reference

#include <LHEEventProduct.h>

Classes

class  const_iterator
 

Public Types

typedef std::vector< std::string >::const_iterator comments_const_iterator
 
typedef gen::PdfInfo PDF
 
typedef std::vector< std::string >::size_type size_type
 
typedef gen::WeightsInfo WGT
 

Public Member Functions

void addComment (const std::string &line)
 
void addWeight (const WGT &wgt)
 
const_iterator begin () const
 
comments_const_iterator comments_begin () const
 
comments_const_iterator comments_end () const
 
size_type comments_size () const
 
const_iterator end () const
 
const char * getComment (unsigned i) const
 
const lhef::HEPEUPhepeup () const
 
 LHEEventProduct ()
 
 LHEEventProduct (const lhef::HEPEUP &hepeup)
 
 LHEEventProduct (const lhef::HEPEUP &hepeup, const double originalXWGTUP)
 
 LHEEventProduct (LHEEventProduct &&other)=default
 
int npLO () const
 
int npNLO () const
 
LHEEventProductoperator= (LHEEventProduct &&other)=default
 
double originalXWGTUP () const
 
const PDFpdf () const
 
const std::vector< float > & scales () const
 
void setNpLO (int n)
 
void setNpNLO (int n)
 
void setPDF (const PDF &pdf)
 
void setScales (const std::vector< float > &scales)
 
const std::vector< WGT > & weights () const
 
 ~LHEEventProduct ()=default
 

Private Attributes

std::vector< std::string > comments_
 
lhef::HEPEUP hepeup_
 
int npLO_
 
int npNLO_
 
double originalXWGTUP_
 
std::unique_ptr< PDFpdf_
 
std::vector< float > scales_
 
std::vector< WGTweights_
 

Detailed Description

Definition at line 12 of file LHEEventProduct.h.

Member Typedef Documentation

◆ comments_const_iterator

typedef std::vector<std::string>::const_iterator LHEEventProduct::comments_const_iterator

Definition at line 17 of file LHEEventProduct.h.

◆ PDF

Definition at line 14 of file LHEEventProduct.h.

◆ size_type

typedef std::vector<std::string>::size_type LHEEventProduct::size_type

Definition at line 18 of file LHEEventProduct.h.

◆ WGT

Definition at line 15 of file LHEEventProduct.h.

Constructor & Destructor Documentation

◆ LHEEventProduct() [1/4]

LHEEventProduct::LHEEventProduct ( )
inline

Definition at line 20 of file LHEEventProduct.h.

20 {}

◆ LHEEventProduct() [2/4]

LHEEventProduct::LHEEventProduct ( const lhef::HEPEUP hepeup)
inline

Definition at line 21 of file LHEEventProduct.h.

◆ LHEEventProduct() [3/4]

LHEEventProduct::LHEEventProduct ( const lhef::HEPEUP hepeup,
const double  originalXWGTUP 
)
inline

Definition at line 22 of file LHEEventProduct.h.

◆ LHEEventProduct() [4/4]

LHEEventProduct::LHEEventProduct ( LHEEventProduct &&  other)
default

◆ ~LHEEventProduct()

LHEEventProduct::~LHEEventProduct ( )
default

Member Function Documentation

◆ addComment()

void LHEEventProduct::addComment ( const std::string &  line)
inline

Definition at line 32 of file LHEEventProduct.h.

32 { comments_.push_back(line); }

References comments_, and mps_splice::line.

Referenced by ExternalLHEProducer::produce(), and LHESource::readEvent_().

◆ addWeight()

void LHEEventProduct::addWeight ( const WGT wgt)
inline

Definition at line 31 of file LHEEventProduct.h.

31 { weights_.push_back(wgt); }

References weights_.

Referenced by ExternalLHEProducer::produce(), and LHESource::readEvent_().

◆ begin()

LHEEventProduct::const_iterator LHEEventProduct::begin ( void  ) const

Definition at line 64 of file LHEEventProduct.cc.

64  {
65  const_iterator result;
66  result.event = this;
67  result.line = 0;
68  result.tmp = "<event>\n";
69  return result;
70 }

References mps_fire::result.

Referenced by LHEWriter::analyze().

◆ comments_begin()

comments_const_iterator LHEEventProduct::comments_begin ( ) const
inline

Definition at line 50 of file LHEEventProduct.h.

50 { return comments_.begin(); }

References comments_.

Referenced by StringBasedNTupler::fill(), and edm::ModelFilter::filter().

◆ comments_end()

comments_const_iterator LHEEventProduct::comments_end ( ) const
inline

Definition at line 51 of file LHEEventProduct.h.

51 { return comments_.end(); }

References comments_.

Referenced by StringBasedNTupler::fill(), and edm::ModelFilter::filter().

◆ comments_size()

size_type LHEEventProduct::comments_size ( ) const
inline

Definition at line 49 of file LHEEventProduct.h.

49 { return comments_.size(); }

References comments_.

◆ end()

const_iterator LHEEventProduct::end ( void  ) const
inline

Definition at line 100 of file LHEEventProduct.h.

100 { return const_iterator(); }

Referenced by LHEWriter::analyze().

◆ getComment()

const char* LHEEventProduct::getComment ( unsigned  i) const
inline

Definition at line 53 of file LHEEventProduct.h.

53  {
54  if (comments_.empty() || i >= comments_.size())
55  return "";
56  else
57  return (const char *)comments_[i].c_str();
58  }

References comments_, and mps_fire::i.

◆ hepeup()

const lhef::HEPEUP& LHEEventProduct::hepeup ( ) const
inline

◆ npLO()

int LHEEventProduct::npLO ( ) const
inline

Definition at line 40 of file LHEEventProduct.h.

40 { return npLO_; }

References npLO_.

Referenced by LHETablesProducer::fillLHEObjectTable().

◆ npNLO()

int LHEEventProduct::npNLO ( ) const
inline

Definition at line 41 of file LHEEventProduct.h.

41 { return npNLO_; }

References npNLO_.

Referenced by LHETablesProducer::fillLHEObjectTable().

◆ operator=()

LHEEventProduct& LHEEventProduct::operator= ( LHEEventProduct &&  other)
default

◆ originalXWGTUP()

double LHEEventProduct::originalXWGTUP ( ) const
inline

Definition at line 34 of file LHEEventProduct.h.

34 { return originalXWGTUP_; }

References originalXWGTUP_.

Referenced by RivetAnalyzer::analyze(), and GenWeightsTableProducer::fillLHEWeightTables().

◆ pdf()

const PDF* LHEEventProduct::pdf ( ) const
inline

Definition at line 47 of file LHEEventProduct.h.

47 { return pdf_.get(); }

References pdf_.

Referenced by LHEEventProduct::const_iterator::next(), and setPDF().

◆ scales()

const std::vector<float>& LHEEventProduct::scales ( ) const
inline

Definition at line 37 of file LHEEventProduct.h.

37 { return scales_; }

References scales_.

Referenced by setScales().

◆ setNpLO()

void LHEEventProduct::setNpLO ( int  n)
inline

Definition at line 43 of file LHEEventProduct.h.

43 { npLO_ = n; }

References dqmiodumpmetadata::n, and npLO_.

◆ setNpNLO()

void LHEEventProduct::setNpNLO ( int  n)
inline

Definition at line 44 of file LHEEventProduct.h.

44 { npNLO_ = n; }

References dqmiodumpmetadata::n, and npNLO_.

◆ setPDF()

void LHEEventProduct::setPDF ( const PDF pdf)
inline

Definition at line 30 of file LHEEventProduct.h.

30 { pdf_.reset(new PDF(pdf)); }

References pdf(), and pdf_.

◆ setScales()

void LHEEventProduct::setScales ( const std::vector< float > &  scales)
inline

Definition at line 38 of file LHEEventProduct.h.

38 { scales_ = scales; }

References scales(), and scales_.

◆ weights()

const std::vector<WGT>& LHEEventProduct::weights ( ) const
inline

Definition at line 35 of file LHEEventProduct.h.

35 { return weights_; }

References weights_.

Referenced by RivetAnalyzer::analyze(), and GenWeightsTableProducer::fillLHEWeightTables().

Member Data Documentation

◆ comments_

std::vector<std::string> LHEEventProduct::comments_
private

◆ hepeup_

lhef::HEPEUP LHEEventProduct::hepeup_
private

Definition at line 103 of file LHEEventProduct.h.

Referenced by hepeup().

◆ npLO_

int LHEEventProduct::npLO_
private

Definition at line 109 of file LHEEventProduct.h.

Referenced by npLO(), and setNpLO().

◆ npNLO_

int LHEEventProduct::npNLO_
private

Definition at line 110 of file LHEEventProduct.h.

Referenced by npNLO(), and setNpNLO().

◆ originalXWGTUP_

double LHEEventProduct::originalXWGTUP_
private

Definition at line 107 of file LHEEventProduct.h.

Referenced by originalXWGTUP().

◆ pdf_

std::unique_ptr<PDF> LHEEventProduct::pdf_
private

Definition at line 105 of file LHEEventProduct.h.

Referenced by pdf(), and setPDF().

◆ scales_

std::vector<float> LHEEventProduct::scales_
private

Definition at line 108 of file LHEEventProduct.h.

Referenced by scales(), and setScales().

◆ weights_

std::vector<WGT> LHEEventProduct::weights_
private

Definition at line 106 of file LHEEventProduct.h.

Referenced by addWeight(), and weights().

mps_fire.i
i
Definition: mps_fire.py:355
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
LHEEventProduct::scales_
std::vector< float > scales_
Definition: LHEEventProduct.h:108
LHEEventProduct::hepeup_
lhef::HEPEUP hepeup_
Definition: LHEEventProduct.h:103
LHEEventProduct::originalXWGTUP
double originalXWGTUP() const
Definition: LHEEventProduct.h:34
LHEEventProduct::npNLO_
int npNLO_
Definition: LHEEventProduct.h:110
LHEEventProduct::weights_
std::vector< WGT > weights_
Definition: LHEEventProduct.h:106
LHEEventProduct::npLO_
int npLO_
Definition: LHEEventProduct.h:109
LHEEventProduct::PDF
gen::PdfInfo PDF
Definition: LHEEventProduct.h:14
LHEEventProduct::hepeup
const lhef::HEPEUP & hepeup() const
Definition: LHEEventProduct.h:46
LHEEventProduct::comments_
std::vector< std::string > comments_
Definition: LHEEventProduct.h:104
LHEEventProduct::scales
const std::vector< float > & scales() const
Definition: LHEEventProduct.h:37
LHEEventProduct::pdf
const PDF * pdf() const
Definition: LHEEventProduct.h:47
LHEEventProduct::originalXWGTUP_
double originalXWGTUP_
Definition: LHEEventProduct.h:107
mps_fire.result
result
Definition: mps_fire.py:303
mps_splice.line
line
Definition: mps_splice.py:76
LHEEventProduct::pdf_
std::unique_ptr< PDF > pdf_
Definition: LHEEventProduct.h:105