CMS 3D CMS Logo

Functions | Variables
EnviromentSettings Namespace Reference

Functions

def detectEnviroment ()
 

Variables

 CMSSW_Release
 
 CMSSW_Release_Number
 
 environmentString
 
 host
 
 knownclassNames
 
 knownlogLevels
 
 libDirectory
 
 logURLs
 
 pathsToExecutive
 
 port
 
 RCMSStateListenerURL
 
 sourceURL
 
 user
 
 userHomeDirecotry
 
 users
 

Function Documentation

◆ detectEnviroment()

def EnviromentSettings.detectEnviroment ( )

Definition at line 1 of file EnviromentSettings.py.

1 def detectEnviroment():
2  global environmentString,CMSSW_Release,CMSSW_Release_Number
3  import sys,os
4  envVariables={"CMSSW_BASE":"","CMSSW_DATA_PATH":"","CMSSW_RELEASE_BASE":"","CMSSW_SEARCH_PATH":"",
5  "CMSSW_VERSION":CMSSW_Release,"LD_LIBRARY_PATH":"","POOL_OUTMSG_LEVEL":"","POOL_STORAGESVC_DB_AGE_LIMIT":"",
6  "PYTHONPATH":"","PATH":"","ROOTSYS":"","SEAL":"","SEAL_KEEP_MODULES":"","SEAL_PLUGINS":"","TNS_ADMIN":"",
7  "XDAQ_DOCUMENT_ROOT":"","XDAQ_OS":"","XDAQ_PLATFORM":"","XDAQ_ROOT":"","XDAQ_SETUP_ROOT":"",
8  "XDAQ_ZONE":"","SCRAM_ARCH":""}
9  cmd='env | grep -E "(%s)" | sort' % "|".join(["^%s=" % v for v in envVariables.keys()])
10  fpd=os.popen(cmd)
11  line=fpd.readline()
12  while line:
13  k,v=line.split("=")
14  envVariables[k]=v.strip()
15  line=fpd.readline()
16  fpd.close()
17  ppath=":".join(sys.path)
18  ppath=ppath.strip(":")
19  envVariables["PYTHONPATH"]=ppath
20  envVariables["PATH"]="%s:${PATH}" % envVariables["PATH"]
21  envVariables["XDAQ_SETUP_ROOT"]=envVariables["XDAQ_ROOT"]+"/share"
22  envVariables["XDAQ_ZONE"]="cdaq"
23  CMSSW_Release=envVariables["CMSSW_VERSION"]
24  CMSSW_Release_Number=CMSSW_Release.split("_",1)[1]
25  #envVariables["LD_LIBRARY_PATH"]=envVariables["XDAQ_ROOT"]+"/lib:/nfshome0/dqmpro/lib_"+CMSSW_Release_Number
26  for (key,value) in envVariables.items():
27  envVariables[key]=value.replace("/cmsnfshome0","")
28  return " ".join(["%s=%s" % (k,v) for (k,v) in envVariables.items()])

References join().

Variable Documentation

◆ CMSSW_Release

EnviromentSettings.CMSSW_Release

Definition at line 36 of file EnviromentSettings.py.

◆ CMSSW_Release_Number

EnviromentSettings.CMSSW_Release_Number

Definition at line 35 of file EnviromentSettings.py.

◆ environmentString

EnviromentSettings.environmentString

Definition at line 38 of file EnviromentSettings.py.

◆ host

EnviromentSettings.host

Definition at line 49 of file EnviromentSettings.py.

◆ knownclassNames

EnviromentSettings.knownclassNames

Definition at line 41 of file EnviromentSettings.py.

◆ knownlogLevels

EnviromentSettings.knownlogLevels

Definition at line 66 of file EnviromentSettings.py.

◆ libDirectory

EnviromentSettings.libDirectory

Definition at line 40 of file EnviromentSettings.py.

◆ logURLs

EnviromentSettings.logURLs

Definition at line 64 of file EnviromentSettings.py.

◆ pathsToExecutive

EnviromentSettings.pathsToExecutive

Definition at line 62 of file EnviromentSettings.py.

◆ port

EnviromentSettings.port

Definition at line 51 of file EnviromentSettings.py.

◆ RCMSStateListenerURL

EnviromentSettings.RCMSStateListenerURL

Definition at line 56 of file EnviromentSettings.py.

◆ sourceURL

EnviromentSettings.sourceURL

Definition at line 53 of file EnviromentSettings.py.

◆ user

EnviromentSettings.user

◆ userHomeDirecotry

EnviromentSettings.userHomeDirecotry

Definition at line 32 of file EnviromentSettings.py.

◆ users

EnviromentSettings.users

Definition at line 31 of file EnviromentSettings.py.

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
EnviromentSettings.detectEnviroment
def detectEnviroment()
Definition: EnviromentSettings.py:1