File indexing completed on 2025-01-18 09:57:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef G4BaseAnalysisManager_h
0033 #define G4BaseAnalysisManager_h 1
0034
0035 #include "G4Fcn.hh"
0036 #include "G4BinScheme.hh"
0037 #include "globals.hh"
0038
0039 #include "G4AnalysisManagerState.hh"
0040
0041 #include <string_view>
0042
0043 class G4BaseAnalysisManager
0044 {
0045 public:
0046 explicit G4BaseAnalysisManager(const G4AnalysisManagerState& state);
0047 G4BaseAnalysisManager() = delete;
0048 virtual ~G4BaseAnalysisManager() = default;
0049
0050
0051
0052
0053 G4bool SetFirstId(G4int firstId);
0054 void SetLockFirstId(G4bool lockFirstId);
0055
0056
0057 G4int GetFirstId() const;
0058 G4int GetCycle() const;
0059
0060 protected:
0061
0062 G4bool IsVerbose(G4int verboseLevel) const;
0063 void Message(G4int level,
0064 const G4String& action,
0065 const G4String& objectType,
0066 const G4String& objectName = "",
0067 G4bool success = true) const;
0068
0069
0070 const G4AnalysisManagerState& fState;
0071 G4int fFirstId { 0 };
0072 G4bool fLockFirstId { false };
0073
0074 private:
0075
0076 static constexpr std::string_view fkClass { "G4BaseAnalysisManager" };
0077 };
0078
0079
0080
0081 inline G4bool G4BaseAnalysisManager::IsVerbose(G4int verboseLevel) const
0082 { return fState.IsVerbose(verboseLevel); }
0083
0084 inline void G4BaseAnalysisManager::Message(
0085 G4int level, const G4String& action, const G4String& objectType,
0086 const G4String& objectName, G4bool success) const
0087 {
0088 fState.Message(level, action, objectType, objectName, success);
0089 }
0090
0091 inline void G4BaseAnalysisManager::SetLockFirstId(G4bool lockFirstId) {
0092 fLockFirstId = lockFirstId;
0093 }
0094
0095 inline G4int G4BaseAnalysisManager::GetFirstId() const {
0096 return fFirstId;
0097 }
0098
0099 inline G4int G4BaseAnalysisManager::GetCycle() const {
0100 return fState.GetCycle();
0101 }
0102
0103 #endif
0104