test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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 "
Utilities/General/interface/FileInPath.h
"
5
#include <iostream>
6
#include <fstream>
7
#include <string>
8
#include <vector>
9
#include <stdlib.h>
10
11
using namespace
gen
;
12
13
DataCardFileWriter::DataCardFileWriter
(
const
edm::ParameterSet
&
pset
){
14
std::string
FileName
= pset.
getParameter
<
std::string
>(
"FileName"
) ;
15
std::string
Base
= getenv (
"CMSSW_BASE"
);
16
Base+=
"/src/"
;
17
std::cout
<<
"Writting file:"
<< Base+FileName << std::endl;
18
std::ofstream
outputFile
(Base+FileName);
19
std::vector<std::string> FileContent= pset.
getParameter
<std::vector<std::string> >(
"FileContent"
) ;
20
for
(
unsigned
int
i
=0;
i
<FileContent.size();
i
++){
21
outputFile << FileContent.at(
i
) << std::endl;
22
}
23
outputFile.close();
24
std::cout
<<
"File:"
<< Base+FileName <<
" Complete."
<< std::endl;
25
}
26
27
DEFINE_FWK_MODULE
(
DataCardFileWriter
);
download_sqlite_cfg.outputFile
tuple outputFile
Definition:
download_sqlite_cfg.py:5
FileInPath.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
i
int i
Definition:
DBlmapReader.cc:9
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
MakerMacros.h
TrackValidation_cff.pset
tuple pset
Definition:
TrackValidation_cff.py:374
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
relval_steps.gen
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
Definition:
relval_steps.py:223
gen::DataCardFileWriter::DataCardFileWriter
DataCardFileWriter(const edm::ParameterSet &)
Definition:
DataCardFileWriter.cc:13
CustomConfigs.Base
def Base
Definition:
CustomConfigs.py:18
gen::DataCardFileWriter
Definition:
DataCardFileWriter.h:21
edm::ParameterSet
Definition:
ParameterSet.h:36
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:145
DataCardFileWriter.h
cmsPerfCommons.FileName
dictionary FileName
Definition:
cmsPerfCommons.py:82
Generated for CMSSW Reference Manual by
1.8.5