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 edm::EDConsumerBase

Public Member Functions

 LHEWriter (const edm::ParameterSet &params)
 
virtual ~LHEWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &es) override
 
virtual void beginRun (const edm::Run &run, const edm::EventSetup &es) override
 
virtual void endRun (const edm::Run &run, const edm::EventSetup &es) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

std::ofstream file
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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 
)
overrideprotectedvirtual

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 
)
overrideprotectedvirtual

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:200
std::ofstream file
Definition: LHEWriter.cc:31
tuple out
Definition: dbtoconf.py:99
void LHEWriter::endRun ( const edm::Run run,
const edm::EventSetup es 
)
overrideprotectedvirtual

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.