Classes | |
class | BinToBin |
class | BinToBin1percent |
class | Chi2 |
class | KS |
class | StatisticalTest |
class | unpickler |
Functions | |
def | _byteify (data, ignore_dicts=False) |
def | ask_ok (prompt, retries=4, complaint='yes or no') |
def | code_generator (kwds) |
def | friendly_since (time_type, since) |
def | functor (code, kwds, debug=0) |
def | get_relval_cmssw_version (file) |
def | get_relval_id (file) |
def | get_relval_max_version (files) |
def | get_relval_version (file) |
-------------—— Make files pairs: RelVal utils ---------------—— More... | |
def | get_relvaldata_cmssw_version (file) |
def | get_relvaldata_id (file) |
-----------—— Make files pairs: RelValData utils --------------—— More... | |
def | get_relvaldata_max_version (files) |
def | get_relvaldata_version (file) |
def | getNbins (h) |
def | is_empty (h) |
def | is_relvaldata (files) |
----------------------— Make files pairs -----------------------— More... | |
def | is_sparse (h) |
def | literal2root (literal, rootType) |
def | logger (msg_level, message) |
def | make_files_pairs (files, verbose=True) |
def | parse_word (word) |
def | profile2histo (profile) |
def | setTDRStyle () |
def | template_directory () |
def | test_env (tdir, tmpl) |
def | to_datetime (date_string) |
def | to_timestamp (obj) |
def | tree (idir) |
def | user_info (ainput=None) |
def | wget (url) |
Variables | |
_log_level | |
argv | |
gErrorIgnoreLevel | |
TAG | |
theargv | |
Function get string objects instead of Unicode from JSON using obje_hook see: https://stackoverflow.com/questions/956867/how-to-get-string-objects-instead-of-unicode-from-json This is necessary in python versions less than 3. usage: def json_load_byteified(file_handle): return _byteify( json.load(file_handle, object_hook=_byteify), ignore_dicts=True ) def json_loads_byteified(json_text): return _byteify( json.loads(json_text, object_hook=_byteify), ignore_dicts=True )
File that contains utility functions used by various modules, but that do not fit into any single module.
|
private |
def utils.ask_ok | ( | prompt, | |
retries = 4 , |
|||
complaint = 'yes or no' |
|||
) |
Definition at line 431 of file utils.py.
References submitPVValidationJobs.__init__(), and print().
Referenced by utils.BinToBin1percent.do_test().
def utils.code_generator | ( | kwds | ) |
Code generator function, parse user arguments, load and return appropriate template generator module.
Definition at line 122 of file utils.py.
Referenced by cms.generate(), and main.generator().
def utils.friendly_since | ( | time_type, | |
since | |||
) |
Takes a since and, if it is Run-based expressed as Lumi-based, returns the run number. Otherwise, returns the since without transformations.
Definition at line 18 of file utils.py.
def utils.functor | ( | code, | |
kwds, | |||
debug = 0 |
|||
) |
Auto-generate and execute function with given code and configuration For details of compile/exec/eval see http://lucumr.pocoo.org/2011/2/1/exec-in-python/
Definition at line 70 of file utils.py.
References join(), and print().
Referenced by ALPAKA_ACCELERATOR_NAMESPACE::HcalRecoParamWithPulseShapeESProducer.produce(), and pkg.AbstractPkg.write().
def utils.get_relval_cmssw_version | ( | file | ) |
Definition at line 544 of file utils.py.
References get_relval_id().
Referenced by get_relval_max_version().
def utils.get_relval_id | ( | file | ) |
Returns unique relval ID (dataset name) for a given file.
Definition at line 556 of file utils.py.
References any(), watchdog.group, and is_relvaldata().
Referenced by get_relval_cmssw_version().
def utils.get_relval_max_version | ( | files | ) |
Returns file with maximum version at a) beggining of the file, e.g. DQM_V000M b) at the end of run, e.g. _run2012-vM. M has to be max.
Definition at line 532 of file utils.py.
References get_relval_cmssw_version(), and get_relval_version().
Referenced by get_relval_version().
def utils.get_relval_version | ( | file | ) |
-------------—— Make files pairs: RelVal utils ---------------——
Returns tuple (CMSSW version, run version) for specified file.
Definition at line 525 of file utils.py.
References get_relval_max_version(), and createfilelist.int.
Referenced by get_relval_max_version(), and get_relvaldata_max_version().
def utils.get_relvaldata_cmssw_version | ( | file | ) |
Returns tuple (CMSSW release, GR_R version) for specified RelValData file.
Definition at line 494 of file utils.py.
References get_relvaldata_version().
Referenced by get_relvaldata_id().
def utils.get_relvaldata_id | ( | file | ) |
-----------—— Make files pairs: RelValData utils --------------——
Returns unique relvaldata ID for a given file.
Definition at line 484 of file utils.py.
References get_relvaldata_cmssw_version().
Referenced by wget().
def utils.get_relvaldata_max_version | ( | files | ) |
Returns file with maximum version at a) beggining of the file, e.g. DQM_V000M b) at the end of run, e.g. _run2012-vM. M has to be max.
Definition at line 512 of file utils.py.
References get_relval_version(), and get_relvaldata_version().
Referenced by get_relvaldata_version().
def utils.get_relvaldata_version | ( | file | ) |
Returns tuple (CMSSW version, run version) for specified file.
Definition at line 503 of file utils.py.
References get_relvaldata_max_version(), and createfilelist.int.
Referenced by get_relvaldata_cmssw_version(), and get_relvaldata_max_version().
def utils.getNbins | ( | h | ) |
To be used in loops on bin number with range() For each dimension there are GetNbinsX()+2 bins including underflow and overflow, and range() loops starts from 0. So the total number of bins as upper limit of a range() loop already includes the next to last value needed.
Definition at line 94 of file utils.py.
Referenced by utils.Chi2.absval(), utils.BinToBin.do_test(), utils.BinToBin1percent.do_test(), and utils.StatisticalTest.get_rank().
def utils.is_empty | ( | h | ) |
Definition at line 179 of file utils.py.
Referenced by DTSectColl.addTSTheta(), PrepareDMRTrends.compileDMRTrends(), DEcompare< T >.get_ncand(), utils.StatisticalTest.get_rank(), and DEcompare< T >.SortCollections().
def utils.is_relvaldata | ( | files | ) |
----------------------— Make files pairs -----------------------—
Definition at line 569 of file utils.py.
References make_files_pairs().
Referenced by get_relval_id().
def utils.is_sparse | ( | h | ) |
def utils.literal2root | ( | literal, | |
rootType | |||
) |
Definition at line 71 of file utils.py.
References print().
def utils.logger | ( | msg_level, | |
message | |||
) |
Definition at line 49 of file utils.py.
References print().
def utils.make_files_pairs | ( | files, | |
verbose = True |
|||
) |
Definition at line 573 of file utils.py.
References mps_setup.append, beamvalidation.exit(), SiStripPI.max, print(), and str.
Referenced by ValidationMatrix.get_filenames_from_pool(), and is_relvaldata().
def utils.parse_word | ( | word | ) |
Definition at line 37 of file utils.py.
References FastTimerService_cff.range.
Referenced by pkg.AbstractPkg.tmpl_tags().
def utils.profile2histo | ( | profile | ) |
def utils.setTDRStyle | ( | ) |
def utils.template_directory | ( | ) |
Definition at line 23 of file utils.py.
Referenced by main.generator().
def utils.test_env | ( | tdir, | |
tmpl | |||
) |
Test user environment, look-up if user has run cmsenv, otherwise provide meaningful error message back to the user.
Definition at line 53 of file utils.py.
References print().
Referenced by main.generator().
def utils.to_datetime | ( | date_string | ) |
Takes a date string with the format Y-m-d H:m:S.f and gives back a datetime.datetime object
Definition at line 12 of file utils.py.
Referenced by querying_tests.global_tag_tests().
def utils.to_timestamp | ( | obj | ) |
def utils.tree | ( | idir | ) |
Definition at line 143 of file utils.py.
References print().
def utils.wget | ( | url | ) |
Fetch the WHOLE file, not in bunches... To be optimised.
Definition at line 459 of file utils.py.
References get_relvaldata_id(), print(), and fileinputsource_cfi.read.
Referenced by utils.unpickler.run().
utils.gErrorIgnoreLevel |
Definition at line 27 of file utils.py.
Referenced by main(), FWFileEntry.openFile(), and TkAlStyle.set().