CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
LHEWriter Class Reference
Inheritance diagram for LHEWriter:
edm::EDAnalyzer

Public Member Functions

 LHEWriter (const edm::ParameterSet &params)
 
virtual ~LHEWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &es)
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &es)
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &es)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

std::ofstream file
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 20 of file LHEWriter.cc.

Constructor & Destructor Documentation

LHEWriter::LHEWriter ( const edm::ParameterSet params)
explicit

Definition at line 34 of file LHEWriter.cc.

35 {
36 }
LHEWriter::~LHEWriter ( )
virtual

Definition at line 38 of file LHEWriter.cc.

39 {
40 }

Member Function Documentation

void LHEWriter::analyze ( const edm::Event event,
const edm::EventSetup es 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 58 of file LHEWriter.cc.

References filterCSVwithJSON::copy, and mergeVDriftHistosByStation::file.

59 {
61  event.getByLabel("source", product);
62 
63  std::copy(product->begin(), product->end(),
64  std::ostream_iterator<std::string>(file));
65 }
std::ofstream file
Definition: LHEWriter.cc:31
void LHEWriter::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 42 of file LHEWriter.cc.

References filterCSVwithJSON::copy, mergeVDriftHistosByStation::file, edm::Run::getByLabel(), dbtoconf::out, and estimatePileup_makeJSON::trunc.

43 {
45  run.getByLabel("source", product);
46 
47  file.open("writer.lhe", std::fstream::out | std::fstream::trunc);
48  std::copy(product->begin(), product->end(),
49  std::ostream_iterator<std::string>(file));
50 }
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:177
std::ofstream file
Definition: LHEWriter.cc:31
tuple out
Definition: dbtoconf.py:99
void LHEWriter::endRun ( const edm::Run run,
const edm::EventSetup es 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 52 of file LHEWriter.cc.

References LHERunInfoProduct::endOfFile(), and mergeVDriftHistosByStation::file.

53 {
55  file.close();
56 }
std::ofstream file
Definition: LHEWriter.cc:31
static const std::string & endOfFile()

Member Data Documentation

std::ofstream LHEWriter::file
private

Definition at line 31 of file LHEWriter.cc.