GMCJMonitor.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::GMCJMonitor
5 
6 \brief Simple class to create & update MC job status files and env. vars.
7  This is used to be able to keep track of an MC job status even when
8  all output is suppressed or redirected to /dev/null.
9 
10 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
11  University of Liverpool & STFC Rutherford Appleton Lab
12 
13 \created July 13, 2005
14 
15 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17  or see $GENIE/LICENSE
18 */
19 //____________________________________________________________________________
20 
21 #ifndef _G_MC_JOB_MONITOR_H_
22 #define _G_MC_JOB_MONITOR_H_
23 
24 #include <TStopwatch.h>
25 
26 namespace genie {
27 
28 class EventRecord;
29 
30 class GMCJMonitor {
31 
32 public :
33  GMCJMonitor(Long_t runnu);
34  ~GMCJMonitor();
35 
36  void SetRefreshRate (int rate);
37  void Update (int iev, const EventRecord * event);
38  void CustomizeFilename(string filename);
39 
40 private:
41 
42  void Init (void);
43 
44  Long_t fRunNu; ///< run number
45  string fStatusFile; ///< name of output status file
46  TStopwatch fWatch;
47  double fCpuTime; ///< total cpu time so far
48  int fRefreshRate; ///< update output every so many events
49 };
50 
51 } // genie namespace
52 
53 #endif // _G_MC_JOB_MONITOR_H_
int iev
Definition: runWimpSim.h:118
TStopwatch fWatch
Definition: GMCJMonitor.h:46
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
void Update(int iev, const EventRecord *event)
Definition: GMCJMonitor.cxx:58
Long_t fRunNu
run number
Definition: GMCJMonitor.h:44
void CustomizeFilename(string filename)
string filename
Definition: shutoffs.py:106
void SetRefreshRate(int rate)
Definition: GMCJMonitor.cxx:53
Simple class to create & update MC job status files and env. vars. This is used to be able to keep tr...
Definition: GMCJMonitor.h:30
string fStatusFile
name of output status file
Definition: GMCJMonitor.h:45
double fCpuTime
total cpu time so far
Definition: GMCJMonitor.h:47
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:38
GMCJMonitor(Long_t runnu)
Definition: GMCJMonitor.cxx:42
int fRefreshRate
update output every so many events
Definition: GMCJMonitor.h:48