Changeset 1315 for trunk/source/run


Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

Location:
trunk/source/run
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/run/History

    r1196 r1315  
    1 $Id: History,v 1.191 2009/11/18 18:02:06 gcosmo Exp $
     1$Id: History,v 1.194 2010/06/11 09:03:14 gcosmo Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     19
     20June 10th, 2010 G.Cosmo (run-V09-03-01)
     21- Fixed definition of path for Windows in G4RunManager for random seeds
     22  directory: use '\' instead of '/' and suitable system command.
     23- Use "const G4String&" as arguments and return value wherever applicable
     24  in G4RunManager and G4RunManagerKernel.
     25
     26May 30th, 2010 M.Asai (run-V09-03-00)
     27- Tag for v9.4-beta release
     28
     29May 11th, 2010 J.Allison
     30- Correct printing of number of events processed on run abortion.
    1931
    2032November 18th, 2009 G.Cosmo (run-V09-02-09)
  • trunk/source/run/include/G4RunManager.hh

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4RunManager.hh,v 1.52 2009/11/13 23:14:46 asaim Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4RunManager.hh,v 1.53 2010/06/11 09:02:14 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    9292#include "globals.hh"
    9393#include <vector>
    94 #include <stdlib.h>
     94#include <algorithm>
    9595
    9696class G4RunManager
     
    202202    // the user needs not invoke.
    203203
    204     void DumpRegion(G4String rname) const;
     204    void DumpRegion(const G4String& rname) const;
    205205    // Dump information of a region.
    206206
     
    260260    virtual void rndmSaveThisRun();
    261261    virtual void rndmSaveThisEvent();
    262     virtual void RestoreRandomNumberStatus(G4String fileN);
     262    virtual void RestoreRandomNumberStatus(const G4String& fileN);
    263263
    264264  public: // with description
     
    320320      // he/she can use the corresponding ENUM in G4ClassificationOfNewTrack.
    321321
    322     inline G4String GetVersionString() const
     322    inline const G4String& GetVersionString() const
    323323    { return kernel->GetVersionString(); }
    324324
     
    343343    inline G4bool GetRandomNumberStore() const
    344344    { return storeRandomNumberStatus; }
    345     inline void SetRandomNumberStoreDir(G4String dir)
     345    inline void SetRandomNumberStoreDir(const G4String& dir)
    346346    {
    347347      G4String dirStr = dir;
    348348      if( dirStr(dirStr.length()-1) != '/' ) dirStr += "/";
     349#ifndef WIN32
     350      G4String shellCmd = "mkdir -p ";
     351#else
     352      std::replace(dirStr.begin(), dirStr.end(),'/','\\');
     353      G4String shellCmd = "mkdir ";
     354#endif
     355      shellCmd += dirStr;
    349356      randomNumberStatusDir = dirStr;
    350       G4String shellCmd = "mkdir -p ";
    351       shellCmd += dirStr;
    352357      system(shellCmd);
    353358    }
    354     inline G4String GetRandomNumberStoreDir() const
     359    inline const G4String& GetRandomNumberStoreDir() const
    355360    { return randomNumberStatusDir; }
    356361    inline const G4String& GetRandomNumberStatusForThisRun() const
  • trunk/source/run/include/G4RunManagerKernel.hh

    r1058 r1315  
    2525//
    2626//
    27 // $Id: G4RunManagerKernel.hh,v 1.9 2007/05/30 00:42:09 asaim Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4RunManagerKernel.hh,v 1.10 2010/06/11 09:02:55 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    8686  public: // with description
    8787    void DefineWorldVolume(G4VPhysicalVolume * worldVol,
    88                                    G4bool topologyIsChanged=true);
     88                           G4bool topologyIsChanged=true);
    8989    //  This method must be invoked if the geometry setup has been changed between
    9090    // runs. The flag 'topologyIsChanged' will specify if the geometry topology is
     
    121121    // the user needs not invoke.
    122122
    123     void DumpRegion(G4String rname) const;
     123    void DumpRegion(const G4String& rname) const;
    124124    // Dump information of a region.
    125125
     
    170170    { return eventManager->GetPrimaryTransformer(); }
    171171
    172     inline G4String GetVersionString() const
     172    inline const G4String& GetVersionString() const
    173173    { return versionString; }
    174174
  • trunk/source/run/src/G4RunManager.cc

    r1058 r1315  
    2525//
    2626//
    27 // $Id: G4RunManager.cc,v 1.108 2007/11/09 13:57:39 asaim Exp $
    28 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     27// $Id: G4RunManager.cc,v 1.110 2010/06/11 09:02:55 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    137137    numberOfEventToBeProcessed = n_event;
    138138    ConstructScoringWorlds();
    139     printf("G4RunManager::BeamOn before INIT\n");
    140139    RunInitialization();
    141     printf("G4RunManager::BeamOn after INIT\n");
    142140    if(n_event>0) DoEventLoop(n_event,macroFile,n_select);
    143     printf("G4RunManager::BeamOn before END\n");
    144141    RunTermination();
    145     printf("G4RunManager::BeamOn after END\n");
    146142  }
    147143}
     
    236232  for( i_event=0; i_event<n_event; i_event++ )
    237233  {
    238     printf("1\n");
    239234    currentEvent = GenerateEvent(i_event);
    240     printf("2\n");
    241235    eventManager->ProcessOneEvent(currentEvent);
    242     printf("3\n");
    243236    AnalyzeEvent(currentEvent);
    244     printf("4\n");
    245237    UpdateScoring();
    246     printf("5\n");
    247238    if(i_event<n_select) G4UImanager::GetUIpointer()->ApplyCommand(msg);
    248     printf("6\n");
    249239    StackPreviousEvent(currentEvent);
    250     printf("7\n");
    251240    currentEvent = 0;
    252     printf("8\n");
    253241    if(runAborted) break;
    254     printf("9\n");
    255242  }
    256243
     
    261248    G4cout << "Run Summary" << G4endl;
    262249    if(runAborted)
    263     { G4cout << "  Run Aborted after " << i_event << " events processed." << G4endl; }
     250    { G4cout << "  Run Aborted after " << i_event + 1 << " events processed." << G4endl; }
    264251    else
    265252    { G4cout << "  Number of events processed : " << n_event << G4endl; }
     
    467454}
    468455 
    469 void G4RunManager::RestoreRandomNumberStatus(G4String fileN)
     456void G4RunManager::RestoreRandomNumberStatus(const G4String& fileN)
    470457{
    471458  G4String fileNameWithDirectory;
     
    481468}
    482469
    483 void G4RunManager::DumpRegion(G4String rname) const
     470void G4RunManager::DumpRegion(const G4String& rname) const
    484471{
    485472  kernel->UpdateRegion();
  • trunk/source/run/src/G4RunManagerKernel.cc

    r1196 r1315  
    2525//
    2626//
    27 // $Id: G4RunManagerKernel.cc,v 1.47 2009/11/13 23:13:40 asaim Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4RunManagerKernel.cc,v 1.48 2010/06/11 09:02:55 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2929//
    3030//
     
    431431}
    432432
    433 void G4RunManagerKernel::DumpRegion(G4String rname) const
     433void G4RunManagerKernel::DumpRegion(const G4String& rname) const
    434434{
    435435  G4Region* region = G4RegionStore::GetInstance()->GetRegion(rname);
Note: See TracChangeset for help on using the changeset viewer.