CMS 3D CMS Logo

Functions | Variables
PixBary Namespace Reference

Functions

def get_IOVs (jobConfig)
 
def PixBary (config, validationDir, verbose=False)
 

Variables

string _validationName = "PixBary"
 

Function Documentation

◆ get_IOVs()

def PixBary.get_IOVs (   jobConfig)

Definition at line 63 of file PixBary.py.

Referenced by PixBary().

63 def get_IOVs(jobConfig):
64  return [[jobConfig['firstRun'], jobConfig['lastRun']]]
65 
def get_IOVs(jobConfig)
Definition: PixBary.py:63

◆ PixBary()

def PixBary.PixBary (   config,
  validationDir,
  verbose = False 
)

Definition at line 6 of file PixBary.py.

References get_IOVs(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets.if(), mps_monitormerge.items, join(), print(), and str.

6 def PixBary(config, validationDir, verbose=False):
7 
8  jobs = []
9 
10 
11  IOVs = {}
12 
13 
14  jobType = "single"
15 
16 
17  if not jobType in config["validations"][_validationName]:
18  raise LookupError("No '%s' key word in config for %s" %(jobType, _validationName))
19 
20 
21  for jobName, jobConfig in config["validations"][_validationName][jobType].items():
22  IOV_list = get_IOVs(jobConfig) # The PixelBarycentre automatically detects IOV changes in the payloads. This list is used to specify the run range(s) to analyze
23  if(verbose):
24  print('job: %s IOV_list: %s', jobName, IOV_list)
25  IOVs[jobName] = IOV_list
26 
27 
28  for runRange in IOV_list:
29  IOV = '-'.join(str(i) for i in runRange)
30 
31  for alignment, alignmentConfig in config["alignments"].items():
32 
33  workDir = os.path.join(validationDir, _validationName, jobType, jobName, alignment, IOV)
34 
35 
36  local = {}
37  local["output"] = os.path.join(config["LFS"], config["name"], _validationName, jobType, alignment, jobName, IOV)
38  local["alignment"] = copy.deepcopy(alignmentConfig)
39  local["alignment"]["label"] = alignment
40  local["validation"] = copy.deepcopy(jobConfig)
41  local["validation"].pop("alignments")
42  local["validation"]["IOV"] = IOV
43  if "dataset" in local["validation"]:
44  local["validation"]["dataset"] = local["validation"]["dataset"].format(IOV)
45  if "goodlumi" in local["validation"]:
46  local["validation"]["goodlumi"] = local["validation"]["goodlumi"].format(IOV)
47 
48 
49  job = {
50  "name": "{}_{}_{}_{}_{}".format(_validationName, alignment, jobType, jobName, IOV),
51  "dir": workDir,
52  "exe": "cmsRun",
53  "cms-config": "{}/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/PixelBaryCentreAnalyzer_cfg.py".format(os.environ["CMSSW_BASE"]),
54  "run-mode": "Condor",
55  "dependencies": [],
56  "config": local,
57  }
58 
59  jobs.append(job)
60 
61  return jobs
62 
def PixBary(config, validationDir, verbose=False)
Definition: PixBary.py:6
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def get_IOVs(jobConfig)
Definition: PixBary.py:63
static std::string join(char **cmd)
Definition: RemoteFile.cc:21
#define str(s)
if(threadIdxLocalY==0 &&threadIdxLocalX==0)

Variable Documentation

◆ _validationName

string PixBary._validationName = "PixBary"
private

Definition at line 4 of file PixBary.py.