source: src/bin/mpqc/MPQCJob.h@ 737c47

Last change on this file since 737c47 was 737c47, checked in by Frederik Heber <heber@…>, 13 years ago

MPQC now uses SamplingGrid as information container for sampled density.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * MPQCJob.h
3 *
4 * Created on: Jul 10, 2012
5 * Author: heber
6 */
7
8#ifndef MPQCJOB_H_
9#define MPQCJOB_H_
10
11
12// include config.h
13#ifdef HAVE_CONFIG_H
14#include <config.h>
15#endif
16
17#include "boost/serialization/export.hpp"
18
19#include "JobMarket/Jobs/FragmentJob.hpp"
20
21#include "Jobs/Grid/SamplingGridProperties.hpp"
22
23#include <string>
24
25/** This class encapsulates a MPQC Job.
26 *
27 */
28class MPQCJob : public FragmentJob
29{
30public:
31 MPQCJob(
32 const JobId_t _JobId,
33 const std::string &_inputfile,
34 const double _begin[3],
35 const double _size,
36 const int _level) :
37 FragmentJob(_JobId),
38 inputfile(_inputfile)
39 {}
40
41 virtual ~MPQCJob() {}
42
43 FragmentResult::ptr Work();
44
45private:
46 //!> contents of the input file
47 const std::string inputfile;
48 //!> information for how to sample the density
49 const SamplingGridProperties grid;
50
51private:
52 /** private default cstor for serialization only
53 */
54 MPQCJob() :
55 FragmentJob(JobId::IllegalJob),
56 {}
57
58 friend class boost::serialization::access;
59 // serialization
60 template <typename Archive>
61 void serialize(Archive& ar, const unsigned int version)
62 {
63 ar & boost::serialization::base_object<FragmentJob>(*this);
64 ar & const_cast<std::string &>(inputfile);
65 ar & const_cast<SamplingGridProperties &<(grid);
66 }
67};
68
69// we need to give this class a unique key for serialization
70// its is only serialized through its base class FragmentJob
71BOOST_CLASS_EXPORT_KEY(MPQCJob)
72
73#endif /* MPQCJOB_H_ */
Note: See TracBrowser for help on using the repository browser.