Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning raised by deprecated use of tmpnam. #10497

Merged
merged 1 commit into from Aug 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion PhysicsTools/MVAComputer/plugins/ProcTMVA.cc
Expand Up @@ -36,6 +36,8 @@
#include "PhysicsTools/MVAComputer/interface/mva_computer_define_plugin.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include <boost/filesystem.hpp>

using namespace PhysicsTools;

namespace { // anonymous
Expand Down Expand Up @@ -108,7 +110,7 @@ ProcTMVA::ProcTMVA(const char *name,
( reader->BookMVA( methodType, weight_text.c_str() ) ) );
} else {
// Write to a temporary file
TString weight_file_name(std::tmpnam(NULL));
TString weight_file_name(boost::filesystem::unique_path().c_str());
std::ofstream weight_file;
weight_file.open(weight_file_name.Data());
weight_file << weight_text;
Expand Down