Making a MC version of an existing data TCK

First, check out the head of HltTCK, and then run iTCKsh from the prod (or latest) version of Moore (independent of the version corresponding to the TCK you want to make an MC TCK for)

getpack TCK/HltTCK head
lb-run Moore iTCKsh --write TCK/HltTCK/config.cdb

In TCKsh import the createMCversion module and feed it your data TCK:

from TCKUtils.createMCversion import createMCversion
createMCversion(tck=0x11641724, cas=default_cas)

You'll see it dump the new TCK as well as a diff of the old with the new. If everything worked, the only differences will be AcceptFractions from the prescalers being set to 1 instead of prescaled as in data.

Check that your new MC TCK appears under the right version of Moore with

listConfigurations()

Releasing the MC TCK

Copy the config.cdb file somewhere and ask Rosen to commit and release it.

Once that is done, you need to add it to AppConfig:

git lb-clone-pkg AppConfig
cd AppConfig/options/Conditions

Copy one of the existing TCK-*.py files over to your TCK's name:

cp TCK-0x40YYYYY.py TCK-0x40XXXXX.py

Then edit the file to contain your TCK:

from Configurables import Moore
Moore().InitialTCK = '0x40XXXXXX'

Finally, commit your change on a new branch, push it and open a merge request

git checkout -b add-MC-TCK
git commit TCK-0x40YYYYY.py
git push -u origin add-MC-TCK

And now you need to put it into a release request for TCK/HltTCK You may potentially need to tag and request release of AppConfig - check with the simulation people first to see if they plan to commit other important updates soon.

Go here: https://its.cern.ch/jira/browse/LHCBDEP/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel Login, select Create, change the issue to "task", and specify TCK/HltTCK with the right version number. Not every box needs to be filled in. Once the form is filled out click submit.

Lastly, contact the production people so that they know to release a new AppConfig and you're done.

Adding TCKs for Moore v14 or older

The config.cdb files did not exist in v14 or older, so the TCKs need to be in the config.tar file. First add the MC TCKs to the config.cdb as usual and then copy them to config.tar following this example:
from TCKUtils.utils import *
from TCKUtils.backend import *

cdb_file = 'config.cdb'
tar_file = 'config.tar'

cdb_cas = ConfigCDBAccessSvc("ConfigAccessSvcSource", File=cdb_file)
tar_cas = ConfigTarFileAccessSvc("ConfigAccessSvcTarget", File=tar_file, Mode='ReadWrite')

copy(source=cdb_cas, target=tar_cas, glob='TCK/0x40a30044')
copy(source=cdb_cas, target=tar_cas, glob='TCK/0x40ac0046')

To check the TCKs were indeed copied, within TCKsh do:

cas = ConfigTarFileAccessSvc(File='config.tar')
listConfigurations(cas=cas)

--Main.WilliamBarter - 2016-10-05

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r11 - 2018-09-11 - RosenMatev
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

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