Mice configuration db
This presentation is the property of its rightful owner.
Sponsored Links
1 / 12

MICE Configuration DB PowerPoint PPT Presentation


  • 53 Views
  • Uploaded on
  • Presentation posted in: General

MICE Configuration DB. Janusz Martyniak , Imperial College London MICE CM39 Software Paralell. Cooling Channel Client API. The server code exists ( jax-ws on Tomcat) Easy to create client bindings in java, Python (preferred), but also in C or C++

Download Presentation

MICE Configuration DB

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Mice configuration db

MICE Configuration DB

JanuszMartyniak, Imperial College London

MICE CM39 Software Paralell


Cooling channel client api

Cooling Channel Client API

  • The server code exists (jax-ws on Tomcat)

  • Easy to create client bindings in java, Python (preferred), but also in C or C++

  • Cooling Channel software itself is written in C, so it was most natural to provide the CDB client API in this language

  • Use gSoap toolkit to generate C client-side bindings

Janusz Martyniak, MICE CM39


Cooling channel setx workflow

Cooling Channel setX() Workflow

  • To be performed on a supermouse enabled DB (MLCR)

  • User creates a csv file with data to be submitted.

  • A single API function is called (takes a file handle as an argument)

  • csv is converted to an XML document

  • XML doc is validated against a XML schema

  • gSoap client request in made

Janusz Martyniak, MICE CM39


Setcoolingchannelfortag

setCoolingchannelForTag(..)

Client API (XML)

setCoolingchannelForTag

XML Validator

XML doc

WS

CC

gSOAP

client

csv

XMLSchema

<OK/>or<error/>

Janusz Martyniak, MICE CM39


Getcoolingchannelfortag endp tag

getCoolingchannelForTag(endp, tag)

  • Call a gSOAP client passing an endpoint and a tag

  • Get an XML document as a response

  • Build a coolingchannel C struct and return it to a user

  • User can walk through the struct and retrieve magnet and coil data.

Janusz Martyniak, MICE CM39


Coolingchannel s struct s

Coolingchannel(s) struct(s)

/*

* Cooling channel structure. Maintains both direct and sequential access to magnets

*/

structcoolingchannel {

char *validfromtime;

char *validuntiltime;

CC_NS1_hashtable_t *magnets; /* magnets for this coolingchannel */

cc_magnet_t *magnet; /* first magnet for this coolingchannel */

structcoolingchannel *next; /* next coolingchannel */

};

typedefstructcoolingchannelcoolingchannel_t;

/*

* Coolingchannels (plural!). Maintains sequential access to

* cooling channels.

*/

structcoolingchannels {

coolingchannel_t *cc; /* first coolingchannel */

};

typedefstructcoolingchannelscoolingchannels_t;

Janusz Martyniak, MICE CM39


Magnets

Magnets

/*

* Cooling channel magnet structure. Maintains direct access to coils via

* a hashtable and a sequential access via a linked list

*/

structcc_magnet {

char *name;

char *mode;

pol_t polarity;

CC_NS1_hashtable_t *coils; /* coils for this magnet */

cc_coil_t *coil; /* first coil for this magnet */

structcc_magnet *next; // next magnet, or NULL if the last one (for seq. access)

};

typedefstructcc_magnetcc_magnet_t;

Janusz Martyniak, MICE CM39


Coils

Coils

/*

* Cooling channel coil. Contains a hash table of attributes.

*/

structcc_coil {

char *name; /* coil name */

CC_NS1_hashtable_t *attr; /* attribute hash table */

structcc_coil *next; /* next coil (for seq. access) */

};

typedefstructcc_coilcc_coil_t;

Janusz Martyniak, MICE CM39


Usage

usage

Looping over structs is easy, i.e. for magnets:

if (coolingchannel != NULL) {

printf(" Coolingchannel: valid from:%s, valid until: %s\n”,

coolingchannel->validfromtime, coolingchannel->validuntiltime);

for (magnet = coolingchannel->magnet; magnet != NULL; magnet

= magnet->next) {

…..

}

}

Janusz Martyniak, MICE CM39


Software status

Software status

  • get/setCoolingchannelForTag ready

  • on launchpad

  • Other operations ready on XML level, have to plug-in an XML validation step for set functions.

  • Unit tests exist (Cunit)

  • Should be ready for tests in 1-2 weeks

Janusz Martyniak, MICE CM39


Batch iteration number api

Batch Iteration Number API

Create a new table to store a relation between a batch iteration number used by the Grid reconstruction system and MAUS. This will allow to reprocess the data to allow for any changes not related to the MAUS version itself.

The batch reconstruction number will determine the datacards which used by MAUS.

The datacards will be stored in the DB.

See: http://micewww.pp.rl.ac.uk/issues/1285

Janusz Martyniak, MICE CM39


Batch iteration number api1

Batch Iteration Number API

  • Relevant table created in the DB (locally)

  • WS server side implemented (java)

  • WS client API written in Python

  • Tested locally

  • Further development postponed – priority given to the Coolingchannel C API

  • Not tested with MAUS

Janusz Martyniak, MICE CM39


  • Login