Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FileSystemJobDistributor.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/jd2/FileSystemJobDistributor.hh
11 /// @brief August 2008 job distributor as planned at RosettaCon08 - Simplest class FileSystemJobDistributor
12 /// @author Andrew Leaver-Fay
13 /// @author Steven Lewis smlewi@gmail.com
14 
15 #ifndef INCLUDED_protocols_jd2_FileSystemJobDistributor_hh
16 #define INCLUDED_protocols_jd2_FileSystemJobDistributor_hh
17 
18 // Unit headers
20 
21 // Package headers
23 //#include <protocols/jd2/JobInputter.fwd.hh>
24 //#include <protocols/jd2/JobOutputter.fwd.hh>
25 #include <protocols/jd2/Job.fwd.hh>
26 // AUTO-REMOVED #include <protocols/jd2/JobDistributorFactory.fwd.hh>
27 
28 //#include <protocols/moves/Mover.fwd.hh>
29 
30 // Utility headers
31 #include <core/types.hh>
32 
33 // C++ headers
34 #include <string>
35 
36 #include <utility/vector1.hh>
37 
38 
39 namespace protocols {
40 namespace jd2 {
41 
43 {
44 protected:
46 
47 public:
48  ///WARNING WARNING! SINGLETONS' DESTRUCTORS ARE NEVER CALLED IN MINI! DO NOT TRY TO PUT THINGS IN THIS FUNCTION!
49  ///here's a nice link explaining why: http://www.research.ibm.com/designpatterns/pubs/ph-jun96.txt
50  virtual ~FileSystemJobDistributor();
51 
52  virtual void restart();
53 
54  virtual
57 
58  virtual
59  void
61 
62  virtual
63  void
65 
66  virtual
67  void
69 
70  virtual
71  void
73 
74  friend class JobDistributorFactory; // calls protected ctor
75 protected:
76 
77  ///@brief This function is called upon a successful job completion; it has been virtualized so BOINC and MPI can delay/protect output
78  ///base implementation is just a call to the job outputter
79  virtual
80  void
81  job_succeeded( core::pose::Pose & pose, core::Real run_time );
82 
83  ///@brief This function is called when we five up on the job; it has been virtualized so BOINC and MPI can delay/protect output
84  ///base implementation is just a call to the job outputter
85  virtual
86  void
87  job_failed( core::pose::Pose & pose, bool will_retry );
88 
89  virtual void handle_interrupt();
90 
91 private:
92  /// @brief delete all temporary files for this job
94 
95  ///@brief tacks an extension (.in_progress) on to filename - for multiple process/one directory behaviour
96  std::string const temporary_file_name( JobCOP job ) const;
97 
100 
101  // core::Size next_job_to_try_assigning_; //don't it is redundant with current_job_id_ in the base-class
102 
104 };
105 
106 }//jd2
107 }//protocols
108 
109 #endif //INCLUDED_protocols_jd2_FileSystemJobDistributor_HH