Changeset 354 for MEMPHYS


Ignore:
Timestamp:
Jun 1, 2007, 8:37:34 PM (17 years ago)
Author:
barrand
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • MEMPHYS/HEAD/applications/MEMPHYS_session.cxx

    r249 r354  
    2222#include <Lib/Out.h>
    2323#include <Lib/Cast.h>
     24#include <Lib/Arguments.h>
    2425
    2526// G4Lab :
     
    9495            accessorManager->removeAccessor(hcName);
    9596            accessorManager->addAccessor
    96               (new MEMPHYS::HitsCollectionAccessor(fSession,hcName));
     97              (new MEMPHYS::HitsCollectionAccessor
     98                (fSession,g4Manager->runManager(),hcName));
    9799          }
    98100        }
     
    106108      accessorManager->addAccessor
    107109        (new MEMPHYS::DigitsCollectionAccessor<MEMPHYS::WCDigi>
    108           (fSession,"WCDigitizedCollection"));
     110          (fSession,g4Manager->runManager(),"WCDigitizedCollection"));
    109111    }
    110112    return true;
    111113  }
    112114 public:
    113   AppManager(Slash::Core::ISession& aSession,AIDA::IAnalysisFactory* aAIDA,bool aBatch)
     115  AppManager(Slash::Core::ISession& aSession,
     116             AIDA::IAnalysisFactory* aAIDA,bool aBatch)
    114117    :Analysis(aAIDA,"",aBatch)
    115118    ,fSession(aSession)
     
    132135  //Lib::Debug::checkByClass(true);
    133136
     137  Lib::Arguments args(aArgc,aArgv);
     138
    134139  G4RunManager* runManager = new G4RunManager;
    135140
     
    143148  runManager->SetGeometryToBeOptimized(false);
    144149
     150  std::string gui;
     151  if(args.isAnArgument("-SDL")||args.isAnArgument("-sdl")) {
     152    gui = "$MEMPHYSROOT/scripts/OnX/SDL.onx";
     153  } else {
     154    gui = "$MEMPHYSROOT/scripts/OnX/MEMPHYS_session.onx";
     155  }
     156 
    145157  // Need to pass the G4RunManager at UIOnX creation
    146   std::string gui = "$MEMPHYSROOT/scripts/OnX/MEMPHYS_session.onx";
    147158  G4Lab::UIOnX* session = new G4Lab::UIOnX(*runManager,gui,aArgc,aArgv);
    148159  if(!session->isValid()) {
Note: See TracChangeset for help on using the changeset viewer.