Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LXeRecorderBase.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // LXeRecorderBase.hh
30 // 1-Sep-1999 Bill Seligman
31 
32 // This is an abstract base class to be used with Geant 4.0.1 (and
33 // possibly higher, if the User classes don't change).
34 
35 // The concept of a Recorder object is that it records the activities of
36 // Geant in a manner that is useful to a physicist. Perhaps this record
37 // takes the form of histograms, or ntuples, or entries in an Objectivity
38 // database. This class does not care HOW the information is recorded; it
39 // abstracts the behavior of a generalized recorder of Geant variables.
40 
41 // No object should be instantiated from the Recorder class (in fact, any such
42 // object won't do anything). The user must define a new class (say, a class
43 // that creates histograms) and overload the methods of this class.
44 
45 // Why do this? First of all, it keeps all record-keeping in a single class:
46 // the class that inherits Recorder. The original Geant documentation suggests
47 // that recording activities should be split among many different classes
48 // (initialization in G4UserRunAction, recording in G4UserSteppingAction, etc.).
49 // If you use a Recorder class, than all the record-keeping details are kept in
50 // a single class instead of being spread out among many different classes.
51 
52 // Secondly, by using an abstract Recorder class, you hide the implementation
53 // details from the rest of Geant. If you change a couple of histograms, only
54 // the Recorder-derived class and main() re-compile. No other class knows or
55 // cares what or how you record.
56 
57 // The only time this class (i.e., this header file) changes is if new
58 // user action classes are added to Geant.
59 
60 #ifndef RECORDER_BASE_H_
61 #define RECORDER_BASE_H_
62 
63 // The following objects are the arguments to the methods
64 // invoked in the user action classes. In other words, they
65 // contain the variables that we are normally able to record
66 // in Geant.
67 
68 #include "G4Run.hh"
69 #include "G4Event.hh"
70 #include "G4Track.hh"
71 #include "G4Step.hh"
72 
74 
75  public:
76 
77  virtual ~LXeRecorderBase() {};
78 
79  // The following a list of methods that correspond to the available
80  // user action classes in Geant 4.0.1. In this base class, the
81  // methods are defined to do nothing.
82 
83  virtual void RecordBeginOfRun(const G4Run*) = 0;
84  virtual void RecordEndOfRun(const G4Run*) = 0;
85  virtual void RecordBeginOfEvent(const G4Event*) {};
86  virtual void RecordEndOfEvent(const G4Event*) {};
87  virtual void RecordTrack(const G4Track*) {};
88  virtual void RecordStep(const G4Step*) {};
89 
90 };
91 
92 #endif