Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GeneratorInterface
EvtGenInterface
plugins
DataCardFileWriter.cc
Go to the documentation of this file.
1
#include "
GeneratorInterface/EvtGenInterface/interface/DataCardFileWriter.h
"
2
3
#include "
FWCore/Framework/interface/MakerMacros.h
"
4
#include <iostream>
5
#include <fstream>
6
#include <string>
7
#include <vector>
8
#include <cstdlib>
9
10
using namespace
gen
;
11
12
DataCardFileWriter::DataCardFileWriter
(
const
edm::ParameterSet
&
pset
) {
13
std::string
FileName = pset.
getParameter
<
std::string
>(
"FileName"
);
14
std::string
Base
= std::getenv(
"CMSSW_BASE"
);
15
Base +=
"/src/"
;
16
std::cout
<<
"Writting file:"
<< Base + FileName << std::endl;
17
std::ofstream
outputFile
(Base + FileName);
18
std::vector<std::string> FileContent = pset.
getParameter
<std::vector<std::string> >(
"FileContent"
);
19
for
(
unsigned
int
i
= 0;
i
< FileContent.size();
i
++) {
20
outputFile << FileContent.at(
i
) << std::endl;
21
}
22
outputFile.close();
23
std::cout
<<
"File:"
<< Base + FileName <<
" Complete."
<< std::endl;
24
}
25
26
DEFINE_FWK_MODULE
(
DataCardFileWriter
);
download_sqlite_cfg.outputFile
tuple outputFile
Definition:
download_sqlite_cfg.py:5
mps_fire.i
i
Definition:
mps_fire.py:428
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
MakerMacros.h
TrackValidation_cff.pset
tuple pset
Definition:
TrackValidation_cff.py:591
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
relval_steps.gen
def gen
Definition:
relval_steps.py:517
gen::DataCardFileWriter::DataCardFileWriter
DataCardFileWriter(const edm::ParameterSet &)
Definition:
DataCardFileWriter.cc:12
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
CustomConfigs.Base
def Base
Definition:
CustomConfigs.py:17
gen::DataCardFileWriter
Definition:
DataCardFileWriter.h:20
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:144
DataCardFileWriter.h
Generated for CMSSW Reference Manual by
1.8.5