thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ProgressLog.h
1// -*- C++ -*-
2#ifndef THEPEG_ProgressLog_H
3#define THEPEG_ProgressLog_H
4//
5// This is the declaration of the ProgressLog class.
6//
7
8#include "ThePEG/Handlers/AnalysisHandler.h"
9
10namespace ThePEG {
11
30
31public:
32
37
38public:
39
59 virtual void analyze(tEventPtr event, long ieve, int loop, int state);
61
65 static double fclock();
66
70 bool statusTime(long i, long n) const;
71
72public:
73
81
87 void persistentInput(PersistentIStream & is, int version);
89
96 static void Init();
97
98protected:
99
106 virtual IBPtr clone() const;
107
112 virtual IBPtr fullclone() const;
114
115
116
117protected:
118
125 virtual void doinitrun();
127
128private:
129
134
138 time_t time0;
139
143 double fcpu0;
144
148 time_t time1;
149
153 double fcpu1;
154
158 string host;
159
163 pid_t pid;
164
165private:
166
172
177 ProgressLog & operator=(const ProgressLog &) = delete;
178
179};
180
181}
182
183#include "ThePEG/Utilities/ClassTraits.h"
184
185namespace ThePEG {
186
191template <>
192struct BaseClassTrait<ProgressLog,1> {
194 typedef AnalysisHandler NthBase;
195};
196
199template <>
200struct ClassTraits<ProgressLog>
201 : public ClassTraitsBase<ProgressLog> {
203 static string className() { return "ThePEG::ProgressLog"; }
211 static string library() { return "ProgressLog.so"; }
212};
213
216}
217
218#endif /* THEPEG_ProgressLog_H */
The AnalysisHandler is the base class of all analysis objects which may be handled by the FullEventGe...
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
InitState state() const
Return the state of initialization of this object.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
The ProgressLog class will not perform an actual analysis.
Definition: ProgressLog.h:29
ProgressLog & operator=(const ProgressLog &)=delete
The assignment operator is private and must never be called.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual void doinitrun()
Initialize this object.
static void Init()
The standard Init function used to initialize the interfaces.
time_t time0
The clock when the run was started.
Definition: ProgressLog.h:138
time_t time1
The clock the last time a status line was written out.
Definition: ProgressLog.h:148
virtual void analyze(tEventPtr event, long ieve, int loop, int state)
Analyze a given Event.
double fcpu0
The cpu clock when the run was started.
Definition: ProgressLog.h:143
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
double fcpu1
The cpu clock the last time a status line was written out.
Definition: ProgressLog.h:153
static double fclock()
Return the cpu clock in seconds.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ProgressLog()
The default constructor.
static ClassDescription< ProgressLog > initProgressLog
The static object used to initialize the description of this class.
Definition: ProgressLog.h:171
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
int secstep
If larger than 0, a status line will be written every secstep second.
Definition: ProgressLog.h:133
pid_t pid
The pid of the current process.
Definition: ProgressLog.h:163
bool statusTime(long i, long n) const
Check if it is time to write out a status line.
string host
The host on which we are running.
Definition: ProgressLog.h:158
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition: ClassTraits.h:85