CMS 3D CMS Logo

DataCardFileWriter.cc
Go to the documentation of this file.
2 
4 #include <iostream>
5 #include <fstream>
6 #include <string>
7 #include <vector>
8 #include <cstdlib>
9 
10 using namespace gen;
11 
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 
mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CustomConfigs.Base
def Base(process)
Definition: CustomConfigs.py:17
MakerMacros.h
download_sqlite_cfg.outputFile
outputFile
Definition: download_sqlite_cfg.py:5
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
gen
Definition: PythiaDecays.h:13
DataCardFileWriter.h
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FileWriter_cfi.FileContent
FileContent
Definition: FileWriter_cfi.py:5
MonitorAlCaEcalPhisym_cfi.FileName
FileName
Definition: MonitorAlCaEcalPhisym_cfi.py:15
gen::DataCardFileWriter::DataCardFileWriter
DataCardFileWriter(const edm::ParameterSet &)
Definition: DataCardFileWriter.cc:12
gen::DataCardFileWriter
Definition: DataCardFileWriter.h:20
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27