Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4TransportationLogger.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 //
0027 //
0028 // 
0029 // class G4TransportationLogger
0030 //
0031 // Class description:
0032 //
0033 // Simple utility class for use by navigation systems
0034 // for verbosity and check-mode.
0035 
0036 // History:
0037 // - Created. John Apostolakis,  June 2018
0038 // --------------------------------------------------------------------
0039 #ifndef G4TRANSPORTATIONLOGGER_HH
0040 #define G4TRANSPORTATIONLOGGER_HH
0041 
0042 #include "globals.hh"
0043 
0044 class G4Track;
0045 class G4Step;
0046 
0047 class G4TransportationLogger
0048 {
0049   public:  // with description
0050 
0051     G4TransportationLogger(const G4String& className, G4int verbosity);   
0052     G4TransportationLogger(const char*     className, G4int verbosity);
0053    ~G4TransportationLogger();
0054 
0055     // Provide report in case of particle looping in field
0056     //
0057     void ReportLoopingTrack( const G4Track & track,
0058                              const G4Step  & stepInfo,
0059                              G4int           numTrials,                            
0060                              G4long          noCalls,
0061                              const char*     methodName) const;
0062 
0063     // Print the thresholds' values
0064     void ReportLooperThresholds( const char* className );
0065    
0066   public:  // without description
0067 
0068     void SetThresholds( G4double newEnWarn, G4double importantEnergy,
0069                         G4int newMaxTrials );
0070    
0071     G4int GetVerboseLevel() const  { return fVerbose; }
0072     void  SetVerboseLevel(G4int level)  { fVerbose = level; }
0073 
0074     // Get/Set limit parameters for use in reporting
0075     //
0076     G4double GetThresholdWarningEnergy() const { return fThldWarningEnergy; }
0077     G4double GetThresholdImportantEnergy() const { return fThldImportantEnergy; }
0078     G4double GetThresholdTrials() const { return fThldTrials; }
0079        
0080     void SetThresholdWarningEnergy( G4double val )  { fThldWarningEnergy= val; }
0081     void SetThresholdImportantEnergy( G4double val ) { fThldImportantEnergy= val; }
0082     void SetThresholdTrials(G4int maxNoTrials ) { fThldTrials = std::max( maxNoTrials, 1); }
0083   
0084   private:           
0085 
0086     G4String fClassName;       // Name of Transportation process (class name)
0087     G4int    fVerbose;         // Verbosity level
0088 
0089     // Parameters for transporation limits
0090     // Used only for reporting in this class
0091     //
0092     G4double fThldWarningEnergy;
0093     G4double fThldImportantEnergy;
0094     G4int fThldTrials;
0095 };
0096 
0097 #endif