Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/advanced/xray_telescope/src/XrayTelRunAction.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 // *                                                                    *
0029 // *                    GEANT 4 xray_telescope advanced example         *
0030 // *                                                                    *
0031 // * MODULE:            XrayTelRunAction.cc                             *
0032 // * -------                                                            *
0033 // *                                                                    *
0034 // * Version:           0.5                                             *
0035 // * Date:              16/10/01                                        *
0036 // * Author:            R Nartallo                                      *
0037 // * Organisation:      ESA/ESTEC, Noordwijk, THe Netherlands           *
0038 // *                                                                    *
0039 // **********************************************************************
0040 // 
0041 // CHANGE HISTORY
0042 // --------------
0043 //
0044 // 07.11.2001 M.G. Pia
0045 // - Modified the analysis management
0046 // - Small design iteration
0047 //
0048 // 16.10.2001 R. Nartallo
0049 // - Updated "/vis" commands to new versions
0050 // - Clean up code to avoid 'pedantic' and 'ANSI' compiler warnings 
0051 //
0052 // 30.11.2000 R. Nartallo
0053 // - Add pre-processor directives to compile without analysis option
0054 //
0055 // 16.11.2000 A. Pfeiffer
0056 // - Implementation of analysis manager call
0057 //
0058 // 06.11.2000 R.Nartallo
0059 // - First implementation of xray_telescope Physics list
0060 // - Based on Chandra and XMM models
0061 // 
0062 //
0063 // **********************************************************************
0064 
0065 #include "XrayTelRunAction.hh"
0066 #include "XrayTelAnalysis.hh"
0067 
0068 #include "G4SystemOfUnits.hh"
0069 #include "G4Run.hh"
0070 #include "G4UImanager.hh"
0071 #include "G4VVisManager.hh"
0072 
0073 XrayTelRunAction::XrayTelRunAction()
0074 { }
0075 
0076 
0077 XrayTelRunAction::~XrayTelRunAction()
0078 { }
0079 
0080 
0081 void XrayTelRunAction::BeginOfRunAction(const G4Run* aRun)
0082 {
0083   G4int runN = aRun->GetRunID();
0084   if (IsMaster())
0085     G4cout << "### Run : " << runN << " (master)" << G4endl;
0086   else
0087     G4cout << "### Run : " << runN << " (worker)" << G4endl;
0088 
0089   if (G4VVisManager::GetConcreteInstance()) {
0090     G4UImanager* UI = G4UImanager::GetUIpointer(); 
0091     UI->ApplyCommand("/vis/scene/notifyHandlers");
0092   } 
0093   // Book histograms and ntuples
0094   XrayTelAnalysis* analysis = XrayTelAnalysis::getInstance();
0095   analysis->book(IsMaster());
0096 }
0097 
0098 
0099 void XrayTelRunAction::EndOfRunAction(const G4Run* )
0100 {
0101   XrayTelAnalysis* analysis = XrayTelAnalysis::getInstance();
0102   analysis->finish(IsMaster());
0103 
0104   if (G4VVisManager::GetConcreteInstance())
0105     G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
0106 }
0107 
0108 
0109 
0110 
0111 
0112 
0113 
0114 
0115 
0116 
0117 
0118 
0119 
0120 
0121 
0122 
0123 
0124 
0125 
0126 
0127