13 #include <boost/algorithm/string.hpp>
53 lheProduct_( ps.getParameter<edm::InputTag>(
"lheProduct") ),
54 lheFileName_( ps.getParameter<std::string>(
"lheFileName") )
78 const std::vector<std::string>& lheOutputs = LHEAscii->getStrings();
80 unsigned int iout = 0;
84 std::string extension = lastdot != std::string::npos ?
lheFileName_.substr(lastdot+1, std::string::npos) :
"";
86 for (
unsigned int i = 0;
i < lheOutputs.size(); ++
i){
91 std::stringstream
fname;
92 fname << basename <<
"_" << iout ;
94 fname <<
"." << extension;
97 outfile << lheOutputs[
i];
102 for (
unsigned int i = 0;
i < LHEAscii->getCompressed().size(); ++
i){
107 std::stringstream
fname;
108 fname << basename <<
"_" << iout ;
110 fname <<
"." << extension;
113 LHEAscii->writeCompressedContent(outfile,
i);
bool getByLabel(std::string const &label, Handle< PROD > &result) const
virtual void endRun(edm::Run const &, edm::EventSetup const &)
ExternalLHEAsciiDumper(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
~ExternalLHEAsciiDumper()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::InputTag lheProduct_