コード例 #1
0
#   corrected for IP position
#
#
import basf2 as b2
import modularAnalysis as ma
import b2biiConversion as b2c
import b2biiMonitors as b2m
import os
import sys

from variables import variables
from variables.utils import create_aliases_for_selected
from variables.utils import create_aliases
import variables.collections as vc

b2c.setupB2BIIDatabase(isMC=True)


def print_env(var):
    """Print environmental variable."""
    print("%30s = %s" % (var, os.getenv(var)))


env_list = [
    'BELLE2_EXTERNALS_DIR', 'BELLE2_EXTERNALS_SUBSIR',
    'BELLE2_EXTERNALS_OPTION', 'BELLE2_EXTERNALS_VERSION', 'BELLE2_LOCAL_DIR',
    'BELLE2_OPTION', 'BELLE_POSTGRES_SERVER', 'USE_GRAND_REPROCESS_DATA',
    'PANTHER_TABLE_DIR', 'PGUSER'
]

# Print env variables for check
コード例 #2
0
#
# MC sample: http://bweb3.cc.kek.jp/montecarlo.php?ex=55&rs=1&re=500&ty=Any&dt=Any&bl=caseB&st=0

import basf2 as b2
import modularAnalysis as ma
import b2biiConversion as b2c
import b2biiMonitors as b2m
import os
import sys

from variables import variables
from variables.utils import create_aliases_for_selected
from variables.utils import create_aliases
import variables.collections as vc

b2c.setupB2BIIDatabase(isMC=False)


def print_env():
    """
    Print relevant environmental variables.
    """
    import datetime
    envs = [
        'BELLE2_EXTERNALS_DIR', 'BELLE2_EXTERNALS_SUBSIR',
        'BELLE2_EXTERNALS_OPTION', 'BELLE2_EXTERNALS_VERSION',
        'BELLE2_LOCAL_DIR', 'BELLE2_OPTION', 'BELLE2_RELEASE',
        'BELLE_POSTGRES_SERVER', 'USE_GRAND_REPROCESS_DATA',
        'PANTHER_TABLE_DIR', 'PGUSER'
    ]
    print("Current time is %s" % datetime.datetime.now())