Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This note is composed from Igor's e-mail about Python module for posting message into e-log ELog (from analysis releases).Here is how you can get the one from your analysis release:

Code location

Code Block
  sit_setup
  addpkg LogBook V00-03-05 (or HEAD)
  scons

Modes of submission in ELog

And here is how to use it for various scenarios. First of all you , one need to import the module and instantiate the 'poster':

Code Block
from LogBook import message_poster
poster = message_poster.message_poster_self ( 'AMO', experiment='amodaq09' )

...

  1. Posting a new message w/o any attachments, tags, etc.:
    Code Block
    
      poster.post ( 'This is just a test' )
    

...

  1. Posting a message with one attachments:
    Code Block
    
      msg = 'This is just a test'
      attachments = [

...

  1. '/reg/neh/home1/gapon/AFS_HOME/public_html/NewOrgChart.pdf'] 
      poster.post ( msg, attachments=attachments )
    

...

  1. Multiple attachments:
    Code Block
    
      attachments = [

...

  1. '/reg/neh/home1/gapon/AFS_HOME/public_html/NewOrgChart.pdf', 'SomeOtherFile.jpg'] 
      poster.post ( msg, attachments=attachments )
    

...

  1. Tags and attachments:
    Code Block
    
      msg = ...
      attachments =  ...
      tags = ...
      poster.post ( msg, attachments=attachments, tags=tags )
    

...

  1. Posting a reply to an existing message. For that you need to get an identifier of that message. In the following example you first send a message. Then you obtain its identifier and pass to the reply:
    Code Block
    
     parent_message_id = poster.post ( 'The main thread for the discussion' )
     child_message_id = poster.post ( 'Here comes my reply', parent_message_id = parent_message_id )
    

...

  1. Posting a message for a specific run.

...

  1. Note

    For obvious reason this can't be combined with posting replies to existing messages

...

  1. :

    Code Block
    
      run_num = 123
      poster.post ( 'Go look for this message close to that run'

...

  1. , run_num = run_num )
    

...

  1. Any reasonable combination of above parameters is possible.