Dropbox Method

The previously described way of writing into the database has been changed to a new method that works from P5. You have to login on the online cluster (e.g. cmsusr1) and the location from where the transfer to offline database is performed is: /nfshome0/popcondev/CSCJob . There you place a .txt file together with a sqlite file containing one object payload, the names should be the same as the tag you specified in the sqlite file. If you need rename the sqlite file (.db) and the metadata (.txt) file with the same name, identical to the tag to be exported. All dropbox users must add a unique string identifier at the end of the name of the file, and divide it from the tag name with an @ symbol. The unique string identifier is needed for three purposes:

i. if a lot of offline calibration db/txt files are uploaded to the dropbox, the unique string allows the script (soon in python...) to better handle them.

ii. We have another check before the exportation starts.

iii. Imagine you uploaded some payloads in a tag using the dropbox, hence by means of a sqlite file. If, after some time, you want to stick on the existing tag some new payloads, the uuid makes the names of the sqlite files different, so that we can better keep trace of the history of the exportation.

The new procedure is the following:

1. rename the sqlite file into .db;

2. download the template meta data file;

3. rename it .txt;

4. modify it according to this structure:

destDB connectionstring
inputtag inputtagname
tag tagname
since begin
till end
usertext userlog

where

connectionstring is the connection string,
inputtagname is the name of the tag in the sqlite file you want to export (leave blank if identical to tagname),
tagname is the name of the tag to be exported,
begin is the begin time (first since), optional (leave blank if not needed),
end is the end time (last till), optional (leave blank if not needed),
userlog is the text string you want to add in the exportation log in the POPCONLOG database account.

5. generate a time-based UUID (unique string identifier), based on the system clock plus the system's ethernet hardware address, if present, and save it as a shell variable:

  (csh, tcsh)> set u=`uuidgen -t`
  (bash)$ u=`uuidgen -t`

6. rename the sqlite and metadata files by "glueing" the unique string, preceded by an @:

  mv tagname.db tagname@${u}.db
  mv tagname.txt tagname@${u}.txt

7. upload the sqlite file tagname@${u}.db into the dropbox available for your subdetector;

8. upload the meta data file tagname@${u}.txt into the same dropbox.

Before putting the files into the dropbox check that both sqlite and meta data files have the same name, with the leading part (i.e. the part BEFORE the @) identical to the name of the tag you want to export, tagname, otherwise the payloads will not be exported and an error will be returned by the shell.

In case of any doubts, please read the updated documentation both in the readme.txt file and in the twiki page.

-- OanaBoeriu - 11 Aug 2009

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2009-08-11 - OanaBoeriu
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback