CMS 3D CMS Logo

Functions | Variables

submitDQMOfflineCAF Namespace Reference

Functions

def Func_Exit
 Function Func_Exit()
def Func_ExitBool
 Function Func_ExitBool()
def Func_ExitUsage
 Function Func_ExitUsage()
def Func_MagConfig
 Function Func_MagConfig(float_magFieldMeasured)
def Func_MkDir
 Function Func_MkDir()
def Func_Usage
 Function Func_Usage()

Variables

 BOOL_CRAB = True
 Bool_CRAB = BOOL_CRAB
 BOOL_filter = False
 Bool_filter = BOOL_filter
 bool_foundField = False
 BOOL_magFieldAuto = False
 Bool_magFieldAuto = BOOL_magFieldAuto
 bool_standBy = False
 BOOL_useCastor = True
 Bool_useCastor = BOOL_useCastor
dictionary Dict_arguments = {}
 dict_arguments = Dict_arguments
dictionary DICT_functionLetters
dictionary DICT_optionLetters
 dt_stampNew = dt_stampOld-TD_shiftUTC
tuple dt_stampOld = datetime.datetime(int(lstr_timeDate[0]),int(lstr_timeDate[1]),int(lstr_timeDate[2]),int(lstr_timeTime[0]),int(lstr_timeTime[1]),int(lstr_timeTime[2]))
tuple file_cmsmonOutput = urllib.urlopen("http://cmsmon.cern.ch/cmsdb/servlet/RunSummary", str_cmsmonParams)
tuple file_dbsOutput = urllib.urlopen("https://cmsweb.cern.ch/dbs_discovery/getLFN_txt", str_dbsParams)
tuple file_inputFilesCAFCff = file(Str_pathInputFilesCAFCff, 'w')
tuple file_inputFilesCff = file(str_nameInputFilesFile, 'w')
tuple file_inputFilesJobCff = file(str_pathInputFilesJobCff, 'w')
tuple float_magField = Func_MagConfig(Float_magField)
tuple Float_magField = float(Str_magField[:-1])
 Int_jobs = INT_jobs
int INT_jobs = 10
 Int_jobsNew = Int_jobs
int int_nFunctionLetters = 0
int int_nInputFiles = 0
int int_nLinesRead = 0
list LFLOAT_valueMagField = [0.0,2.0,3.0,3.5,3.8,4.0]
list LSTR_auto = ['AUTO','Auto','auto']
list LSTR_datatiers = ['RECO','RAW']
list LSTR_false = ['0','FALSE','False','false']
list LSTR_functionLetters = ['-s','-c','-h']
tuple lstr_linesInput = file_inputFilesCff.readlines()
list LSTR_optionLetters = ['-r','-C','-S','-e','-j','-M','-g','-f','-d','-o','-m']
list LSTR_server = [STR_none,'caf','bari']
tuple lstr_timeDate = str_timeQuery.split('=')
tuple lstr_timeQuery = str_cmsmonOutput.split('HREF=Component?RUN=' + Str_run + '&NAME=TRACKER&')
tuple lstr_timeTime = str_timeQuery.split('=')
list LSTR_true = ['1','TRUE' ,'True' ,'true' ]
list LSTR_wordArgument = sys.argv[1:]
tuple lstr_wordsLine = str_iLine.split("/")
int nLines = 0
int OCT_rwx_r_r = 0744
string str_argumentFormer = ''
tuple str_buffer = commands.getoutput('which crab')
string str_castorCp = 'cp'
tuple str_cmsmonParams = urllib.urlencode({'RUN':Str_run})
tuple str_correctedLine1 = str_linesInput.replace(')
list Str_dataset = Dict_arguments[LSTR_optionLetters[8]]
tuple str_datatier = Str_dataset.split('/')
list Str_datatier = LSTR_datatiers[1]
tuple str_dbsParams = urllib.urlencode({'dbsInst':'cms_dbs_prod_global', 'blockName':'*', 'dataset':Str_dataset, 'userMode':'user', 'run':Str_run, 'what':'py'})
string STR_default = 'DEFAULT'
string STR_email = 'volker.adler@cern.ch'
 Str_email = STR_email
string STR_globalTag = 'CRAFT_V4P::All'
 Str_globalTag = STR_globalTag
string str_lineInput = '/SiStripDQMOfflineGlobalRunCAF-'
string STR_magField = '38T'
 Str_magField = STR_magField
string STR_mailServer = '@mail.cern.ch'
string STR_mailSmtp = 'localhost'
string STR_mailText
string STR_mailTextOpener = """Dear """
 Str_mergepath = STR_mergepath
string STR_mergepath = '/afs/cern.ch/cms/CAF/CMSCOMM/COMM_TRACKER/DQM/SiStrip/jobs/merged'
string STR_nameCmsswPackage = 'DQM/SiStripMonitorClient'
tuple Str_nameCmsswRel = os.getenv('CMSSW_VERSION')
string str_nameInputFilesFile = '/'
string Str_nameRun = 'R'
tuple str_nameRunIncludeDir = STR_nameCmsswPackage.replace('/','.')
tuple str_nameStamp = str_timeQuery.split('=')
string STR_none = 'None'
 Str_outpath = STR_outpath
string STR_outpath = '/castor/cern.ch/user/c/cctrack/DQM'
string str_outputDir = '.'
tuple Str_pathCmsswBase = os.getenv('CMSSW_BASE')
string Str_pathCmsswBasePackage = '/src/'
tuple Str_pathCurrentDir = os.getcwd()
 Main program.
string Str_pathInputFilesCAFCff = '/inputFilesCAF_cff.py'
string str_pathInputFilesJobCff = '/inputFiles_cff.py'
string Str_pathRunIncludeDir = '/python/'
list Str_run = Dict_arguments[LSTR_optionLetters[0]]
string str_sedCommand = 'sed '
string str_sedCommandCommon = 'sed '
 Str_server = STR_server
list STR_server = LSTR_server[0]
string str_suffixShell = 'csh'
string STR_textUsage
string str_timeBegin = ''
string str_timeEnd = ''
tuple str_timeStamp = str(dt_stampNew)
tuple TD_shiftUTC = datetime.timedelta(hours = 2)

Function Documentation

def submitDQMOfflineCAF::Func_Exit ( )

Function Func_Exit()

Exit after error

Function Func_Exit():
Exit after error

Definition at line 247 of file submitDQMOfflineCAF.py.

00248                :
00249   """ Function Func_Exit():
00250   Exit after error
00251   """
00252   print '                           exit'
00253   print
00254   sys.exit(1)

def submitDQMOfflineCAF::Func_ExitBool (   int_index)

Function Func_ExitBool()

Exit after wrong assignment of bool option

Function Func_ExitBool():
Exit after wrong assignment of bool option

Definition at line 270 of file submitDQMOfflineCAF.py.

00271                             :
00272   """ Function Func_ExitBool():
00273   Exit after wrong assignment of bool option
00274   """
00275   print '> submitDQMOfflineCAF.py > option %s expects 0/1, FALSE/TRUE, False/True or false/true' %(DICT_optionLetters.items()[int_index])
00276   Func_Exit()

def submitDQMOfflineCAF::Func_ExitUsage ( )

Function Func_ExitUsage()

Exit after wrong invocation of script

Function Func_ExitUsage():
Exit after wrong invocation of script

Definition at line 258 of file submitDQMOfflineCAF.py.

00259                     :
00260   """ Function Func_ExitUsage():
00261   Exit after wrong invocation of script
00262   """
00263   print '                           exit'
00264   print
00265   Func_Usage()
00266   sys.exit(1)

def submitDQMOfflineCAF::Func_MagConfig (   float_magFieldMeasured)

Function Func_MagConfig(float_magFieldMeasured)

Determine configuration to be used for a given magnetic field

Func_MagConfig(float_magFieldMeasured):
Determine configuration to be used for a given magnetic field

Definition at line 290 of file submitDQMOfflineCAF.py.

00291                                           :
00292   """ Func_MagConfig(float_magFieldMeasured):
00293   Determine configuration to be used for a given magnetic field
00294   """
00295   float_magField = 0.0
00296   for float_valueMagField in LFLOAT_valueMagField:
00297     if math.fabs(float_valueMagField-float_magFieldMeasured) < math.fabs(float_magField-float_magFieldMeasured):
00298       float_magField = float_valueMagField
00299   return float_magField
  
def submitDQMOfflineCAF::Func_MkDir (   str_path)

Function Func_MkDir()

Create new directory

Function Func_MkDir():
Create new directory

Definition at line 280 of file submitDQMOfflineCAF.py.

00281                         :
00282   """ Function Func_MkDir():
00283   Create new directory
00284   """
00285   shutil.rmtree(str_path, True)
00286   os.mkdir(str_path)
  
def submitDQMOfflineCAF::Func_Usage ( )

Function Func_Usage()

Displays usage of the script

Function Func_Usage():
Displays usage of the script

Definition at line 238 of file submitDQMOfflineCAF.py.

00239                 :
00240   """ Function Func_Usage():
00241   Displays usage of the script
00242   """
00243   print STR_textUsage


Variable Documentation

Definition at line 138 of file submitDQMOfflineCAF.py.

Definition at line 222 of file submitDQMOfflineCAF.py.

Definition at line 146 of file submitDQMOfflineCAF.py.

Definition at line 227 of file submitDQMOfflineCAF.py.

Definition at line 488 of file submitDQMOfflineCAF.py.

Definition at line 145 of file submitDQMOfflineCAF.py.

Definition at line 230 of file submitDQMOfflineCAF.py.

Definition at line 341 of file submitDQMOfflineCAF.py.

Definition at line 148 of file submitDQMOfflineCAF.py.

Definition at line 232 of file submitDQMOfflineCAF.py.

Definition at line 221 of file submitDQMOfflineCAF.py.

Definition at line 376 of file submitDQMOfflineCAF.py.

Initial value:
00001 {'--submit':LSTR_functionLetters[0],
00002                         '--create':LSTR_functionLetters[1],
00003                         '--help'  :LSTR_functionLetters[2]}

Definition at line 152 of file submitDQMOfflineCAF.py.

Initial value:
00001 {'--run'           :LSTR_optionLetters[0],  
00002                         '--CRAB'          :LSTR_optionLetters[1],  
00003                         '--server'        :LSTR_optionLetters[2],  
00004                         '--email'         :LSTR_optionLetters[3],  
00005                         '--jobs'          :LSTR_optionLetters[4],
00006                         '--magnetic-field':LSTR_optionLetters[5],
00007                         '--global-tag'    :LSTR_optionLetters[6],
00008                         '--filter'        :LSTR_optionLetters[7],
00009                         '--dataset'       :LSTR_optionLetters[8],
00010                         '--outpath'       :LSTR_optionLetters[9],
00011                         '--mergepath'     :LSTR_optionLetters[10]}

Definition at line 156 of file submitDQMOfflineCAF.py.

Definition at line 580 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::dt_stampOld = datetime.datetime(int(lstr_timeDate[0]),int(lstr_timeDate[1]),int(lstr_timeDate[2]),int(lstr_timeTime[0]),int(lstr_timeTime[1]),int(lstr_timeTime[2]))

Definition at line 579 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::file_cmsmonOutput = urllib.urlopen("http://cmsmon.cern.ch/cmsdb/servlet/RunSummary", str_cmsmonParams)

Definition at line 569 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::file_dbsOutput = urllib.urlopen("https://cmsweb.cern.ch/dbs_discovery/getLFN_txt", str_dbsParams)

Definition at line 543 of file submitDQMOfflineCAF.py.

Definition at line 632 of file submitDQMOfflineCAF.py.

Definition at line 540 of file submitDQMOfflineCAF.py.

Definition at line 674 of file submitDQMOfflineCAF.py.

Definition at line 600 of file submitDQMOfflineCAF.py.

Definition at line 229 of file submitDQMOfflineCAF.py.

Definition at line 225 of file submitDQMOfflineCAF.py.

Definition at line 142 of file submitDQMOfflineCAF.py.

Definition at line 562 of file submitDQMOfflineCAF.py.

Definition at line 326 of file submitDQMOfflineCAF.py.

Definition at line 539 of file submitDQMOfflineCAF.py.

Definition at line 608 of file submitDQMOfflineCAF.py.

list submitDQMOfflineCAF::LFLOAT_valueMagField = [0.0,2.0,3.0,3.5,3.8,4.0]

Definition at line 30 of file submitDQMOfflineCAF.py.

list submitDQMOfflineCAF::LSTR_auto = ['AUTO','Auto','auto']

Definition at line 37 of file submitDQMOfflineCAF.py.

list submitDQMOfflineCAF::LSTR_datatiers = ['RECO','RAW']

Definition at line 134 of file submitDQMOfflineCAF.py.

list submitDQMOfflineCAF::LSTR_false = ['0','FALSE','False','false']

Definition at line 34 of file submitDQMOfflineCAF.py.

Definition at line 151 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::lstr_linesInput = file_inputFilesCff.readlines()

Definition at line 610 of file submitDQMOfflineCAF.py.

list submitDQMOfflineCAF::LSTR_optionLetters = ['-r','-C','-S','-e','-j','-M','-g','-f','-d','-o','-m']

Definition at line 155 of file submitDQMOfflineCAF.py.

Definition at line 139 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::lstr_timeDate = str_timeQuery.split('=')

Definition at line 577 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::lstr_timeQuery = str_cmsmonOutput.split('HREF=Component?RUN=' + Str_run + '&NAME=TRACKER&')

Definition at line 574 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::lstr_timeTime = str_timeQuery.split('=')

Definition at line 578 of file submitDQMOfflineCAF.py.

list submitDQMOfflineCAF::LSTR_true = ['1','TRUE' ,'True' ,'true' ]

Definition at line 33 of file submitDQMOfflineCAF.py.

Definition at line 136 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::lstr_wordsLine = str_iLine.split("/")

Definition at line 545 of file submitDQMOfflineCAF.py.

Definition at line 29 of file submitDQMOfflineCAF.py.

Definition at line 340 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_buffer = commands.getoutput('which crab')

Definition at line 462 of file submitDQMOfflineCAF.py.

Definition at line 517 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_cmsmonParams = urllib.urlencode({'RUN':Str_run})

Definition at line 568 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_correctedLine1 = str_linesInput.replace(')

Definition at line 679 of file submitDQMOfflineCAF.py.

Definition at line 445 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_datatier = Str_dataset.split('/')

Definition at line 501 of file submitDQMOfflineCAF.py.

Definition at line 503 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_dbsParams = urllib.urlencode({'dbsInst':'cms_dbs_prod_global', 'blockName':'*', 'dataset':Str_dataset, 'userMode':'user', 'run':Str_run, 'what':'py'})

Definition at line 542 of file submitDQMOfflineCAF.py.

Definition at line 35 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_email = 'volker.adler@cern.ch'

Definition at line 141 of file submitDQMOfflineCAF.py.

Definition at line 224 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_globalTag = 'CRAFT_V4P::All'

Definition at line 143 of file submitDQMOfflineCAF.py.

Definition at line 226 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::str_lineInput = '/SiStripDQMOfflineGlobalRunCAF-'

Definition at line 635 of file submitDQMOfflineCAF.py.

Definition at line 144 of file submitDQMOfflineCAF.py.

Definition at line 228 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_mailServer = '@mail.cern.ch'

Definition at line 168 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_mailSmtp = 'localhost'

Definition at line 167 of file submitDQMOfflineCAF.py.

Initial value:
00001 """
00002 for SiStrip offline DQM at the CAF.
00003 Unfortunately, this needed to be done from your private account. So, only you
00004 are able to finalize this submission -- even after the end of your shift.
00005 To do so, please forward all emails from the LSF batch system referring to the
00006 respective jobs to the list  t h i s  message was sent to.
00007 -- and then your shift is  r e a l l y  done :-)
00008 
00009 We are very sorry for the inconvenience.
00010 Thanks a lot!
00011 
00012 Best regards,
00013 your SiStrip DQM team
00014 
00015 P.S.:
00016 To reply to this email, simply use the "Reply to all" function of your email
00017 client.
00018 """

Definition at line 172 of file submitDQMOfflineCAF.py.

Definition at line 169 of file submitDQMOfflineCAF.py.

Definition at line 233 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_mergepath = '/afs/cern.ch/cms/CAF/CMSCOMM/COMM_TRACKER/DQM/SiStrip/jobs/merged'

Definition at line 149 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_nameCmsswPackage = 'DQM/SiStripMonitorClient'

Definition at line 38 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::Str_nameCmsswRel = os.getenv('CMSSW_VERSION')

Definition at line 316 of file submitDQMOfflineCAF.py.

Definition at line 533 of file submitDQMOfflineCAF.py.

Definition at line 528 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_nameRunIncludeDir = STR_nameCmsswPackage.replace('/','.')

Definition at line 534 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::str_nameStamp = str_timeQuery.split('=')

Definition at line 576 of file submitDQMOfflineCAF.py.

Definition at line 36 of file submitDQMOfflineCAF.py.

Definition at line 231 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::STR_outpath = '/castor/cern.ch/user/c/cctrack/DQM'

Definition at line 147 of file submitDQMOfflineCAF.py.

Definition at line 665 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::Str_pathCmsswBase = os.getenv('CMSSW_BASE')

Definition at line 307 of file submitDQMOfflineCAF.py.

Definition at line 317 of file submitDQMOfflineCAF.py.

Main program.

Definition at line 306 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::Str_pathInputFilesCAFCff = '/inputFilesCAF_cff.py'

Definition at line 631 of file submitDQMOfflineCAF.py.

string submitDQMOfflineCAF::str_pathInputFilesJobCff = '/inputFiles_cff.py'

Definition at line 673 of file submitDQMOfflineCAF.py.

Definition at line 531 of file submitDQMOfflineCAF.py.

Definition at line 396 of file submitDQMOfflineCAF.py.

Definition at line 614 of file submitDQMOfflineCAF.py.

Definition at line 648 of file submitDQMOfflineCAF.py.

Definition at line 223 of file submitDQMOfflineCAF.py.

Definition at line 140 of file submitDQMOfflineCAF.py.

Definition at line 318 of file submitDQMOfflineCAF.py.

Definition at line 39 of file submitDQMOfflineCAF.py.

Definition at line 570 of file submitDQMOfflineCAF.py.

Definition at line 571 of file submitDQMOfflineCAF.py.

Definition at line 581 of file submitDQMOfflineCAF.py.

tuple submitDQMOfflineCAF::TD_shiftUTC = datetime.timedelta(hours = 2)

Definition at line 31 of file submitDQMOfflineCAF.py.