|
||||
File indexing completed on 2025-01-31 09:22:04
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 #ifndef ANALYSISMANAGER_HH 0027 #define ANALYSISMANAGER_HH 0028 0029 #include "globals.hh" 0030 #include <fstream> 0031 0032 class AnalysisManager { 0033 0034 public: 0035 // The analysis class is designed to be a singleton (i.e. only one instance can exist). 0036 // A member function called Instance is defined, which allows the user to get 0037 // a pointer to the existing instance or to create it, if it does not yet exist. 0038 static auto Instance() -> AnalysisManager*; 0039 0040 // The analysis class instance can be deleted by calling the Destroy method. 0041 // (NOTE: The class destructor is protected, and can thus not be called directly) 0042 static void Destroy(); 0043 0044 // Member function used to score the total energy deposit 0045 void ScoreTotalEnergy(G4double totalDepositedEnergy); 0046 0047 // Member function used to dump hits 0048 void Score(G4double depositedEnergy); 0049 0050 protected: 0051 // Constructor (protected) 0052 explicit AnalysisManager(); 0053 0054 // Destructor (protected) 0055 virtual ~AnalysisManager(); 0056 0057 // Prevent copying 0058 AnalysisManager(const AnalysisManager& only); 0059 0060 auto operator=(const AnalysisManager& only) -> const AnalysisManager&; 0061 0062 private: 0063 static AnalysisManager* instance; // The static instance of the AnalysisManager class 0064 0065 std::ofstream dataFile1; 0066 0067 std::ofstream dataFile2; 0068 }; 0069 #endif // ANALYSISMANAGER_HH
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |