Geant4-11
|
Variables | |
action | |
dictionary | adjList = {} |
args = parser.parse_args() | |
string | cycle = " <- ".join(err.args[1]) |
file | |
help | |
metavar | |
nodes = line.rstrip("\n").split(" ") | |
parser | |
required | |
ts = graphlib.TopologicalSorter(adjList) | |
Check Geant4's module dependency graph for cycles Geant4 organises source code into "Modules", with each Module being a directory containing headers and sources in `include/` and `src/` subdirectories respectively. One or more Modules are grouped/compiled into the actual libraries. CMake will raise errors if there are circular dependencies between shared libraries (cycles are allowed between static libraries). However, CMake cannot detect cycles between Modules directly, are these are a Geant4 construct. Whilst cycles between modules that get added to the same library are technically o.k., they still indicate either: - A bad design/organisation of code - A mistake in the declared dependencies for a module(s) To help developers and CI pick module cycles, Geant4's CMake scripts write out the declared module dependencies in a text file as an Adjacency List graph. This comprises one line per module, with the first column being the module name, and any remaining columns being the modules the first one "depends on", i.e. uses code from. This program reads that file and uses Python's graphlib module to try topologically sorting this graph. Failure to sort indicates a cycle, and this will be printed to stdout and a non-zero return code emitted on exit.
geant4_check_module_cycles.action |
Definition at line 49 of file geant4_check_module_cycles.py.
Referenced by G4UIQt.AddButton(), G4UIQt.AddIcon(), G4UIQt.ChangeCursorAction(), G4UIQt.ChangePerspectiveOrtho(), G4UIQt.ChangeSurfaceStyle(), G4Profiler.Configure(), G4BinaryCascade.DebugApplyCollisionFail(), G4OpenInventorQtExaminerViewer.findAndSetRefPath(), G4OpenInventorXtExaminerViewer.findAndSetRefPath(), SoBox.generatePrimitives(), SoCons.generatePrimitives(), SoTrap.generatePrimitives(), SoTrd.generatePrimitives(), SoTubs.generatePrimitives(), gl2psPrintPDFShaderStreamData(), gl2psTraverseBspTree(), G4AnalysisManagerState.Message(), G4BaseAnalysisManager.Message(), G4BaseFileManager.Message(), G4VNtupleFileManager.Message(), G4AnalysisVerbose.Message(), G4OpenInventorQtExaminerViewer.mouseoverCB(), G4OpenInventorXtExaminerViewer.mouseoverCB(), G4OpenInventorQtExaminerViewer.pickingCB(), G4OpenInventorXtExaminerViewer.pickingCB(), G4CollisionManager.Print(), G4OpenGLSceneHandler.SetFlushAction(), G4OpenGLViewerMessenger.SetNewValue(), G4VisCommandSceneEndOfEventAction.SetNewValue(), G4VisCommandSceneEndOfRunAction.SetNewValue(), G4VUserActionInitialization.SetUserAction(), G4OpenInventorQtExaminerViewer.superimpositionCB(), G4OpenInventorXtExaminerViewer.superimpositionCB(), G4OpenInventorQtExaminerViewer.superimpositionEvent(), and G4OpenInventorXtExaminerViewer.superimpositionEvent().
dictionary geant4_check_module_cycles.adjList = {} |
Definition at line 56 of file geant4_check_module_cycles.py.
geant4_check_module_cycles.args = parser.parse_args() |
Definition at line 52 of file geant4_check_module_cycles.py.
string geant4_check_module_cycles.cycle = " <- ".join(err.args[1]) |
Definition at line 94 of file geant4_check_module_cycles.py.
Referenced by G4UniformRandPool.GetMany(), CLHEP::HepJamesRandom.HepJamesRandom(), CLHEP::MTwistEngine.MTwistEngine(), CLHEP::RanecuEngine.RanecuEngine(), CLHEP::Ranlux64Engine.Ranlux64Engine(), and CLHEP::RanluxEngine.RanluxEngine().
geant4_check_module_cycles.file |
Definition at line 92 of file geant4_check_module_cycles.py.
Referenced by G4UIQt.AddViewerTabFromFile(), G4ParticleHPJENDLHEData.BuildPhysicsTable(), G4IonStoppingData.BuildPhysicsVector(), CLHEP::HepRandomEngine.checkFile(), G4Hdf5FileManager.CloseFileImpl(), G4RootFileManager.CloseFileImpl(), G4CsvFileManager.CloseFileImpl(), G4XmlFileManager.CloseFileImpl(), G4Hdf5FileManager.CreateDirectory(), G4CsvFileManager.CreateFileImpl(), G4Hdf5FileManager.CreateFileImpl(), G4RootFileManager.CreateFileImpl(), G4XmlFileManager.CreateFileImpl(), G4OpenInventorXtExaminerViewer.createNewVPFileCB(), G4Hdf5FileManager.CreateNtupleFile(), G4RootFileManager.CreateNtupleFile(), G4RootPNtupleManager.CreateNtupleFromMain(), G4PersistencyCenter.CurrentObject(), G4FileUtilities.DeleteFile(), G4FileUtilities.FileExists(), G4PixeShellDataSet.FullFileName(), G4IsotopeMagneticMomentTable.G4IsotopeMagneticMomentTable(), G4LEPTSDiffXS.G4LEPTSDiffXS(), G4LEPTSElossDistr.G4LEPTSElossDistr(), G4ParticleHPNames.GetName(), gzbuffer(), gzclearerr(), gzclose(), gzclose_r(), gzclose_w(), gzdirect(), gzeof(), gzerror(), gzflush(), gzfread(), gzfwrite(), gzgetc(), gzgetc_(), gzgets(), gzoffset(), gzoffset64(), gzprintf(), gzputc(), gzputs(), gzread(), gzrewind(), gzseek(), gzseek64(), gzsetparams(), gztell(), gztell64(), gzungetc(), gzwrite(), G4LivermoreComptonModel.Initialise(), G4LivermorePolarizedComptonModel.Initialise(), G4LowEPComptonModel.Initialise(), G4LowEPPolarizedComptonModel.Initialise(), G4DopplerProfile.LoadBiggsP(), G4eIonisationParameters.LoadData(), G4VCrossSectionHandler.LoadData(), G4ShellData.LoadData(), G4PixeShellDataSet.LoadData(), G4ShellEMDataSet.LoadData(), G4AugerData.LoadData(), G4FluoData.LoadData(), G4RadioactiveDecay.LoadDecayTable(), G4VCrossSectionHandler.LoadNonLogData(), G4ShellEMDataSet.LoadNonLogData(), G4DopplerProfile.LoadProfile(), G4OpenInventorXtExaminerViewer.loadRefCoordsCB(), G4OpenInventorXtExaminerViewer.loadSceneGraphCB(), MCGIDI_misc_pointerToAttributeIfAllOk(), MCGIDI_misc_pointerToTOMAttributeIfAllOk(), MCGIDI_misc_setMessageError_Element(), G4Hdf5RFileManager.OpenDirectory(), G4RootRFileManager.OpenRFile(), PoPs_particleIndex_smr(), G4PersistencyCenter.PrintAll(), G4ParticleHPJENDLHEData.readAFile(), G4VDNAModel.ReadAndSaveCSFile(), G4ParticleHPThermalScattering.readAnE_isoAng(), G4ParticleHPThermalScattering.readAnE_P_E_isoAng(), G4PenelopeBremsstrahlungAngular.ReadDataFile(), G4PenelopeGammaConversionModel.ReadDataFile(), G4PenelopeBremsstrahlungFS.ReadDataFile(), G4PenelopePhotoElectricModel.ReadDataFile(), G4PenelopeRayleighModel.ReadDataFile(), G4PenelopeRayleighModelMI.ReadDataFile(), G4DNAPTBIonisationModel.ReadDiffCSFile(), G4DNAPTBElasticModel.ReadDiffCSFile(), G4PenelopeOscillatorManager.ReadElementData(), G4PenelopeRayleighModelMI.ReadMolInterferenceData(), G4OpenGLQtViewer.removeTempFolder(), G4PersistencyManager.Retrieve(), G4ShellEMDataSet.SaveData(), G4OpenInventorXtExaminerViewer.saveRefCoordsCB(), G4OpenInventorXtExaminerViewer.saveSceneGraphCB(), G4PersistencyCenter.SetHepMCObjyReaderFile(), G4OpenGLQtViewer.setSaveFileName(), smr_allocateCopyString(), smr_allocateCopyStringN(), smr_malloc(), smr_realloc(), smr_setAllocationFailure(), smr_setReport(), smr_setReportError(), smr_setReportInfo(), smr_setReportWarning(), smr_vsetReportError(), smr_vsetReportInfo(), smr_vsetReportWarning(), G4PersistencyManager.Store(), G4OpenInventorXtExaminerViewer.viewPtFileSelectedCB(), and G4RootFileManager.WriteFileImpl().
geant4_check_module_cycles.help |
Definition at line 44 of file geant4_check_module_cycles.py.
geant4_check_module_cycles.metavar |
Definition at line 43 of file geant4_check_module_cycles.py.
geant4_check_module_cycles.nodes = line.rstrip("\n").split(" ") |
Definition at line 60 of file geant4_check_module_cycles.py.
Referenced by HepPolyhedron.GetFacet(), HepPolyhedron.GetNextFacet(), and G4OpenInventorViewer.SceneGraphStatistics().
geant4_check_module_cycles.parser |
Definition at line 36 of file geant4_check_module_cycles.py.
Referenced by appendAttributeValue(), build_model(), build_node(), cdataSectionProcessor(), G4Profiler.Configure(), contentProcessor(), doCdataSection(), doContent(), doProlog(), epilogProcessor(), externalEntityContentProcessor(), externalEntityInitProcessor(), externalEntityInitProcessor2(), externalEntityInitProcessor3(), getAttributeId(), getElementType(), initializeEncoding(), internalEntityProcessor(), lookup(), parserCreate(), parserInit(), processInternalEntity(), processXmlDecl(), prologInitProcessor(), prologProcessor(), G4GDMLRead.Read(), reportComment(), reportProcessingInstruction(), setContext(), setElementTypePrefix(), startParsing(), storeAttributeValue(), storeAtts(), storeEntityValue(), XML_DefaultCurrent(), XML_ExternalEntityParserCreate(), XML_GetParsingStatus(), XML_Parse(), XML_ParseBuffer(), XML_ParserFree(), XML_ParserReset(), XML_ResumeParser(), XML_SetExternalEntityRefHandlerArg(), and XML_UseParserAsHandlerArg().
geant4_check_module_cycles.required |
Definition at line 42 of file geant4_check_module_cycles.py.
Referenced by MCGIDI_misc_pointerToAttributeIfAllOk(), MCGIDI_misc_pointerToTOMAttributeIfAllOk(), xDataTOME_getOneElementByName(), xDataXML_convertAttributeTo_xDataTOM_Int(), xDataXML_convertAttributeToDouble(), and xDataXML_getOneElementByTagName().
geant4_check_module_cycles.ts = graphlib.TopologicalSorter(adjList) |
Definition at line 71 of file geant4_check_module_cycles.py.
Referenced by G4JTPolynomialSolver.ComputeFixedShiftPolynomial(), G4TessellatedSolid.CopyObjects(), G4ErrorTrajState.G4ErrorTrajState(), G4TessellatedSolid.G4TessellatedSolid(), G4ErrorTrajState.operator=(), and G4TessellatedSolid.operator=().