Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
jd2
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
15
#include <
protocols/jd2/BatchJobInputter.hh
>
16
17
///Project headers
18
#include <
protocols/jd2/JobDistributorFactory.hh
>
19
#include <
protocols/jd2/JobDistributor.hh
>
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
42
std::string
const
BatchJobInputter::BOGUS_BATCH_ID
(
"NO_BATCH"
);
43
44
BatchJobInputter::BatchJobInputter
(
std::string
batch1 ) :
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
{
52
this_batch_job_inputter_
=
JobDistributorFactory::create_job_inputter
();
53
}
54
}
55
56
BatchJobInputter::~BatchJobInputter
() {
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.
63
JobInputterInputSource::Enum
BatchJobInputter::input_source
()
const
{
64
return
this_batch_job_inputter_
->input_source();
65
}
66
67
void
BatchJobInputter::check_batch
() {
68
JobDistributor
* jd(
protocols::jd2::JobDistributor::get_instance
() );
69
if
( jd != NULL &&
current_batch_
!= jd->
get_current_batch
() ) {
70
current_batch_
= jd->
get_current_batch
();
71
read_batch
();
72
}
73
}
74
75
void
BatchJobInputter::read_batch
() {
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...
80
this_batch_job_inputter_
=
JobDistributorFactory::create_job_inputter
();
81
}
82
83
}
// jd2
84
}
// protocols
Generated on Sat Jun 1 2013 11:54:37 for Rosetta 3.5 by
1.8.4