Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement issue #361 #367

Merged
merged 5 commits into from
Apr 13, 2018
Merged

Conversation

MarkusFrankATcernch
Copy link
Contributor

@MarkusFrankATcernch MarkusFrankATcernch commented Apr 13, 2018

BEGINRELEASENOTES

  • resolves Create check if geometry and field are not empty #361
    The Detector object has a state Detector::state() with three values:

      /// The detector description states
      enum State   {
        /// The detector description object is freshly created. No geometry nothing.
        NOT_READY = 1<<0,
        /// The geometry is being created and loaded. (parsing ongoing)
        LOADING   = 1<<1,
        /// The geometry is loaded.
        READY     = 1<<2
      };

    It starts with NOT_READY, moves to LOADING once the geometry is opened and goes to READY once the geometry is closed. As suggested in the developers meeting: the initial field object is invalid and gets created only once the geometry is opened. As a corollary, the field may not be accessed before. Geometry parsers must take this behavior into account!

  • Address some compiler warnings.

    • Mainly add override/final statements in header files.
  • Implement a module to invoke python as a DD4hep plugin:
    invoked e.g. by: geoPluginRun -plugin DD4hep_Python -dd4hep -prompt

    geoPluginRun -plugin DD4hep_Python -help
    Usage: -plugin <name> -arg [-arg]                                                  
       name:   factory name     DD4hep_Python                                        
       -import  <string>        import a python module, making its classes available.
       -macro   <string>        load a python script as if it were a macro.          
       -exec    <string>        execute a python statement (e.g. import ROOT.    
       -eval    <string>        evaluate a python expression (e.g. 1+1)          
       -prompt                  enter an interactive python session (exit with ^D)   
       -dd4hep                  Equivalent to -exec "import dd4hep"                
       -help                    Show this online help message.                       
    
       Note: entries can be given multiple times and are executed in exactly the     
             order specified at the command line!                      
    

    Implementation wise the plugin is a simple CLI wrapper for TPython.

ENDRELEASENOTES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create check if geometry and field are not empty
2 participants