venerdì 10 luglio 2009

Ecal Cond DB python Tools

I've refined a bit the initial idea, the new recipe is :

cmsrel CMSSW_3_1_0_pre7
cd CMSSW_3_1_0_pre7
cmsenv
addpkg CondCore/IOVService zx29052009

addpkg CondCore/Utilities zx29052009
addpkg CondFormats/Common zx29052009
addpkg CondCore/EcalPlugins sa3
addpkg CondTools/Ecal sa3
scram b -j4
cd CondTools/Ecal/python

The main script is now EcalCondDB.py , in CondTools/Ecal/python.
Invoke it without arguments to show help

Examples:

1. To get help
./EcalCondDB.py --help

2. To list all tags in a given database
./EcalCondDB.py -c oracle://cms_orcoff_prod/CMS_COND_31X_ECAL -l

The connection string above is actually the default

3. To dump a record with given tag to xml
./EcalCondDB.py --dump=file.xml -t EcalIntercalibConstants_EBg50_EEnoB
./EcalCondDB.py --dump=file2.xml -t EcalIntercalibConstantsMC_mc

4. To write a map of the intercalibration constants
./EcalCondDB.py --plot=plot.png -t EcalIntercalibConstants_EBg50_EEnoB

Different graphics formats can be specified by changing extension (.root,.svg,.jpg, etc)

5. To produce histograms of the intercalibration constants
./EcalCondDB.py --histo=plot.png -t EcalIntercalibConstants_EBg50_EEnoB

With the --histo tag one can specify, with -t, a xml file instead of a database tag:
./EcalCondDB.py --histo=plot.png -t file.xml

5. To compare records
./EcalCondDB.py --compare=plot.png -t EcalIntercalibConstants_EBg50_EEnoB -t EcalIntercalibConstantsMC_mc

--compare also supports xml file comparison

./EcalCondDB.py --compare=plot.png -t file.xml -t file2.xml

To develop new histograms, the file EcalCondTools.py should be modified



Nessun commento: