CMS 3D CMS Logo

EnviromentSettings.py
Go to the documentation of this file.
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()])
29 ################################################################################
30 user=""
31 users=["dqmpro","dqmdev"]
32 userHomeDirecotry=lambda: "/nfshome0/"+user
33 #Default values however they get updateted to the actual release after the call
34 #to detectEnviroment()
35 CMSSW_Release_Number="2_2_10"
36 CMSSW_Release="CMSSW_"+CMSSW_Release_Number
37 
38 environmentString=detectEnviroment()
39 
40 libDirectory=lambda: userHomeDirecotry()+"/lib_"+CMSSW_Release_Number
41 knownclassNames=lambda: {
42  "xmas2dqm::wse::XmasToDQM" :{"urn":"/urn:xdaq-application:lid=52","modulePath":libDirectory()+"/libDQMServicesXdaqCollector.so","tid":["104"]},
43  "evf::FUEventProcessor" :{"urn":"/urn:xdaq-application:lid=50","modulePath":"lib/libxdaq2rc.so "+libDirectory()+"/libEventFilterProcessor.so","tid":["100","102"]},
44  "SMProxyServer" :{"urn":"/urn:xdaq-application:lid=30","modulePath":"lib/libxdaq2rc.so "+libDirectory()+"/libEventFilterSMProxyServer.so","tid":["102"]},
45  "RCMSStateListener" :{"urn":"","modulePath":"","tid":["104"]}
46 }
47 
48 #Function manager parameters
49 host={ "dqmpro":"cmsrc-dqm",
50  "dqmdev":"cmsrc-dqmdev"}
51 port={ "dqmpro":"22000",
52  "dqmdev":"42000"}
53 sourceURL={ "dqmpro":"http://cmsrc-dqm:22000/functionmanagers/dqmFM.jar",
54  "dqmdev":"http://cmsrc-dqmdev:42000/functionmanagers/dqmFM.jar"}
55 
56 RCMSStateListenerURL={ "dqmpro":"http://cmsrc-dqm:22001/rcms/services/replycommandreceiver",
57  "dqmdev":"http://cmsrc-dqmdev.cms:42001/rcms/services/replycommandreceiver"}
58 
59 
60 #XdaqExecutive parameters
61 
62 pathsToExecutive={ "dqmpro":"/opt/xdaq/bin/xdaq.sh -e /nfshome0/dqmpro/xml/profile.xml -u xml://cmsrc-dqm:22010",
63  "dqmdev":"/opt/xdaq/bin/xdaq.sh -e /nfshome0/dqmdev/xml/profile.xml -u xml://cmsrc-dqmdev:42010"}
64 logURLs= { "dqmpro":"xml://cmsrc-dqm:22010",
65  "dqmdev":"xml://cmsrc-dqmdev:42010"}
66 knownlogLevels=["DEBUG","INFO","ERROR"]
static std::string join(char **cmd)
Definition: RemoteFile.cc:18