File    = table
Product = larwirecell

#*************************************************
# Starting Group definition
Group:

Flavor     = ANY
Qualifiers = "e17:py3:debug"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.e17.py3.debug )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.e17.py3.debug )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +e17:+py3:+debug )
    setupRequired( wirecell wctdev -q +e17:+py3:+debug )

Flavor     = ANY
Qualifiers = "e17:py3:prof"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.e17.py3.prof )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.e17.py3.prof )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +e17:+py3:+prof )
    setupRequired( wirecell wctdev -q +e17:+py3:+prof )

Flavor     = ANY
Qualifiers = "c2:py3:debug"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.c2.py3.debug )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.c2.py3.debug )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +c2:+py3:+debug )
    setupRequired( wirecell wctdev -q +c2:+py3:+debug )

Flavor     = ANY
Qualifiers = "c2:py3:prof"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.c2.py3.prof )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.c2.py3.prof )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +c2:+py3:+prof )
    setupRequired( wirecell wctdev -q +c2:+py3:+prof )

Flavor     = ANY
Qualifiers = "e17:debug"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.e17.debug )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.e17.debug )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +e17:+debug )
    setupRequired( wirecell wctdev -q +e17:+debug )

Flavor     = ANY
Qualifiers = "e17:prof"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.e17.prof )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.e17.prof )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +e17:+prof )
    setupRequired( wirecell wctdev -q +e17:+prof )

Flavor     = ANY
Qualifiers = "c2:debug"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.c2.debug )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.c2.debug )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +c2:+debug )
    setupRequired( wirecell wctdev -q +c2:+debug )

Flavor     = ANY
Qualifiers = "c2:prof"


  Action = GetFQDir
    if ( printenv CET_SUBDIR > /dev/null )
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/${CET_SUBDIR}.c2.prof )
    else()
      envSet( ${UPS_PROD_NAME_UC}_FQ_DIR, ${${UPS_PROD_NAME_UC}_DIR}/`get-directory-name subdir`.c2.prof )
    endif ( printenv CET_SUBDIR > /dev/null )
    fileTest( ${${UPS_PROD_NAME_UC}_FQ_DIR}, -d, "${${UPS_PROD_NAME_UC}_FQ_DIR} directory not found: SETUP ABORTED")

  Action = GetProducts
    setupRequired( larevt v08_07_02 -q +c2:+prof )
    setupRequired( wirecell wctdev -q +c2:+prof )


Common:
  Action = setup
    prodDir()
    setupEnv()
    envSet(${UPS_PROD_NAME_UC}_VERSION, v08_09_03)
    # cetpkgsupport has get-directory-name and find-path
    # cetpkgsupport also defines the CET_SUBDIR variable
    setupRequired(cetpkgsupport)
    exeActionRequired(GetFQDir)
    envSet(${UPS_PROD_NAME_UC}_INC, ${UPS_PROD_DIR}/include) 

    exeActionRequired(GetProducts)

    envSet(${UPS_PROD_NAME_UC}_LIB, ${${UPS_PROD_NAME_UC}_FQ_DIR}/lib) 
    if ( test `uname` = "Darwin" )
      pathPrepend(DYLD_LIBRARY_PATH, ${${UPS_PROD_NAME_UC}_LIB})
    else()
      pathPrepend(LD_LIBRARY_PATH, ${${UPS_PROD_NAME_UC}_LIB})
    endif ( test `uname` = "Darwin" )
    pathPrepend(CET_PLUGIN_PATH, ${${UPS_PROD_NAME_UC}_LIB})

    # add the bin directory to the path
    pathPrepend(PATH, ${${UPS_PROD_NAME_UC}_FQ_DIR}/bin )
    # dropit -E removes non-existent directories
    Execute(dropit -E, NO_UPS_ENV, PATH)

    # add the fcl directory to the fhicl file path
    pathPrepend(FHICL_FILE_PATH, ${UPS_PROD_DIR}/fcl )

    # Prepend CMAKE_PREFIX_PATH for flavour qualified product
    pathPrepend(CMAKE_PREFIX_PATH, ${${UPS_PROD_NAME_UC}_FQ_DIR})
    pathPrepend(PKG_CONFIG_PATH, ${${UPS_PROD_NAME_UC}_FQ_DIR})
    # Prepend ROOT_INCLUDE_PATH for dictionaries
    pathPrepend(ROOT_INCLUDE_PATH, ${${UPS_PROD_NAME_UC}_INC}) 

End:
# End Group definition
#*************************************************
