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 <constantinos.andreopoulos \at cern.ch>
11  University of Liverpool & STFC Rutherford Appleton Laboratory
12 
13 \created July 13, 2005
14 
15 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17 */
18 //____________________________________________________________________________
19 
20 #ifndef _G_MC_JOB_MONITOR_H_
21 #define _G_MC_JOB_MONITOR_H_
22 
23 #include <TStopwatch.h>
24 #include <string>
25 using std::string;
26 
27 namespace genie {
28 
29 class EventRecord;
30 
31 class GMCJMonitor {
32 
33 public :
34  GMCJMonitor(Long_t runnu);
35  ~GMCJMonitor();
36 
37  void SetRefreshRate (int rate);
38  void Update (int iev, const EventRecord * event);
39  void CustomizeFilename(string filename);
40 
41 private:
42 
43  void Init (void);
44 
45  Long_t fRunNu; ///< run number
46  string fStatusFile; ///< name of output status file
47  TStopwatch fWatch;
48  double fCpuTime; ///< total cpu time so far
49  int fRefreshRate; ///< update output every so many events
50 };
51 
52 } // genie namespace
53 
54 #endif // _G_MC_JOB_MONITOR_H_
TStopwatch fWatch
Definition: GMCJMonitor.h:47
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
std::string string
Definition: nybbler.cc:12
void Update(int iev, const EventRecord *event)
Definition: GMCJMonitor.cxx:48
Long_t fRunNu
run number
Definition: GMCJMonitor.h:45
void CustomizeFilename(string filename)
Definition: GMCJMonitor.cxx:97
string filename
Definition: train.py:213
void SetRefreshRate(int rate)
Definition: GMCJMonitor.cxx:43
Simple class to create & update MC job status files and env. vars. This is used to be able to keep tr...
Definition: GMCJMonitor.h:31
string fStatusFile
name of output status file
Definition: GMCJMonitor.h:46
double fCpuTime
total cpu time so far
Definition: GMCJMonitor.h:48
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:37
GMCJMonitor(Long_t runnu)
Definition: GMCJMonitor.cxx:32
int fRefreshRate
update output every so many events
Definition: GMCJMonitor.h:49
Event finding and building.