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
 
int evtnum () 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)
 
int npLO () const
 
int npNLO () const
 
LHEEventProductoperator= (LHEEventProduct &&other)
 
double originalXWGTUP () const
 
const PDFpdf () const
 
const std::vector< float > & scales () const
 
void setEvtNum (int n)
 
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 ()
 

Private Attributes

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

Detailed Description

Definition at line 12 of file LHEEventProduct.h.

Member Typedef Documentation

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

Definition at line 18 of file LHEEventProduct.h.

Definition at line 14 of file LHEEventProduct.h.

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

Definition at line 19 of file LHEEventProduct.h.

Definition at line 15 of file LHEEventProduct.h.

Constructor & Destructor Documentation

LHEEventProduct::LHEEventProduct ( )
inline

Definition at line 21 of file LHEEventProduct.h.

21 {}
LHEEventProduct::LHEEventProduct ( const lhef::HEPEUP hepeup)
inline

Definition at line 22 of file LHEEventProduct.h.

22  :
23  hepeup_(hepeup), originalXWGTUP_(0) {}
lhef::HEPEUP hepeup_
LHEEventProduct::LHEEventProduct ( const lhef::HEPEUP hepeup,
const double  originalXWGTUP 
)
inline

Definition at line 24 of file LHEEventProduct.h.

25  :
double originalXWGTUP() const
lhef::HEPEUP hepeup_
LHEEventProduct::LHEEventProduct ( LHEEventProduct &&  other)
inline

Definition at line 27 of file LHEEventProduct.h.

References comments_, evtnum_, hepeup_, eostools::move(), npLO_, npNLO_, originalXWGTUP_, trackingPlots::other, pdf_, scales_, and weights_.

27  {
28  hepeup_ = std::move(other.hepeup_);
29  comments_ = std::move(other.comments_);
30  pdf_ = other.pdf_; // auto_ptr, so copy is actually a move
31  weights_ = std::move(other.weights_);
33  scales_ = std::move(other.scales_);
34  npLO_ = std::move(other.npLO_);
35  npNLO_ = std::move(other.npNLO_);
36  evtnum_ = std::move(other.evtnum_);
37  }
std::auto_ptr< PDF > pdf_
std::vector< std::string > comments_
std::vector< WGT > weights_
std::vector< float > scales_
def move(src, dest)
Definition: eostools.py:511
lhef::HEPEUP hepeup_
LHEEventProduct::~LHEEventProduct ( )
inline

Definition at line 50 of file LHEEventProduct.h.

50 {}

Member Function Documentation

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

Definition at line 56 of file LHEEventProduct.h.

References comments_.

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

56 { comments_.push_back(line); }
std::vector< std::string > comments_
void LHEEventProduct::addWeight ( const WGT wgt)
inline

Definition at line 53 of file LHEEventProduct.h.

References weights_.

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

53  {
54  weights_.push_back(wgt);
55  }
std::vector< WGT > weights_
LHEEventProduct::const_iterator LHEEventProduct::begin ( void  ) const

Definition at line 91 of file LHEEventProduct.cc.

References LHEEventProduct::const_iterator::event, LHEEventProduct::const_iterator::line, mps_fire::result, and LHEEventProduct::const_iterator::tmp.

Referenced by LHEWriter::analyze().

92 {
93  const_iterator result;
94  result.event = this;
95  result.line = 0;
96  result.tmp = "<event>\n";
97  return result;
98 }
comments_const_iterator LHEEventProduct::comments_begin ( ) const
inline

Definition at line 76 of file LHEEventProduct.h.

References comments_.

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

76 { return comments_.begin(); }
std::vector< std::string > comments_
comments_const_iterator LHEEventProduct::comments_end ( ) const
inline

Definition at line 77 of file LHEEventProduct.h.

References comments_.

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

77 { return comments_.end(); }
std::vector< std::string > comments_
size_type LHEEventProduct::comments_size ( ) const
inline

Definition at line 75 of file LHEEventProduct.h.

References comments_.

75 { return comments_.size(); }
std::vector< std::string > comments_
const_iterator LHEEventProduct::end ( void  ) const
inline

Definition at line 121 of file LHEEventProduct.h.

References LHEEventProduct::const_iterator::const_iterator().

Referenced by LHEWriter::analyze().

121 { return const_iterator(); }
int LHEEventProduct::evtnum ( ) const
inline

Definition at line 66 of file LHEEventProduct.h.

References evtnum_.

66 { return evtnum_; }
const char* LHEEventProduct::getComment ( unsigned  i) const
inline

Definition at line 79 of file LHEEventProduct.h.

References comments_, and mps_fire::i.

79  {
80  if(comments_.empty() || i>=comments_.size()) return "";
81  else return (const char*) comments_[i].c_str();
82  }
std::vector< std::string > comments_
const lhef::HEPEUP& LHEEventProduct::hepeup ( ) const
inline
int LHEEventProduct::npLO ( ) const
inline

Definition at line 64 of file LHEEventProduct.h.

References npLO_.

Referenced by LHETablesProducer::fillLHEObjectTable().

64 { return npLO_; }
int LHEEventProduct::npNLO ( ) const
inline

Definition at line 65 of file LHEEventProduct.h.

References npNLO_.

Referenced by LHETablesProducer::fillLHEObjectTable().

65 { return npNLO_; }
LHEEventProduct& LHEEventProduct::operator= ( LHEEventProduct &&  other)
inline

Definition at line 38 of file LHEEventProduct.h.

References comments_, evtnum_, hepeup_, eostools::move(), npLO_, npNLO_, originalXWGTUP_, trackingPlots::other, pdf_, scales_, and weights_.

38  {
39  hepeup_ = std::move(other.hepeup_);
40  comments_ = std::move(other.comments_);
41  pdf_ = other.pdf_; // auto_ptr, so copy is actually a move
42  weights_ = std::move(other.weights_);
44  scales_ = std::move(other.scales_);
45  npLO_ = std::move(other.npLO_);
46  npNLO_ = std::move(other.npNLO_);
47  evtnum_ = std::move(other.evtnum_);
48  return *this;
49  }
std::auto_ptr< PDF > pdf_
std::vector< std::string > comments_
std::vector< WGT > weights_
std::vector< float > scales_
def move(src, dest)
Definition: eostools.py:511
lhef::HEPEUP hepeup_
double LHEEventProduct::originalXWGTUP ( ) const
inline

Definition at line 58 of file LHEEventProduct.h.

References originalXWGTUP_.

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

58 { return originalXWGTUP_; }
const PDF* LHEEventProduct::pdf ( ) const
inline

Definition at line 73 of file LHEEventProduct.h.

References pdf_.

Referenced by LHEEventProduct::const_iterator::next().

73 { return pdf_.get(); }
std::auto_ptr< PDF > pdf_
const std::vector<float>& LHEEventProduct::scales ( ) const
inline

Definition at line 61 of file LHEEventProduct.h.

References scales_.

Referenced by setScales().

61 { return scales_; }
std::vector< float > scales_
void LHEEventProduct::setEvtNum ( int  n)
inline

Definition at line 70 of file LHEEventProduct.h.

References evtnum_, and gen::n.

70 { evtnum_ = n; }
void LHEEventProduct::setNpLO ( int  n)
inline

Definition at line 68 of file LHEEventProduct.h.

References gen::n, and npLO_.

68 { npLO_ = n; }
void LHEEventProduct::setNpNLO ( int  n)
inline

Definition at line 69 of file LHEEventProduct.h.

References gen::n, and npNLO_.

69 { npNLO_ = n; }
void LHEEventProduct::setPDF ( const PDF pdf)
inline

Definition at line 52 of file LHEEventProduct.h.

References pdf_.

52 { pdf_.reset(new PDF(pdf)); }
const PDF * pdf() const
std::auto_ptr< PDF > pdf_
gen::PdfInfo PDF
void LHEEventProduct::setScales ( const std::vector< float > &  scales)
inline

Definition at line 62 of file LHEEventProduct.h.

References scales(), and scales_.

62 { scales_ = scales; }
const std::vector< float > & scales() const
std::vector< float > scales_
const std::vector<WGT>& LHEEventProduct::weights ( ) const
inline

Definition at line 59 of file LHEEventProduct.h.

References weights_.

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

59 { return weights_; }
std::vector< WGT > weights_

Member Data Documentation

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

Definition at line 132 of file LHEEventProduct.h.

Referenced by evtnum(), LHEEventProduct(), operator=(), and setEvtNum().

lhef::HEPEUP LHEEventProduct::hepeup_
private

Definition at line 124 of file LHEEventProduct.h.

Referenced by hepeup(), LHEEventProduct(), and operator=().

int LHEEventProduct::npLO_
private

Definition at line 130 of file LHEEventProduct.h.

Referenced by LHEEventProduct(), npLO(), operator=(), and setNpLO().

int LHEEventProduct::npNLO_
private

Definition at line 131 of file LHEEventProduct.h.

Referenced by LHEEventProduct(), npNLO(), operator=(), and setNpNLO().

double LHEEventProduct::originalXWGTUP_
private

Definition at line 128 of file LHEEventProduct.h.

Referenced by LHEEventProduct(), operator=(), and originalXWGTUP().

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

Definition at line 126 of file LHEEventProduct.h.

Referenced by LHEEventProduct(), operator=(), pdf(), and setPDF().

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

Definition at line 129 of file LHEEventProduct.h.

Referenced by LHEEventProduct(), operator=(), scales(), and setScales().

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

Definition at line 127 of file LHEEventProduct.h.

Referenced by addWeight(), LHEEventProduct(), operator=(), and weights().