Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JD2ResourceManagerJobInputter.hh
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/resource_manager/planner/JD2ResourceManagerJobInputter.hh
11 /// @brief
12 /// @author
13 
14 #ifndef INCLUDED_protocols_jd2_JD2ResourceManagerJobInputter_hh
15 #define INCLUDED_protocols_jd2_JD2ResourceManagerJobInputter_hh
16 
17 // Package headers
19 
20 // Basic headers
21 #include <basic/options/keys/OptionKeys.hh>
22 #include <basic/resource_manager/JobOptions.fwd.hh>
23 
24 // Utility Headers
25 #include <utility/pointer/ReferenceCount.hh>
26 #include <utility/tag/Tag.fwd.hh>
27 
28 //C++ headers
29 #include <istream>
30 #include <string>
31 
32 namespace protocols {
33 namespace jd2 {
34 
35 
37 {
38 public:
41 
42  ///@brief this function is responsible for filling the pose reference with the pose indicated by the job. The Job object (within its InnerJob) contains a PoseCOP. This function needs to either fill the pose reference from the InnerJob or, on first demand of a pose from that InnerJob, instantiate the pose, hand off a COP to the InnerJob, and fill the reference.
43  virtual void pose_from_job( core::pose::Pose & pose, JobOP job );
44 
45  ///@brief this function determines what jobs exist. This function neither knows nor cares what jobs are already complete on disk/memory - it just figures out what ones should exist given the input. NOTE: your JobInputter should order Job objects in the Jobs vector to have as few "transitions" between inputs as possible (group all Jobs of the same input next to each other). This improves efficiency of the "FAIL_BAD_INPUT" functionality. Note I said "should", not "must".
46  virtual void fill_jobs( Jobs & jobs );
47 
48  /// @brief return the type of input source that the JobInputter is currently
49  /// using
51 
52  void
54  std::istream & instream,
55  Jobs & jobs
56  );
57 
58 private:
59 
60  /// @brief Delete the Resources associated with a job
61  virtual
62  void
64  std::string const & job_tag);
65 
66  void
69  Jobs & jobs
70  );
71 
72  void
74  utility::tag::TagPtr jobs_tags,
75  std::map< std::string, std::string > const & generic_resources_for_job,
76  basic::resource_manager::JobOptions const & generic_job_options,
77  Jobs & jobs
78  );
79 
80  void
83  std::map< std::string, std::string > const & generic_resources_for_job,
84  basic::resource_manager::JobOptions const & generic_job_options,
85  Jobs & jobs
86  );
87 
88  void
89  record_job(
90  std::string const & job_name,
91  std::map< std::string, std::string > const & resources_for_job,
92  basic::resource_manager::JobOptionsOP job_options,
93  Jobs & jobs
94  );
95 
96  void
98  utility::tag::TagPtr options_tag,
99  basic::resource_manager::JobOptionsOP job_options
100  );
101 
102  void
104  std::string const & optname,
105  std::string const & value,
106  basic::resource_manager::JobOptionsOP job_options
107  );
108 
109  void
111  basic::options::BooleanOptionKey const & boolopt,
112  std::string const & optname,
113  std::string const & val,
114  basic::resource_manager::JobOptionsOP job_options
115  );
116 
117  void
119  basic::options::FileOptionKey const & fileopt,
120  std::string const & optname,
121  std::string const & val,
122  basic::resource_manager::JobOptionsOP job_options
123  );
124 
125  void
127  basic::options::IntegerOptionKey const & intopt,
128  std::string const & optname,
129  std::string const & val,
130  basic::resource_manager::JobOptionsOP job_options
131  );
132 
133  void
135  basic::options::PathOptionKey const & pathopt,
136  std::string const & optname,
137  std::string const & val,
138  basic::resource_manager::JobOptionsOP job_options
139  );
140 
141  void
143  basic::options::RealOptionKey const & realopt,
144  std::string const & optname,
145  std::string const & val,
146  basic::resource_manager::JobOptionsOP job_options
147  );
148 
149  void
151  basic::options::StringOptionKey const & stringopt,
152  std::string const & optname,
153  std::string const & val,
154  basic::resource_manager::JobOptionsOP job_options
155  );
156 
157  void
159  basic::options::BooleanVectorOptionKey const & boolvectopt,
160  std::string const & optname,
161  std::string const & val,
162  utility::vector1< std::string > const & vals,
163  basic::resource_manager::JobOptionsOP job_options
164  );
165 
166  void
168  basic::options::FileVectorOptionKey const & filevectopt,
169  std::string const & optname,
170  std::string const & val,
171  utility::vector1< std::string > const & vals,
172  basic::resource_manager::JobOptionsOP job_options
173  );
174 
175  void
177  basic::options::IntegerVectorOptionKey const & intvectopt,
178  std::string const & optname,
179  std::string const & val,
180  utility::vector1< std::string > const & vals,
181  basic::resource_manager::JobOptionsOP job_options
182  );
183 
184  void
186  basic::options::PathVectorOptionKey const & pathvectopt,
187  std::string const & optname,
188  std::string const & val,
189  utility::vector1< std::string > const & vals,
190  basic::resource_manager::JobOptionsOP job_options
191  );
192 
193  void
195  basic::options::RealVectorOptionKey const & realvectopt,
196  std::string const & optname,
197  std::string const & val,
198  utility::vector1< std::string > const & vals,
199  basic::resource_manager::JobOptionsOP job_options
200  );
201 
202  void
204  basic::options::StringVectorOptionKey const & strinvectopt,
205  std::string const & optname,
206  std::string const & val,
207  utility::vector1< std::string > const & vals,
208  basic::resource_manager::JobOptionsOP job_options
209  );
210 
211 
212  void
214  utility::tag::TagPtr options_tag,
215  std::string const & jobname,
216  std::string & input_tag,
217  std::map< std::string, std::string > & resources_for_job
218  );
219 
220  void
222  utility::tag::TagPtr options_tag,
223  std::map< std::string, std::string > & resources_for_job
224  );
225 
226  void
228  Jobs const & jobs
229  ) const;
230 
231 private:
232  ///@brief save the last input tag so the resources loaded for it can
233  ///be unloaded when we see a new input tag
235 
236 };
237 
238 } // namespace jd2
239 } // namespace protocols
240 
241 #endif