18#ifndef VOTCA_CSG_CSGAPPLICATION_H
19#define VOTCA_CSG_CSGAPPLICATION_H
44 void Run(
void)
override;
119 std::unique_ptr<TopologyMap>
map_;
122 void Run(
void)
override;
145 virtual std::unique_ptr<Worker>
ForkWorker(
void);
Observer class for analysis hook.
Worker, derived from Thread, does the work.
virtual void EvalConfiguration(Topology *top, Topology *top_ref=nullptr)=0
overload with the actual computation
std::unique_ptr< TopologyMap > map_
Index getId()
returns worker id
void Run(void) override
Run() executes the actual code.
void setApplication(CsgApplication *app)
virtual bool DoMapping(void)
overload and return true to enable mapping command line options
virtual bool EvaluateTopology(Topology *, Topology *=nullptr)
called after topology was loaded
std::vector< std::unique_ptr< tools::Mutex > > threadsMutexesIn_
stores Mutexes used to impose order for input
void ShowHelpText(std::ostream &out) override
bool EvaluateOptions() override
Process command line options.
virtual bool SynchronizeThreads(void)
virtual void EndEvaluate()
called after the last frame
~CsgApplication() override=default
void Initialize() override
Initialize application data.
void AddObserver(CGObserver *observer)
std::list< CGObserver * > observers_
virtual void MergeWorker(Worker *worker)
virtual void BeginEvaluate(Topology *top, Topology *top_ref=nullptr)
called before the first frame
tools::Mutex nframesMutex_
virtual bool DoMappingDefault(void)
if DoMapping is true, will by default require mapping or not
virtual bool DoTrajectory(void)
overload and return true to enable trajectory command line options
bool ProcessData(Worker *worker)
Gets frames from TrajectoryReader in an ordered way and, if successful, calls Worker::EvalConfigurati...
virtual bool NeedsTopology(void)
if topology is always needed
virtual std::unique_ptr< Worker > ForkWorker(void)
virtual void EvalConfiguration(Topology *top, Topology *top_ref=nullptr)
std::vector< std::unique_ptr< tools::Mutex > > threadsMutexesOut_
stores Mutexes used to impose order for output
tools::Mutex traj_readerMutex_
std::vector< std::unique_ptr< Worker > > myWorkers_
std::unique_ptr< TrajectoryReader > traj_reader_
void Run(void) override
Main body of application.
virtual bool DoThreaded(void)
topology of the whole system
base class for all analysis tools