Thursday, 22 May 2008

Serving jnlp from PHP for WebStart applications

So... I had to incorporate the TriggerTool information in the runlist summary, but it is served as a jnlp with arguments in the jnlp format. My first attempts at generating the jnlp dynamically would work either in Safari or in Firefox, but not both until I renamed the web application to 'test.php.jnlp'.. this worked but is ugly. Finally I hit on the solution: not only making the http header into 'Content-Type: application/x-java-jnlp-file' but also adding '; name=smtp.jnlp' onto the end of that. Now the file comes back as a .jnlp which is recognised by both browsers.
This last week, meanwhile has been a hectic rush as I was initially blamed for submitting broken tags into Athena. It turned out it was a subtle bug in the pixel software which went something like this:
Gaudi has a templated stream insertion operator for all types.
A PixelDcsData class also had a stream insertion operator.
A PixelDcsData class also had a single argument constructor, that argument being 'Identifier'.
Now, when trying to output 'Identifier' with stream insertion, the compiler complained of an ambiguously overloaded '<<' because it couldn't decide whether to convert Identifier to a PixelDcsData class and then use the custom '<<' or use the intrinsic templated '<<'. Constructors with a single argument act as conversion operators. To avoid this, qualify the constructor with 'explicit'.

Wednesday, 7 May 2008

Tier0 and other animals

Managed to get the data filenames from Tier0; wrote a PHP service which returns plain text, html or xml according to the 'Accept' header sent in the request. Wrote documentation and an example application, then incorporated this into my 'run details' service.
Created an /SCT/Derived/Monitoring folder in Cool for Kazu. 
Over the last week: created a Plone site at home and made this visible via dyndns as a  demo of what it can do, following from a presentation on collaborative tools last week. It seems that CERN is opting for Sharepoint as a CMS; a very bad decision, given that all our data and programs are running under linux...