Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/advanced/underground_physics/src/DMXRunActionMessenger.cc 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 //   GEANT 4 - Underground Dark Matter Detector Advanced Example
0029 //
0030 //      For information related to this code contact: Alex Howard
0031 //      e-mail: alexander.howard@cern.ch
0032 // --------------------------------------------------------------
0033 // Comments
0034 //
0035 //                  Underground Advanced
0036 //               by A. Howard and H. Araujo 
0037 //                    (27th November 2001)
0038 //
0039 // RunActionMessenger program
0040 // --------------------------------------------------------------
0041 
0042 #include "DMXRunActionMessenger.hh"
0043 
0044 #include <sstream>
0045 
0046 #include "DMXRunAction.hh"
0047 
0048 #include "G4UIcmdWithAString.hh"
0049 #include "G4UIcmdWithABool.hh"
0050 #include "G4ios.hh"
0051 #include "globals.hh"
0052 
0053 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0054 
0055 DMXRunActionMessenger::DMXRunActionMessenger(DMXRunAction* run)
0056 :DMXRun(run)
0057 { 
0058   SaveHitsCmd = new G4UIcmdWithAString("/dmx/hitsfile",this);
0059   SaveHitsCmd->SetGuidance("output file for hits collection (txt)");
0060   SaveHitsCmd->SetGuidance("Default = hits.out");
0061   SaveHitsCmd->SetParameterName("savehitsFile", false);
0062   SaveHitsCmd->SetDefaultValue("hits.out");
0063 
0064   SavePmtCmd = new G4UIcmdWithAString("/dmx/pmtfile",this);
0065   SavePmtCmd->SetGuidance("output file for pmt hits (txt)");
0066   SavePmtCmd->SetGuidance("Default = pmt.out");
0067   SavePmtCmd->SetParameterName("savepmtFile", false);
0068   SavePmtCmd->SetDefaultValue("pmt.out");
0069 
0070   SaveHistFileCmd = new G4UIcmdWithAString("/dmx/histogramfile",this);
0071   SaveHistFileCmd->SetGuidance("output file for histograms");
0072   SaveHistFileCmd->SetGuidance("Default = dmx.his");
0073   //  SaveHistFileCmd->SetParameterName("savehistFile", false);
0074   SaveHistFileCmd->SetParameterName("histFile", false);
0075   SaveHistFileCmd->SetDefaultValue("dmx.his");
0076 
0077 
0078   //  FileCmd->AvailableForStates(G4State_Idle);
0079 }
0080 
0081 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0082 
0083 DMXRunActionMessenger::~DMXRunActionMessenger()
0084 {
0085   delete SaveHitsCmd;  
0086   delete SavePmtCmd;  
0087   delete SaveHistFileCmd;  
0088 }
0089 
0090 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0091 
0092 void DMXRunActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
0093 { 
0094   if(command == SaveHitsCmd)
0095     DMXRun->SetsavehitsFile(newValue);
0096 
0097   if(command == SavePmtCmd)
0098     DMXRun->SetsavepmtFile(newValue);
0099 
0100   if(command == SaveHistFileCmd)
0101     DMXRun->SetsavehistFile(newValue);
0102 
0103 
0104 }
0105 
0106 
0107 
0108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0109 
0110 
0111 
0112 
0113