/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
GeneratorInterface/EvtGenInterface/plugins/DataCardFileWriter.cc
28 строк
948 B
Ivan Razumov
[LLVM Analyzer][Generators] Cleanup LLVM analyzer warnings
16 окт 2024, 14:43
16 окт 2024, 14:43
e06f9ae
Код
Авторство
О чём код?
#include "GeneratorInterface/EvtGenInterface/interface/DataCardFileWriter.h" #include "FWCore/Framework/interface/MakerMacros.h" #include <iostream> #include <fstream> #include <string> #include <vector> #include <cstdlib> using namespace gen; DataCardFileWriter::DataCardFileWriter(const edm::ParameterSet& pset) { std::string FileName = pset.getParameter<std::string>("FileName"); char* tmp = std::getenv("CMSSW_BASE"); assert(tmp); std::string Base(tmp); Base += "/src/"; std::cout << "Writting file:" << Base + FileName << std::endl; std::ofstream outputFile(Base + FileName); std::vector<std::string> FileContent = pset.getParameter<std::vector<std::string> >("FileContent"); for (unsigned int i = 0; i < FileContent.size(); i++) { outputFile << FileContent.at(i) << std::endl; } outputFile.close(); std::cout << "File:" << Base + FileName << " Complete." << std::endl; } DEFINE_FWK_MODULE(DataCardFileWriter);