- Timestamp:
- May 17, 2012, 3:21:54 PM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 25b30aa
- Parents:
- 9948a7
- git-author:
- Frederik Heber <heber@…> (12/11/11 17:14:24)
- git-committer:
- Frederik Heber <heber@…> (05/17/12 15:21:54)
- Location:
- src/Fragmentation/Automation/Controller
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.hpp
r9948a7 r96c83b 25 25 public: 26 26 /// Constructor for class CheckResultsOperation. 27 CheckResultsOperation(Connection &_connection , const std::string& _host, const std::string& _service) :28 Operation(_connection , _host, _service),27 CheckResultsOperation(Connection &_connection) : 28 Operation(_connection), 29 29 doneJobs(0) 30 {}30 {} 31 31 /// Destructor for class CheckResultsOperation 32 32 ~CheckResultsOperation() {} -
src/Fragmentation/Automation/Controller/Commands/Operation.cpp
r9948a7 r96c83b 38 38 * \param _connection connection to operate on 39 39 */ 40 Operation::Operation(Connection &_connection , const std::string& _host, const std::string& _service) :40 Operation::Operation(Connection &_connection) : 41 41 connection_(_connection), 42 host(_host),43 service(_service),44 42 Exitflag(OkFlag) 45 43 {} … … 73 71 } 74 72 75 /** Internal function to resolve all possible connection endpoints.76 *77 * \return endpoint iterator of connection78 */79 boost::asio::ip::tcp::resolver::iterator Operation::getEndpointIterator()80 {81 // Resolve the host name into an IP address.82 boost::asio::ip::tcp::resolver resolver(connection_.socket().get_io_service());83 boost::asio::ip::tcp::resolver::query query(host, service);84 boost::asio::ip::tcp::resolver::iterator endpoint_iterator =85 resolver.resolve(query);86 87 return endpoint_iterator;88 }89 90 73 /** Internal function to disconnect connection_ correctly. 91 74 * … … 93 76 void Operation::disconnect() 94 77 { 95 //connection_.socket().close();78 connection_.socket().close(); 96 79 } 97 80 -
src/Fragmentation/Automation/Controller/Commands/Operation.hpp
r9948a7 r96c83b 22 22 class Operation { 23 23 public: 24 Operation(Connection &_connection , const std::string& _host, const std::string& _service);24 Operation(Connection &_connection); 25 25 virtual ~Operation(); 26 26 public: … … 53 53 54 54 protected: 55 /// internal function to resolve host name and ip address56 boost::asio::ip::tcp::resolver::iterator getEndpointIterator();57 58 55 /// internal function to disconnect from server 59 56 void disconnect(); 60 61 protected:62 /// host name of server63 const std::string host;64 65 // service to connect to to66 const std::string service;67 57 68 58 // exit flag of this operation -
src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.hpp
r9948a7 r96c83b 26 26 public: 27 27 /// Constructor for class ReceiveJobsOperation. 28 ReceiveJobsOperation(Connection &_connection , const std::string& _host, const std::string& _service) :29 Operation(_connection , _host, _service) {}28 ReceiveJobsOperation(Connection &_connection) : 29 Operation(_connection) {} 30 30 /// Destructor for class ReceiveJobsOperation 31 31 ~ReceiveJobsOperation() {} -
src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.hpp
r9948a7 r96c83b 26 26 public: 27 27 /// Constructor for class SendResultsOperation. 28 SendResultsOperation(Connection &_connection , const std::string& _host, const std::string& _service) :29 Operation(_connection , _host, _service) {}28 SendResultsOperation(Connection &_connection) : 29 Operation(_connection) {} 30 30 /// Destructor for class SendResultsOperation 31 31 ~SendResultsOperation() {} -
src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.hpp
r9948a7 r96c83b 25 25 public: 26 26 /// Constructor for class ShutdownOperation. 27 ShutdownOperation(Connection &_connection , const std::string& _host, const std::string& _service) :28 Operation(_connection , _host, _service) {}27 ShutdownOperation(Connection &_connection) : 28 Operation(_connection) {} 29 29 /// Destructor for class ShutdownOperation 30 30 ~ShutdownOperation() {} -
src/Fragmentation/Automation/Controller/FragmentController.cpp
r9948a7 r96c83b 37 37 */ 38 38 FragmentController::FragmentController( 39 boost::asio::io_service& io_service, 40 const std::string& _host, 41 const std::string& _service) : 39 boost::asio::io_service& io_service) : 42 40 connection_(io_service), 43 recjobs(connection_ , _host, _service),44 checkres(connection_ , _host, _service),45 sendres(connection_ , _host, _service),46 shutdown(connection_ , _host, _service)41 recjobs(connection_), 42 checkres(connection_), 43 sendres(connection_), 44 shutdown(connection_) 47 45 { 48 46 Info info(__FUNCTION__); -
src/Fragmentation/Automation/Controller/FragmentController.hpp
r9948a7 r96c83b 40 40 { 41 41 public: 42 FragmentController(boost::asio::io_service& io_service , const std::string& _host, const std::string& _service);42 FragmentController(boost::asio::io_service& io_service); 43 43 ~FragmentController(); 44 44 -
src/Fragmentation/Automation/Controller/JobAdder.cpp
r9948a7 r96c83b 58 58 const int NoJobs = boost::lexical_cast<int>(argv[3]); 59 59 boost::asio::io_service io_service; 60 FragmentController controller(io_service , argv[1], argv[2]);60 FragmentController controller(io_service); 61 61 62 62 LOG(1, "INFO: Creating " << NoJobs << " jobs for the server."); -
src/Fragmentation/Automation/Controller/ResultChecker.cpp
r9948a7 r96c83b 57 57 58 58 boost::asio::io_service io_service; 59 FragmentController controller(io_service , argv[1], argv[2]);59 FragmentController controller(io_service); 60 60 61 61 controller.checkres(argv[1], argv[2]); -
src/Fragmentation/Automation/Controller/ResultGetter.cpp
r9948a7 r96c83b 57 57 58 58 boost::asio::io_service io_service; 59 FragmentController controller(io_service , argv[1], argv[2]);59 FragmentController controller(io_service); 60 60 61 61 std::vector<FragmentJob> jobs; -
src/Fragmentation/Automation/Controller/Shutdowner.cpp
r9948a7 r96c83b 57 57 58 58 boost::asio::io_service io_service; 59 FragmentController controller(io_service , argv[1], argv[2]);59 FragmentController controller(io_service); 60 60 61 61 controller.shutdown(argv[1], argv[2]);
Note:
See TracChangeset
for help on using the changeset viewer.