#Make sure smodels can be found
import sys,os
sys.path.append(os.path.join(os.getenv("HOME"),'smodels'))
from smodels.tools import databaseBrowser
#First load the browser and check the total number of results loaded
browser = databaseBrowser.Browser(os.path.join(os.getenv("HOME"),'smodels-database'))
print len(browser)
#Select only efficiency map results:
browser.selectExpResultsWith(dataType ='efficiencyMap')
#List the name of results loaded:
print len(browser)
#Now check the first result:
print browser[0]
#Now restore all results to the browser:
browser.loadAllResults()
print len(browser)
#Select only efficiency map results:
browser.selectExpResultsWith(dataType='upperLimit')
#List the name of results loaded:
print len(browser)
#Now check the first result:
print browser[0]