"One set of pedestal in StarDb, written & read & used" (An email sent on Oct. 15, 2009)

Oct 15, 2009


Hi,

I've put in one set of pedestals of 20480 channels (of that pedestal run of 10183025) into the Database ("StarDb") with
the name "Calibrations/pp2pp" in the table "pp2ppPedestal".  I've read back and checked (in a few different programs) that 
they're exactly what I had put in.

So, now, my St_pp2pp_Maker would read from the Database instead of reading from an ascii file.

For those who are interested, some details before I (a beginner) could have achieved the above  (and perhaps afterwards) :

(1) I have had to send 10's of emails to ask Dmitry questions which you may see : http://www.star.bnl.gov/HyperNews-star/protected/get/dbdevel.html

(2) I needed to make up a class and written a .idl file.   

(3) Put it under your StDb/idl directory, one can make up a .h header using "cons".  This also tests whether your .idl has syntax problem or not.

(4) Sent the .idl/.h files to Dmitry to ask him to put it in the official area.   He may ask questions etc.....
Deleted the above directory StDb/idl structure and probably .sl44_xxxx (otherwise your code afterwards wouldn't work before Dmitry puts
in your stuff). 

(5) Waited for a day or more ....Dmitry may tell your database/table is ready and he may even give you a "read" and "write" example. Only "yipkin" has the write access to the above.

(6) During the write and read stage, one needs to be careful about the timestamp so that if everything is done properly, a Run would use only
the set of pedestals (say, in this case) which have a timestamp earlier than the Run (started).


I've spent some time in step (6) to try various things (and to try to be smart).   Dmitry said the usual way is write another StxxxxDbMaker ...but
at least for now, I don't bother but just throw those few lines in my St_pp2pp_Maker.


Kin