test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
EnviromentSettings Namespace Reference

Functions

def detectEnviroment
 

Variables

string CMSSW_Release = "CMSSW_"
 
string CMSSW_Release_Number = "2_2_10"
 
tuple environmentString = detectEnviroment()
 
dictionary host
 
dictionary knownclassNames
 
list knownlogLevels = ["DEBUG","INFO","ERROR"]
 
tuple libDirectory = lambda:userHomeDirecotry()
 
dictionary logURLs
 
dictionary pathsToExecutive
 
dictionary port
 
dictionary RCMSStateListenerURL
 
dictionary sourceURL
 
string user = ""
 
string userHomeDirecotry = lambda:"/nfshome0/"
 
list users = ["dqmpro","dqmdev"]
 

Function Documentation

def EnviromentSettings.detectEnviroment ( )

Definition at line 1 of file EnviromentSettings.py.

References join().

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()])
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Variable Documentation

string EnviromentSettings.CMSSW_Release = "CMSSW_"

Definition at line 36 of file EnviromentSettings.py.

string EnviromentSettings.CMSSW_Release_Number = "2_2_10"

Definition at line 35 of file EnviromentSettings.py.

tuple EnviromentSettings.environmentString = detectEnviroment()

Definition at line 38 of file EnviromentSettings.py.

dictionary EnviromentSettings.host
Initial value:
1 = { "dqmpro":"cmsrc-dqm",
2  "dqmdev":"cmsrc-dqmdev"}

Definition at line 49 of file EnviromentSettings.py.

dictionary EnviromentSettings.knownclassNames
Initial value:
1 = lambda:{
2  "xmas2dqm::wse::XmasToDQM" :{"urn":"/urn:xdaq-application:lid=52","modulePath":libDirectory()+"/libDQMServicesXdaqCollector.so","tid":["104"]},
3  "evf::FUEventProcessor" :{"urn":"/urn:xdaq-application:lid=50","modulePath":"lib/libxdaq2rc.so "+libDirectory()+"/libEventFilterProcessor.so","tid":["100","102"]},
4  "SMProxyServer" :{"urn":"/urn:xdaq-application:lid=30","modulePath":"lib/libxdaq2rc.so "+libDirectory()+"/libEventFilterSMProxyServer.so","tid":["102"]},
5  "RCMSStateListener" :{"urn":"","modulePath":"","tid":["104"]}
6 }

Definition at line 41 of file EnviromentSettings.py.

list EnviromentSettings.knownlogLevels = ["DEBUG","INFO","ERROR"]

Definition at line 66 of file EnviromentSettings.py.

tuple EnviromentSettings.libDirectory = lambda:userHomeDirecotry()

Definition at line 40 of file EnviromentSettings.py.

Referenced by detectEnviroment().

dictionary EnviromentSettings.logURLs
Initial value:
1 = { "dqmpro":"xml://cmsrc-dqm:22010",
2  "dqmdev":"xml://cmsrc-dqmdev:42010"}

Definition at line 64 of file EnviromentSettings.py.

dictionary EnviromentSettings.pathsToExecutive
Initial value:
1 = { "dqmpro":"/opt/xdaq/bin/xdaq.sh -e /nfshome0/dqmpro/xml/profile.xml -u xml://cmsrc-dqm:22010",
2  "dqmdev":"/opt/xdaq/bin/xdaq.sh -e /nfshome0/dqmdev/xml/profile.xml -u xml://cmsrc-dqmdev:42010"}

Definition at line 62 of file EnviromentSettings.py.

dictionary EnviromentSettings.port
Initial value:
1 = { "dqmpro":"22000",
2  "dqmdev":"42000"}

Definition at line 51 of file EnviromentSettings.py.

dictionary EnviromentSettings.RCMSStateListenerURL
Initial value:
1 = { "dqmpro":"http://cmsrc-dqm:22001/rcms/services/replycommandreceiver",
2  "dqmdev":"http://cmsrc-dqmdev.cms:42001/rcms/services/replycommandreceiver"}

Definition at line 56 of file EnviromentSettings.py.

dictionary EnviromentSettings.sourceURL
Initial value:
1 = { "dqmpro":"http://cmsrc-dqm:22000/functionmanagers/dqmFM.jar",
2  "dqmdev":"http://cmsrc-dqmdev:42000/functionmanagers/dqmFM.jar"}

Definition at line 53 of file EnviromentSettings.py.

string EnviromentSettings.user = ""

Definition at line 30 of file EnviromentSettings.py.

string EnviromentSettings.userHomeDirecotry = lambda:"/nfshome0/"

Definition at line 32 of file EnviromentSettings.py.

list EnviromentSettings.users = ["dqmpro","dqmdev"]

Definition at line 31 of file EnviromentSettings.py.