Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CexmcSensitiveDetectorMessenger Class Reference

#include <CexmcSensitiveDetectorMessenger.hh>

Inheritance diagram for CexmcSensitiveDetectorMessenger:
Collaboration diagram for CexmcSensitiveDetectorMessenger:

Public Member Functions

 CexmcSensitiveDetectorMessenger (G4VPrimitiveScorer *scorer)
 
 ~CexmcSensitiveDetectorMessenger ()
 
void SetNewValue (G4UIcommand *cmd, G4String value)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 55 of file CexmcSensitiveDetectorMessenger.hh.

Constructor & Destructor Documentation

CexmcSensitiveDetectorMessenger::CexmcSensitiveDetectorMessenger ( G4VPrimitiveScorer scorer)
explicit

Definition at line 55 of file CexmcSensitiveDetectorMessenger.cc.

56  :
57  scorer( scorer ), detectorPath( NULL ), setVerboseLevel( NULL )
58 {
59  G4MultiFunctionalDetector * detector(
60  scorer->GetMultiFunctionalDetector() );
61  /* detector of the scorer must have been already initialized provided
62  * CexmcPrimitiveScorer::InitializeMessenger() was properly called upon
63  * creation of the setup */
64  if ( ! detector )
66 
67  G4String detectorFullPath( ( CexmcMessenger::detectorDirName +
68  detector->GetName() + "/" + scorer->GetName() + "/" ).
69  c_str() );
70  G4UImanager * uiManager( G4UImanager::GetUIpointer() );
71  if ( ! uiManager->GetTree()->FindCommandTree( detectorFullPath.c_str() ) )
72  {
73  detectorPath = new G4UIdirectory( detectorFullPath.c_str() );
74  detectorPath->SetGuidance( "Settings for given sensitive detector" );
75  }
76 
77  setVerboseLevel = new G4UIcmdWithAnInteger(
78  ( detectorFullPath + "verbose" ).c_str(), this );
79  setVerboseLevel->SetGuidance( "0 - do not print messages, "
80  "1 - print messages after an event" );
81  setVerboseLevel->SetParameterName( "Verbose", true );
82  setVerboseLevel->SetDefaultValue( 0 );
83  setVerboseLevel->AvailableForStates( G4State_PreInit, G4State_Idle );
84 
85 }
G4String GetName() const
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4MultiFunctionalDetector * GetMultiFunctionalDetector() const
static G4String detectorDirName
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetDefaultValue(G4int defVal)

Here is the call graph for this function:

CexmcSensitiveDetectorMessenger::~CexmcSensitiveDetectorMessenger ( )

Definition at line 88 of file CexmcSensitiveDetectorMessenger.cc.

89 {
90  delete detectorPath;
91  delete setVerboseLevel;
92 }

Member Function Documentation

void CexmcSensitiveDetectorMessenger::SetNewValue ( G4UIcommand cmd,
G4String  value 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 95 of file CexmcSensitiveDetectorMessenger.cc.

97 {
98  do
99  {
100  if ( cmd == setVerboseLevel )
101  {
102  scorer->SetVerboseLevel(
104  break;
105  }
106  } while ( false );
107 }
void SetVerboseLevel(G4int vl)
static G4int GetNewIntValue(const char *paramString)

Here is the call graph for this function:


The documentation for this class was generated from the following files: