Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BatchJobInputter.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/jd2/BatchJobInputter.cc
11 /// @brief
12 /// @author Oliver Lange
13 
14 ///Unit headers
16 
17 ///Project headers
20 #include <protocols/jd2/Job.hh>
21 
22 // AUTO-REMOVED #include <core/io/pdb/pose_io.hh>
23 // AUTO-REMOVED #include <core/pose/Pose.hh>
24 
25 ///Utility headers
26 #include <basic/Tracer.hh>
27 #include <basic/options/option.hh>
28 // AUTO-REMOVED #include <basic/options/util.hh>
29 #include <utility/vector1.hh>
30 #include <utility/file/FileName.hh>
31 
32 ///C++ headers
33 #include <string>
34 
35 // option key includes
36 
37 static basic::Tracer tr("protocols.jd2.BatchJobInputter");
38 
39 namespace protocols {
40 namespace jd2 {
41 
43 
45  current_batch_( batch1 ),
46  vanilla_options_( basic::options::option )
47 {
48  if ( batch1 != BOGUS_BATCH_ID ) {
49  tr.Debug << "Instantiate BatchJobInputter with batch" << current_batch_ << std::endl;
50  read_batch();
51  } else {
53  }
54 }
55 
57  basic::options::option=vanilla_options_;
58 }
59 
60 /// @brief Return the type of input source that the BatchJobInputter is currently
61 /// using.
62 /// @return The input source for the current batch.
64  return this_batch_job_inputter_->input_source();
65 }
66 
69  if ( jd != NULL && current_batch_ != jd->get_current_batch() ) {
71  read_batch();
72  }
73 }
74 
76  using namespace basic::options;
77  option=vanilla_options_;
78  option.load_options_from_file(current_batch_);
79  //unfortunately I have to copy code from the JobDistributor factory unless I can remove "in:file:batch" from options...
81 }
82 
83 } // jd2
84 } // protocols