ReFRACtor
source_files_output.cc
Go to the documentation of this file.
1 #include "source_files_output.h"
2 #include "fp_exception.h"
3 // This won't be needed once version 3 becomes the default for boost filesystem
4 #define BOOST_FILESYSTEM_VERSION 3
5 #include <boost/filesystem.hpp>
6 
7 using namespace FullPhysics;
8 
9 #ifdef HAVE_LUA
10 #include "register_lua.h"
12 .def(luabind::constructor<const std::string&, const std::vector<std::string>&, const std::vector<std::string>&>())
14 #endif
15 
17 {
18  if(dataset_names_.size() != file_names_.size())
19  throw Exception("dataset names and file name vectors need to be the same size");
20 
21  for(int name_idx = 0; name_idx < (int) dataset_names_.size(); name_idx++) {
22  // Store basename of file, not full path
23  std::string base_name = boost::filesystem::path(file_names_[name_idx]).filename().string();
24  out->register_data_source(group_name_ + "/" + dataset_names_[name_idx], base_name);
25  }
26 }
This is the base of the exception hierarchy for Full Physics code.
Definition: fp_exception.h:16
#define REGISTER_LUA_DERIVED_CLASS(X, Y)
Definition: register_lua.h:136
Writes source filenames into the output file.
As described in the Output class, we have a decentralized model of producing output for L2 Full Physi...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
#define REGISTER_LUA_END()
Definition: register_lua.h:134
virtual void register_output(const boost::shared_ptr< Output > &out) const
Register portions of class that will be written to output.

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:11