Commit 5b915c86 authored by Benjamin Morgan's avatar Benjamin Morgan Committed by Frank Winklmeier
Browse files

Remove obsolete G4AtlasControl package

parent 8d4b8517
......@@ -282,7 +282,6 @@
+ Simulation/BeamEffects
+ Simulation/G4Atlas/G4AtlasAlg
+ Simulation/G4Atlas/G4AtlasApps
+ Simulation/G4Atlas/G4AtlasControl
+ Simulation/G4Atlas/G4AtlasInterfaces
+ Simulation/G4Atlas/G4AtlasServices
+ Simulation/G4Atlas/G4AtlasTools
......
......@@ -15,7 +15,7 @@ __author__ = "A. Dell`Acqua, M. Gallas"
from AthenaCommon import Logging
from time import time
import os, os.path, string, sys
import ROOT,cppyy
import cppyy
# TODO: Rename to AppProfiler, to avoid class/variable confusion
class _app_profiler(object):
......@@ -109,8 +109,6 @@ class G4AtlasEngine:
# pylcgdict default dictionaries
self.load_Dict('AtlasSealCLHEPDict')
self.load_Dict('G4AtlasControlDict')
G4AtlasEngine._ctrl = ROOT.SimControl()
self.init_status = 0
self.useISF = useISF
......@@ -133,7 +131,6 @@ class G4AtlasEngine:
if G4AtlasEngine.log.level <= 30:
from SimFlags import simFlags
simFlags.G4Commands += ['/run/verbose 2'] # FIXME make configurable based on Athena message level?
#G4AtlasEngine._ctrl.initializeG4(is_hive)
G4AtlasEngine.log.info(' G4AtlasEngine: _init_G4: init Geant4 ')
self._InitList.append('init_G4')
G4AtlasEngine._app_profiler('_init_G4: ')
......
################################################################################
# Package: G4AtlasControl
################################################################################
# Declare the package name:
atlas_subdir( G4AtlasControl )
# External dependencies:
find_package( CLHEP )
find_package( Geant4 )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( XercesC )
find_package( Eigen )
# this line failed automatic conversion in cmt2cmake :
# macro_prepend G4AtlasControlDict_shlibflags " -lG4AtlasControl "
# Component(s) in the package:
atlas_add_library( G4AtlasControl
src/*.cxx
PUBLIC_HEADERS G4AtlasControl
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES GaudiKernel
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} )
atlas_add_dictionary( G4AtlasControlDict
G4AtlasControl/G4AtlasControlDict.h
G4AtlasControl/selection.xml
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel G4AtlasControl )
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "G4AtlasControl/SimControl.h"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef G4AtlasControl_SimControl_H
#define G4AtlasControl_SimControl_H
#include <string>
/// @class SimControl
/// @brief C++ class used for passing configuration
/// from the python layer to C++ layer.
///
/// This code was originally written to allow configuration of G4 from
/// the python layer prior to the introduction of configurable
/// properties in Athena classes. Once the FADS migration
/// (ATLASSIM-2256) is complete all of this code should be obsolete.
class SimControl
{
public:
/// Empty Constructor
SimControl();
/// Empty Destructor
virtual ~SimControl();
/// Still used from PyG4Atlas.G4AtlasEngine to initialize Geant4.
void initializeG4(bool isMT=false) const;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@page G4AtlasControl_page G4AtlasControl
@author Andrea Dell'Acqua (dellacqu@mail.cern.ch)
@section G4AtlasControl_G4AtlasControl Introduction
This package includes all the control interfaces from the python layer into the C++ layer of the simulation. All the menus available to the user trhough the AtlasG4Engine are defined here (and are applied in G4AtlasApps).
@section G4AtlasControl_G4AtlasControl Class Overview
The classes in this package are:
- G4CommandInterface : An interface to the G4 command line (available from Python)
- MCTruthMenu : An interface for adding or applying truth strategies during the simulation
- ParticleDataModifier : An interface for modifying particle properties during the simulation (charge, mass, etc)
- SimControl : One interface to rule them all
*/
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "G4AtlasControl/SimControl.h"
// Geant4 includes
#include "G4RunManager.hh"
// STL includes
#include <stdexcept>
SimControl::SimControl()
{
}
SimControl::~SimControl()
{
}
void SimControl::initializeG4(bool isMT) const
{
auto rm = G4RunManager::GetRunManager();
if (rm) {
rm->Initialize();
// Initialization differs slightly in multi-threading.
// TODO: add more details about why this is here.
if(!isMT && rm->ConfirmBeamOnCondition()) {
rm->RunInitialization();
}
}
else throw std::runtime_error("Run manager retrieval has failed");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment