Functions | Variables
runNovaSAM Namespace Reference

Functions

def unCamelCase (s)
 
def createMetadata (inFile)
 
def getOutDir (pathname, hashDirs=False)
 
def checkAndMoveFiles (inFile, declareFiles)
 
def declareFile (fileWPath)
 
def copyOutFiles (hashDirs=False)
 
def getOutputFileName (detector, runNum, subNum, streamEntry, release, subversion, dataFlag, tier, nevt)
 
def resolveFclPath (fcl)
 
def setVMemLimit ()
 
def makeDirSafely (dir)
 
def makeDirIfNeeded (dir)
 
def getOutDir (pathname, dest, hashDirs=False, runDirs=False, runNum=0)
 
def checkAndMoveFiles (inFile, outputs, noCleanup=False)
 
def h5MetaHack (inFile)
 
def declareLogFile (logName, rootName)
 
def fileExists (outPath, dh)
 
def listFiles (outPath, dh)
 
def makeMetadataJSONs ()
 
def MakeTransposeJson (TransposeList)
 
def copyOutFiles (dest, hashDirs=False, runDirs=False, runNum=0, noCleanup=False, declareLocation=False, declareLogs=False)
 
def makeDeCAF (script, fname, special)
 

Variables

 gErrorIgnoreLevel
 
 detectors = dict()
 
 _lineregex = re.compile(r'\d+: ([^ \t]+)[ \t]+(.+)')
 
 _skip_pattern = re.compile(r"^.*(hist|RootOutput).*\.root", re.IGNORECASE)
 
 parser = argparse.ArgumentParser(description='Run the nova command using SAM metadata')
 
 help
 
 type
 
 str
 
 action
 
 args = parser.parse_args()
 
 inFile = args.inFile
 
 samweb = samweb_client.SAMWebClient(experiment='nova')
 
 inFileBase = os.path.basename(inFile)
 
 metadata = samweb.getMetadata(inFileBase)
 
 runNum = int(metadata["runs"][0][0])
 
 subNum = int(metadata["runs"][0][1])
 
 run_pattern = re.compile(r"^.*?_r([0-9]+)_s([0-9]+).+")
 
 run_match = run_pattern.match(inFileBase)
 
 stream = int(metadata["data_stream"])
 
string streamEntry = 't{0:02d}'
 
 stream_pattern = re.compile(r"^.*?_(dd.*?)[_,.].+", re.IGNORECASE)
 
 stream_match = stream_pattern.match(inFileBase)
 
 detector = metadata["online.detector"].lower()
 
 detId = metadata["nova.detectorid"].lower()
 
 release = os.environ["SRT_BASE_RELEASE"]
 
 file_type = metadata["file_type"]
 
string dataFlag = "data"
 
 subversion = os.environ["NPASS"]
 
 nevt = None
 
 fclFile = args.config
 
 fclPath = resolveFclPath(fclFile)
 
 tmpFclName = os.path.basename(fclPath).replace(".fcl", "_" + os.path.splitext(inFileBase)[0] + ".fcl")
 
 fclFileObj = open(tmpFclName, 'a')
 
list cmdList = ['nova']
 
 outTier
 
 cafTier
 
list outList = []
 
 output = outTier.split(":")[0]
 
 tier = outTier.split(":")[1]
 
 outName = getOutputFileName(detector, runNum, subNum, streamEntry, release, subversion, dataFlag, tier, nevt)
 
 cafLabel = cafTier.split(":")[0]
 
 cafName = getOutputFileName(detector, runNum, subNum, streamEntry, release, subversion, dataFlag, tier, nevt)
 
string cmd = ' '
 
 retCode = subprocess.call(cmdList)
 
 dirList = os.listdir(".")
 
 skip_match = _skip_pattern.match(file)
 
 dh = ifdh.ifdh("http://samweb.fnal.gov:8480/sam/nova/api")
 
 argvCopy
 Do a little bit of trickery with sys.argv to stop ROOT from gobbling it up and killing –help. More...
 
 argv
 
 description
 
 default
 
 False
 
 experiment
 
 fileMetaDataMgr
 
 PassFile
 
 isRunningMetadataModule
 
 shell
 
 doMeta
 
 flatTier
 
 h5Tier
 
 precopyscript
 
 outputs
 
 outP
 
 outC
 
 outXp
 
 outXc
 
 outYp
 
 outYc
 
 NewOMod
 
 outX
 
 outY
 
 outNameTemp
 
 FirstRun
 
 LastRun
 
 Index
 
 NewOName
 
 flatLabel
 
 flatName
 
 h5Label
 
 h5Name
 
 histName
 
 olddir
 Are we streaming the files via xrootd? txtcmd="cat %s | xargs -n1 samweb2xrootd > xrootd_inFile.txt"inFile os.system(txtcmd) with open("xrootd_inFile.txt") as f: for line in f: print line.strip() cmdList.append( line.strip() ) print "" Are we going to copy the files? More...
 
 allFiles
 
 failFiles
 
 copyfile
 
 ifdhcmd
 
 ret
 
 gdbArgs
 
 stdout
 
 logfile
 
 stderr
 
 decafdir
 If using a txtfiledef make sure to clean up the InputFile List.... More...
 
 dest
 

Function Documentation

def runNovaSAM.checkAndMoveFiles (   inFile,
  outputs,
  noCleanup = False 
)
Checks all root files in the current directories for zombie or recovered status. Bad files are deleted while good files are moved to the results subdirectory for copy out ease

Definition at line 88 of file runNovaSAM.py.

References checkAndMoveFiles().

88 def checkAndMoveFiles(inFile, outputs, noCleanup=False):
89  """Checks all root files in the current directories for zombie or recovered status. Bad files are deleted while good files are moved to the results subdirectory for copy out ease"""
90  inFileBase = os.path.basename(inFile)
91  baseDir = "."
92  # If declaring files have to do non-decafs first, since they're the parents
93  # of the decafs. If not, it doesn't hurt to do it in that order anyway.
94  for decafPass in [False, True]:
95  for root, dirs, filenames in os.walk(baseDir):
96  if root == baseDir:
97  for file in filenames:
98  if file.endswith('decaf.root') != decafPass: continue
99  # If file not in outputs, then delete.
100  if (file.endswith (".root") or file.endswith(".h5")) and file != inFileBase:
101  fileWPath = os.path.join(root, file)
102  # If the file isn't in my outputs then delete it.
103  if file not in outputs:
104  if not noCleanup:
105  # Do not copy over, just delete
106  print "File", fileWPath, " is not among requested outputs, removing"
107  os.remove(fileWPath)
108  continue
109  # Now that I know that this file is in my output list, lets check it is valid...
110  # First, if it is a root file.
111  if file.endswith (".root"):
112  print "In checkAndMoveFiles, fileWPath is %s" %fileWPath
113  rootFile = ROOT.TFile(fileWPath)
114  if rootFile.IsZombie() or rootFile.TestBit(ROOT.TFile.kRecovered):
115  #do not copy over, just delete
116  print "File", fileWPath, "is Zombie - remove it"
117  os.remove(fileWPath)
118  else:
119  newFilePath = os.path.join(root, "results", file)
120  print "New file name is %s" %newFilePath
121  os.renames(fileWPath, newFilePath)
122  rootFile.Close()
123  # Next, if it is a h5 file.
124  elif file.endswith(".h5"):
125  # Only import h5py if have h5 files.
126  import h5py
127  print "In checkAndMoveFiles, fileWPath is %s" %fileWPath
128  # If a valid HDF5 files.
129  if h5py.is_hdf5(fileWPath):
130  newFilePath = os.path.join(root, "results", file)
131  os.renames(fileWPath, newFilePath)
132  print "Moved ", fileWPath, "to ", newFilePath
133  # If not a valid HDF5 file.
134  else:
135  print "File", fileWPath, "is Zombie - remove it"
136  os.remove(fileWPath)
137  return
138 
def checkAndMoveFiles(inFile, declareFiles)
Definition: runNovaSAM.py:105
def runNovaSAM.checkAndMoveFiles (   inFile,
  declareFiles 
)
Checks all root files in the current directories for zombie or recovered status. Bad files are deleted while good files are moved to the results subdirectory for copy out ease

Definition at line 105 of file runNovaSAM.py.

References declareFile().

Referenced by checkAndMoveFiles().

105 def checkAndMoveFiles(inFile, declareFiles):
106  """Checks all root files in the current directories for zombie or recovered status. Bad files are deleted while good files are moved to the results subdirectory for copy out ease"""
107  inFileBase = os.path.basename(inFile)
108  baseDir = "."
109  for root, dirs, filenames in os.walk(baseDir):
110  if root == baseDir:
111  for file in filenames:
112  if file.endswith (".root") and file != inFileBase:
113  fileWPath = os.path.join(root, file)
114  rootFile = ROOT.TFile(fileWPath)
115  if rootFile.IsZombie() or rootFile.TestBit(ROOT.TFile.kRecovered):
116  #do not copy over, just delete
117  print "File", fileWPath, "is Zombie - remove it"
118  os.remove(fileWPath)
119  else:
120  if declareFiles == True:
121  declareFile(fileWPath)
122  newFilePath = os.path.join(root, "results", file)
123  os.renames(fileWPath, newFilePath)
124  rootFile.Close()
125  return
126 
def checkAndMoveFiles(inFile, declareFiles)
Definition: runNovaSAM.py:105
def declareFile(fileWPath)
Definition: runNovaSAM.py:127
def runNovaSAM.copyOutFiles (   hashDirs = False)
Builtin facility to copy out art files (automatically excludes hist files). This adds in a subdirectories with a single hex digit each corresponding to the first three digits in the hash of the output file name. This splits up files into 4096 separate subdirectories, preventing overfull directories. Copy out does not happen if the file already exists in the output

Definition at line 149 of file runNovaSAM.py.

References getOutDir().

Referenced by copyOutFiles().

149 def copyOutFiles(hashDirs=False):
150  """Builtin facility to copy out art files (automatically excludes hist files). This adds in a subdirectories with a single hex digit each corresponding to the first three digits in the hash of the output file name. This splits up files into 4096 separate subdirectories, preventing overfull directories. Copy out does not happen if the file already exists in the output"""
151  print "Copying out files"
152  dh = ifdh.ifdh("http://samweb.fnal.gov:8480/sam/nova/api")
153  baseDir = "./results"
154  for root, dirs, filenames in os.walk(baseDir):
155  if root == baseDir:
156  for file in filenames:
157  if file.endswith (".root") and file != inFileBase:
158  fileWPath = os.path.join(root, file)
159  dest = getOutDir(file, hashDirs)
160  skip_match = _skip_pattern.match(file)
161  if skip_match == None:
162  try:
163  print "Checking if", dest + "/" + file, "exists"
164  dh.ls(dest + "/" + file, 1, "")
165  except RuntimeError:
166  print "It doesn't - copy", fileWPath, "to", dest
167  dh.cp(["-D", fileWPath, dest])
168  print "Removing", fileWPath
169  os.remove(fileWPath)
170  dh.cleanup()
171  return
172 
def copyOutFiles(hashDirs=False)
Definition: runNovaSAM.py:149
def getOutDir(pathname, hashDirs=False)
Definition: runNovaSAM.py:92
def runNovaSAM.copyOutFiles (   dest,
  hashDirs = False,
  runDirs = False,
  runNum = 0,
  noCleanup = False,
  declareLocation = False,
  declareLogs = False 
)
Builtin facility to copy out art files. This adds in a subdirectories with a single hex digit each corresponding to the first three digits in the hash of the output file name. This splits up files into 4096 separate subdirectories, preventing overfull directories. Copy out does not happen if the file already exists in the output

Definition at line 362 of file runNovaSAM.py.

References copyOutFiles(), declareFile(), declareLogFile(), and getOutDir().

362 def copyOutFiles(dest, hashDirs=False, runDirs=False, runNum=0, noCleanup=False, declareLocation=False, declareLogs=False):
363  """Builtin facility to copy out art files. This adds in a subdirectories with a single hex digit each corresponding to the first three digits in the hash of the output file name. This splits up files into 4096 separate subdirectories, preventing overfull directories. Copy out does not happen if the file already exists in the output"""
364  dh = ifdh.ifdh("http://samweb.fnal.gov:8480/sam/nova/api")
365  baseDir = "./results"
366  declareFiles = declareLogs
367  for root, dirs, filenames in os.walk(baseDir):
368  if root == baseDir:
369  for file in filenames:
370  if (file.endswith (".root") or file.endswith(".h5") ) and file != inFileBase:
371  fileWPath = os.path.join(root, file)
372  outDir = getOutDir(file, dest, hashDirs, runDirs, runNum)
373  skip_match = _skip_pattern.match(file)
374  if skip_match == None:
375  outPath = os.path.join(outDir, file)
376 
377  # note: this will fail if the file already exists
378  returnValue = dh.cp(["-D", fileWPath, outDir])
379  if returnValue != 0:
380  print >> sys.stderr, "Copy out failed for file:", fileWPath
381  print >> sys.stderr, "Skipping it."
382  else:
383  if declareFiles:
384  declareFile(fileWPath)
385  ###################
386  # Declare the file's location to SAM if we have the declareLocation option on
387  if declareLocation==True :
388  loc = string.replace(outDir, 's3://','s3:/')
389  print "Declaring location %s for file %s\n" % (loc,file)
390  sam = samweb_client.SAMWebClient('nova')
391  ret=sam.addFileLocation(file, loc)
392  if ret.status_code != 200 :
393  print " SAMWEB Unable to declare file location (%s, %s) status code %s" %(file, loc, ret.status_code)
394  if fileWPath.endswith (".root"):
395  jsonPath = fileWPath.replace('.root', '.json')
396  elif fileWPath.endswith (".h5"):
397  jsonPath = fileWPath + '.json'
398  if os.path.isfile(jsonPath):
399  returnValue = dh.cp(['-D', jsonPath, outDir])
400  if returnValue != 0:
401  print >> sys.stderr, "Copy out failed for file: " + jsonPath
402  print >> sys.stderr, "Skipping it."
403 
404  for ext in ['.bz2', '']:
405  if os.path.isfile('log.txt'+ext):
406  if file.endswith (".root"):
407  logName = file.replace('.root', '.log'+ext)
408  elif file.endswith (".h5"):
409  logName = file + '.log'+ext
410  returnValue = dh.cp(['log.txt'+ext, outDir+'/'+logName])
411  # Remove the copied-out log so it's not in
412  # the way for new log creation.
413  os.remove('log.txt'+ext)
414  if returnValue != 0:
415  print >> sys.stderr, "Copy out failed for file: " + logName
416  print >> sys.stderr, "Skipping it."
417  if declareLogs:
418  declareLogFile(logName, file)
419  break
420 
421  else:
422  print "It does exist, not copying."
423  if not noCleanup:
424  print "Removing", fileWPath
425  os.remove(fileWPath)
426 
427  if fileWPath.endswith(".root"):
428  jsonPath = fileWPath.replace('.root', '.json')
429  elif fileWPath.endswith(".h5"):
430  jsonPath = fileWPath + ".json"
431  if os.path.isfile(jsonPath):
432  print 'Removing', jsonPath
433  os.remove(jsonPath)
434  return
435 
def copyOutFiles(hashDirs=False)
Definition: runNovaSAM.py:149
def declareLogFile(logName, rootName)
Definition: runNovaSAM.py:209
def getOutDir(pathname, hashDirs=False)
Definition: runNovaSAM.py:92
def declareFile(fileWPath)
Definition: runNovaSAM.py:127
def runNovaSAM.createMetadata (   inFile)

Definition at line 36 of file runNovaSAM.py.

References samweb_client.utility.fileEnstoreChecksum(), site_stats_from_log.get, str, and unCamelCase().

Referenced by declareFile().

36 def createMetadata(inFile):
37  filename = os.path.basename(inFile)
38  filesize = os.path.getsize(inFile)
39 
40  try:
41  data = subprocess.check_output(["sam_metadata_dumper", str(inFile)])
42  except subprocess.CalledProcessError:
43  print "sam_metadata_dumper failed!"
44  return None
45 
46  md = {'file_name': filename, 'group': 'nova', 'file_size': filesize, 'file_format': 'root'}
47 
48  # An ad-hoc parser for the output
49  mode = 'new'
50  for line in data.split('\n'):
51  m = _lineregex.match(line)
52  if mode == 'json':
53  if not m and not line.startswith('-'):
54  data += line
55  else:
56  md[key] = json.loads(data)
57  mode = 'new'
58 
59  if mode == 'new':
60  if m:
61  key = m.group(1)
62  value = m.group(2)
63 
64  if '.' not in key:
65  key = unCamelCase(key)
66 
67  # ART does not appear to set the application name
68  # but does provide a process name
69  if key == 'process_name' and md.get('application',[]).get('name') is None:
70  key = 'application_name'
71  elif key == 'stream_name':
72  key = 'data_stream'
73 
74  if key in ('start_date','end_date'):
75  value = long(value)
76 
77  if key == 'runs' or key == 'parents':
78  mode = 'json'
79  data = value
80  elif key.startswith('application_'):
81  # special handling for applications
82  if 'application' not in md:
83  md['application'] = {}
84  md['application'][key[12:]] = value
85  else:
86  md[key] = value
87 
88  md['crc'] = fileEnstoreChecksum(inFile)
89 
90  return md
91 
def unCamelCase(s)
Definition: runNovaSAM.py:29
def fileEnstoreChecksum(path)
Definition: utility.py:50
def createMetadata(inFile)
Definition: runNovaSAM.py:36
def runNovaSAM.declareFile (   fileWPath)
Checks file for a TKey of RootFileDB.  If it exists, run sam_metadata_dumper and construct appropriate metadata for the file. Use that metadata to declare the file to SAM

Definition at line 127 of file runNovaSAM.py.

References createMetadata().

Referenced by checkAndMoveFiles(), copyOutFiles(), and h5MetaHack().

127 def declareFile(fileWPath):
128  """Checks file for a TKey of RootFileDB. If it exists, run sam_metadata_dumper and construct appropriate metadata for the file. Use that metadata to declare the file to SAM"""
129  samweb = samweb_client.SAMWebClient(experiment='nova')
130  rootFile = ROOT.TFile(fileWPath)
131  if rootFile.FindKey("RootFileDB"):
132  print "Found key (RootFileDB): constructing metadata for", fileWPath
133  md = createMetadata(fileWPath)
134  if (md == None):
135  print "No metadata found!"
136  else:
137  pprint.pprint(md)
138  print ''
139  print "Declaring", fileWPath, "to SAM"
140  try:
141  samweb.declareFile(md)
142  except:
143  print fileWPath, "already exists in SAM"
144  else:
145  print fileWPath, "does not contain RootFileDB, do not try to declare"
146  rootFile.Close()
147  return
148 
def createMetadata(inFile)
Definition: runNovaSAM.py:36
def declareFile(fileWPath)
Definition: runNovaSAM.py:127
def runNovaSAM.declareLogFile (   logName,
  rootName 
)

Definition at line 209 of file runNovaSAM.py.

Referenced by copyOutFiles().

209 def declareLogFile(logName, rootName):
210  # This is what NovaFTS/plugins/nova_log_metadata.py does
211  md = {
212  'file_name': os.path.basename(logName),
213  'data_tier': 'log',
214  'file_format': 'log',
215  'file_type': 'unknown', # maybe 'nonPhysicsGeneric'?
216  'parents': [{'file_name': os.path.basename(rootName)}]
217  }
218  print "16) declareLogFile(logName, rootName):"
219  print "Declaring", logName, "to SAM"
220  try:
221  samweb = samweb_client.SAMWebClient(experiment='nova')
222  samweb.declareFile(md)
223  except Exception as inst:
224  print inst
225 
226 
def declareLogFile(logName, rootName)
Definition: runNovaSAM.py:209
def runNovaSAM.fileExists (   outPath,
  dh 
)

Definition at line 227 of file runNovaSAM.py.

227 def fileExists(outPath, dh):
228  try:
229  # Check to see if you can ls the file.
230  # This works in ifdh 1_7_0 and newer
231  # If it exists, dh.ls() returns a tuple with one entry, converts to True
232  # If it doesn't, dh.ls() returns an empty tuple, converts to False
233  return bool(dh.ls(outPath, 1, ""))
234  except (RuntimeError, IOError) as e:
235  # Some versions of ifdh throw an exception when the file was not found
236  # But that means it is not there.
237  return False
238 
def fileExists(outPath, dh)
Definition: runNovaSAM.py:227
def runNovaSAM.getOutDir (   pathname,
  dest,
  hashDirs = False,
  runDirs = False,
  runNum = 0 
)

Definition at line 73 of file runNovaSAM.py.

References getOutDir(), parse_dependency_file_t.list, makeDirSafely(), and str.

73 def getOutDir(pathname, dest, hashDirs=False, runDirs=False, runNum=0):
74  dirs = [dest]
75  if hashDirs:
76  head, tail = os.path.split(pathname)
77  hash = md5.new(tail)
78  dirs += list(hash.hexdigest()[:3])
79  if runDirs:
80  head, tail = os.path.split(pathname)
81  runStr = str(runNum)
82  multiRunDir = runStr[:3].zfill(6)
83  makeDirSafely(os.path.join(dest, multiRunDir))
84  makeDirSafely(os.path.join(dest, multiRunDir, runStr))
85  dirs += [multiRunDir, runStr]
86  return os.path.join(*dirs)
87 
def makeDirSafely(dir)
Definition: runNovaSAM.py:41
def getOutDir(pathname, hashDirs=False)
Definition: runNovaSAM.py:92
def runNovaSAM.getOutDir (   pathname,
  hashDirs = False 
)

Definition at line 92 of file runNovaSAM.py.

References exit(), and parse_dependency_file_t.list.

Referenced by copyOutFiles(), and getOutDir().

92 def getOutDir(pathname, hashDirs=False):
93  if "DEST" in os.environ:
94  dest = os.environ["DEST"]
95  else:
96  print "No destination set!"
97  exit(1)
98  dirs = [dest]
99  if hashDirs:
100  head, tail = os.path.split(pathname)
101  hash = md5.new(tail)
102  dirs += list(hash.hexdigest()[:3])
103  return os.path.join(*dirs)
104 
def getOutDir(pathname, hashDirs=False)
Definition: runNovaSAM.py:92
exit(0)
def runNovaSAM.getOutputFileName (   detector,
  runNum,
  subNum,
  streamEntry,
  release,
  subversion,
  dataFlag,
  tier,
  nevt 
)

Definition at line 173 of file runNovaSAM.py.

References exit(), and novadaq::HexUtils.format().

173 def getOutputFileName(detector, runNum, subNum, streamEntry, release, subversion, dataFlag, tier, nevt):
174  if dataFlag == "sim":
175  pattern = re.compile(r"^.*?_(.*?)_\d+.*_v\d+_(.*?)(\.|\_)sim\..+")
176  match = pattern.match(inFileBase)
177  if match != None:
178  simLabel = match.groups()[0]
179  uniq = match.groups()[1]
180  outName = '{0}_{1}_{2}_r{3:08d}_s{4:02d}_{5}_v{6}_{7}_{8}.{9}.root'.format(detector, simLabel, nevt, runNum, subNum, release, subversion, uniq, dataFlag, tier)
181  else:
182  print "regex couldn't find the sim label and the uniqueifier"
183  exit(1)
184  else:
185  outName = '{0}_r{1:08d}_s{2:02d}_{3}_{4}_v{5}_{6}.{7}.root'.format(detector, runNum, subNum, streamEntry, release, subversion, dataFlag, tier)
186  return outName
187 
def getOutputFileName(detector, runNum, subNum, streamEntry, release, subversion, dataFlag, tier, nevt)
Definition: runNovaSAM.py:173
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
exit(0)
def runNovaSAM.h5MetaHack (   inFile)

Definition at line 139 of file runNovaSAM.py.

References MetadataUtils.createMetadata(), declareFile(), and hadd_reco_validation.group.

Referenced by makeMetadataJSONs().

139 def h5MetaHack(inFile):
140  print "Doing a hack to get HDF5 metadata...Will take CAF metadata and change subtly."
141  ### Make my client and get my CAF metadata
142  samweb = samweb_client.SAMWebClient(experiment='nova')
143  md = MetadataUtils.createMetadata( inFile.replace('.h5caf.h5', '.caf.root') )
144  ### Change some parameters.
145  md['file_name'] = inFile
146  md['data_tier'] = unicode('h5')
147  md['file_size'] = os.path.getsize( inFile )
148  ### return md
149  return md
150 
def createMetadata(inFile)
def h5MetaHack(inFile)
Definition: runNovaSAM.py:139
def runNovaSAM.listFiles (   outPath,
  dh 
)

Definition at line 239 of file runNovaSAM.py.

239 def listFiles(outPath, dh):
240  try:
241  return dh.ls(outPath, 1, "")
242  except:
243  return "Exception while trying to ls, OutPath =",outPath
244 
245 
def listFiles(outPath, dh)
Definition: runNovaSAM.py:239
def runNovaSAM.makeDeCAF (   script,
  fname,
  special 
)

Definition at line 436 of file runNovaSAM.py.

References novadaq::HexUtils.format(), if(), and resolveFclPath().

436 def makeDeCAF(script, fname, special):
437  trimname = fname[:-5] # cut off .root from end
438  trimidx = trimname.rindex('.')+1 # find last period before .root
439  decaf_tier = trimname[trimidx:-3]+'de'+trimname[-3:] # properly insert 'de'
440  oname = '{0}_{1}.{2}.root'.format(trimname, special, decaf_tier)
441  novaSource = os.getenv("SRT_PUBLIC_CONTEXT", "undefined")
442  if(novaSource == "undefined"):
443  novaSource = os.getenv("NOVASOFT_DIR", "undefined")
444  if(novaSource == "undefined"):
445  NGU.fail("Unable to locate NOvA source code")
446  else:
447  novaSource = os.getenv("NOVASOFT_DIR") + "/source"
448 
449  os.system('cafe -bq '+novaSource+'/CAFAna/'+script+' '+fname+' '+oname+' 2>&1')
450  return oname
451 
if(dump)
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
def makeDeCAF(script, fname, special)
Definition: runNovaSAM.py:436
def runNovaSAM.makeDirIfNeeded (   dir)

Definition at line 61 of file runNovaSAM.py.

Referenced by makeDirSafely().

61 def makeDirIfNeeded(dir):
62  os.umask(002) # (rw-rw-r--) for files and (rwxrwxr-x) for directories.
63  if not os.path.isdir(dir):
64  print "runNovaSAM is making a directory: ", dir
65  try:
66  os.mkdir(dir)
67  except:
68  print "Couldn't make the directory... some other job perhaps did, or permissions did not allow "
69  if not os.path.isdir(dir):
70  raise Exception("Failed to make directory + " + dir )
71 
72 
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
def makeDirIfNeeded(dir)
Definition: runNovaSAM.py:61
def runNovaSAM.makeDirSafely (   dir)

Definition at line 41 of file runNovaSAM.py.

References makeDirIfNeeded().

Referenced by getOutDir().

41 def makeDirSafely(dir):
42  if "/pnfs" != dir[0:5]:
43  makeDirIfNeeded(dir)
44  return
45 
46  print "runNovaSAM is making a directory with IFDH"
47  dh = ifdh.ifdh("http://samweb.fnal.gov:8480/sam/nova/api")
48  try:
49  print "Checking if directory ", dir, "exists"
50  dh.ls(dir, 1, "")
51  dh.chmod(774,dir,"")
52 
53  except (RuntimeError, IOError) as e:
54  try:
55  print "It doesn't - make directory", dir
56  dh.mkdir(dir)
57  except:
58  print "Tried to make directory and couldn't. Perhaps it already exists?"
59 
60 
def makeDirSafely(dir)
Definition: runNovaSAM.py:41
def makeDirIfNeeded(dir)
Definition: runNovaSAM.py:61
def runNovaSAM.makeMetadataJSONs ( )
For every ROOT file, try to extract its metadata into a matching .json
file in the same directory

Definition at line 246 of file runNovaSAM.py.

References h5MetaHack(), if(), MakeTransposeJson(), open(), and PandAna.Demos.demo1.range.

247  """For every ROOT file, try to extract its metadata into a matching .json
248  file in the same directory"""
249  baseDir = "./results"
250  # If using --txtfiledef, want to pass multiple files at a time to sam_meta_dumper.
251  # This is because it simply takes too long to call it for each indiv file
252  # when there are 800+ outputs. 5 s each -> ~1 hour!
253  TransposeList = ""
254  # Declare the samweb client within this function
255  samweb = samweb_client.SAMWebClient(experiment='nova')
256  # Loop through directories to search for files to make json files for.
257  for root, dirs, filenames in os.walk(baseDir):
258  if root == baseDir:
259  # Push the h5 files to the front of the list so that the CAF files remain
260  # available to hack in the metadata.
261  for ifile in range(len(filenames)):
262  if("h5" in filenames[ifile]):
263  filenames = [filenames[ifile]] + filenames[:ifile] + filenames[ifile+1:]
264  for file in filenames:
265  if (file.endswith (".root") or file.endswith(".h5") ) and file != inFileBase:
266  skip_match = _skip_pattern.match(file)
267  if skip_match == None:
268  # Set some quick and useful variables.
269  olddir = os.getcwd()
270  fileWPath = os.path.join(root, file)
271  # If a transpose file want to make the json subtly differently.
272  if args.txtfiledef and "outplane" in file:
273  # This works for the cellmode of the transposer as well, due to the filename including outplane and cell.
274  print "Adding %s to TransposeList" %file
275  TransposeList += "%s " %file
276  continue
277  # Which extractor am I using?
278  extractor = 'sam_metadata_dumper'
279  if file.endswith('caf.root'):
280  extractor = 'extractCAFMetadata'
281  try:
282  # sam_metadata_dumper doesn't apply basename() to filename. https://cdcvs.fnal.gov/redmine/issues/8987
283  os.chdir(os.path.dirname(fileWPath))
284  if file.endswith (".root"):
285  meta = subprocess.check_output([extractor, os.path.basename(fileWPath)])
286  jsonf = open(file.replace('.root', '.json'), 'w')
287  jsonf.write(meta)
288  jsonf.close()
289  print "Made metadata for %s" %file
290  elif file.endswith(".h5"):
291  print "\nNow to make my json file for my h5...\n"
292  md = h5MetaHack(file)
293  jsonf = open(file.replace('.h5caf.h5', '.h5caf.json'), 'w')
294  jsonf.write( json.dumps(md) )
295  jsonf.close()
296  print "Made metadata for %s" %file
297  else:
298  print "I'm not sure what file extension you have..."
299  except:
300  print "Error extracting metadata from file."
301  finally:
302  os.chdir(olddir)
303  # Make the Transpose json files.
304  # Again same argument, outplane is already in the filenames for cell mode
305  if args.txtfiledef and "outplane" in file:
306  olddir = os.getcwd()
307  os.chdir(baseDir)
308  MakeTransposeJson( TransposeList )
309  os.chdir(olddir)
310 
def makeMetadataJSONs()
Definition: runNovaSAM.py:246
if(dump)
def MakeTransposeJson(TransposeList)
Definition: runNovaSAM.py:311
procfile open("FD_BRL_v0.txt")
def h5MetaHack(inFile)
Definition: runNovaSAM.py:139
def runNovaSAM.MakeTransposeJson (   TransposeList)
Transpose files need some extra tweaking when making .json files, largely because there are so many of them.
This takes in a list of files, and makes appropriate .json files in the same directory

Definition at line 311 of file runNovaSAM.py.

References hadd_reco_validation.group, open(), PandAna.Demos.demo1.range, and split().

Referenced by makeMetadataJSONs().

311 def MakeTransposeJson( TransposeList ):
312  """Transpose files need some extra tweaking when making .json files, largely because there are so many of them.
313  This takes in a list of files, and makes appropriate .json files in the same directory"""
314  # If using --txtfiledef, I can now pass my file list to sam_meta_dumper.
315  print "Is MakeTransposeJson called without a txt def, if you see this then yes."
316  MetaListFile="AllMetaJson.txt"
317  meta_cmd="sam_metadata_dumper -s " + TransposeList + " > " + MetaListFile
318  os.system(meta_cmd)
319  # Now want to open the file and split by "}," character.
320  MetaFile = open( MetaListFile )
321  MetaLines = MetaFile.read().split(" },")
322  # Loop through lines, and appropriately separate out json files.
323  for i in range(0,len( MetaLines ) ):
324  meta=MetaLines[i]
325  # Figure out file name...this is assuming that file name is always the first entry...
326  StName=re.search('"(.+?).root"', meta ).group(1)
327  filename=StName+".json" # Effecitvely replacing .root with .json
328  # If transpose file add PlaneNumber and CellNumber if run in cell mode
329  if "cell" in filename:
330  try:
331  plane = re.search('^.*outplane(\d*).', filename).group(1)
332  cell = re.search('^.*cell(\d*).', filename).group(1)
333  print "Plane number:", plane, "Cell number:", cell, ". Is a transpose file"
334  meta = meta.replace('"calibration.base_release"', '"calibration.PlaneNumber": "%s",\n "calibration.CellNumber": "%s",\n "calibration.base_release"')%(plane, cell)
335  except:
336  print "No cell number found - could be a plane mode transpose file"
337 
338  elif "outplane" in filename:
339  try:
340  plane = re.search('^.*outplane(\d*).', filename).group(1)
341  print "Plane number:", plane, ". Is a transpose file"
342  meta = meta.replace('"calibration.base_release"', '"calibration.PlaneNumber": "%s",\n "calibration.base_release"') %plane
343  except:
344  print "Error extracting plane number from transpose file."
345 
346  ### Make sure that the txtfile is in the parent list.
347  meta['parents'].append({u'file_name':unicode(inFile)})
348 
349  # Now open the json file
350  fout=open(filename,'w')
351  # Want to make sure that the json starts with '{'
352  if meta[0] not in "{":
353  meta = meta[:0] + '{\n' + meta[1:]
354  # Want to make sure that the json ends with a double '}'
355  if i < len(MetaLines)-1:
356  meta += "}\n}\n"
357  # Write and close the json file
358  fout.write(meta)
359  fout.close()
360 
361 
void split(double tt, double *fr)
def MakeTransposeJson(TransposeList)
Definition: runNovaSAM.py:311
procfile open("FD_BRL_v0.txt")
def runNovaSAM.resolveFclPath (   fcl)

Definition at line 188 of file runNovaSAM.py.

Referenced by makeDeCAF().

188 def resolveFclPath(fcl):
189  # Check if we have an absolute path name, return it if so
190  if fcl[0] == "/":
191  return fcl
192 
193  # Otherwise, we need to do some searching
194  fclPaths = os.environ["FHICL_FILE_PATH"].split(":")
195  for path in fclPaths:
196  if os.path.isfile(path + fcl):
197  return path + fcl
198 
199  # If we haven't found it, we have a problem.
200  raise IOError(sys.argv[0] + ": config file "+ fcl+" not found in FHICL_FILE_PATH")
201 
202 
void split(double tt, double *fr)
def resolveFclPath(fcl)
Definition: runNovaSAM.py:188
def runNovaSAM.setVMemLimit ( )

Definition at line 33 of file runNovaSAM.py.

34  #memLimit = 3.9*1024**3
35  memLimit = 3.9*1000**3
36  print "Old virtual memory limit:", resource.getrlimit(resource.RLIMIT_AS)
37  print "Limiting the virtual memory of the nova job to 3.9 GB"
38  resource.setrlimit(resource.RLIMIT_AS, (memLimit, memLimit))
39  print "New virtual memory limit:", resource.getrlimit(resource.RLIMIT_AS)
40 
def setVMemLimit()
Definition: runNovaSAM.py:33
def runNovaSAM.unCamelCase (   s)
Convert CamelCase to camel_case 

Definition at line 29 of file runNovaSAM.py.

Referenced by createMetadata().

29 def unCamelCase(s):
30  """ Convert CamelCase to camel_case """
31  # \B matches an empty string which is NOT at the beginning of a word
32  # so requiring this means no _ will be inserted at the start
33  return re.sub( r'\B([A-Z])', r'_\1', s).lower()
34 
35 
def unCamelCase(s)
Definition: runNovaSAM.py:29

Variable Documentation

runNovaSAM._lineregex = re.compile(r'\d+: ([^ \t]+)[ \t]+(.+)')
private

Definition at line 24 of file runNovaSAM.py.

runNovaSAM._skip_pattern = re.compile(r"^.*(hist|RootOutput).*\.root", re.IGNORECASE)
private

Definition at line 27 of file runNovaSAM.py.

runNovaSAM.action
runNovaSAM.allFiles

Definition at line 800 of file runNovaSAM.py.

runNovaSAM.args = parser.parse_args()
runNovaSAM.argv

Definition at line 24 of file runNovaSAM.py.

runNovaSAM.argvCopy

Do a little bit of trickery with sys.argv to stop ROOT from gobbling it up and killing –help.

Definition at line 23 of file runNovaSAM.py.

runNovaSAM.cafLabel = cafTier.split(":")[0]

Definition at line 362 of file runNovaSAM.py.

Definition at line 366 of file runNovaSAM.py.

runNovaSAM.cafTier

Definition at line 342 of file runNovaSAM.py.

string runNovaSAM.cmd = ' '

Definition at line 383 of file runNovaSAM.py.

Referenced by DispatcherCMD.addCommand(), nova::dbi::Util.CheckConnection(), nutools::dbi::Util.CheckConnection(), dbutils::Krb5.checkTicket(), nova::database::Table.CheckValidXMLDef(), nova::dbi::Table.CheckValidXMLDef(), configure(), nova::database::Table.CreateFromDB(), DispatcherCMD.DispatcherCMD(), nova::database::Table.ExistsInDB(), nova::dbi::Table.ExistsInDB(), nutools::dbi::Table.ExistsInDB(), genie::masterclass::GNuMcMainFrame.FileOpen(), dbutils::gui::DCSConfigEditorDisplay.generateRecipeScripts(), nova::database::Table.GetCol(), nova::dbi::Table.GetCol(), nutools::dbi::Table.GetCol(), nutools::dbi::Table.GetColsFromDB(), nova::database::Table.GetConnection(), nutools::dbi::Table.GetConnection(), nova::dbi::Table.GetConnection(), nova::database::Table.GetCurrSeqVal(), nova::dbi::Table.GetCurrSeqVal(), nutools::dbi::Table.GetCurrSeqVal(), rvp::RecVarPID.getMethodNameFromXML(), xnue::XnuePID.getMethodNameFromXML(), nova::database::Table.GetRowByColSet(), dbutils::Krb5.getTicket(), rvp::RecVarPID.getVarNamesFromXML(), xnue::XnuePID.getVarNamesFromXML(), caf::CAFMaker.InitializeOutfile(), joint_fit_2017_fc_submit(), dbutils::RunHistory.Load(), nova::database::Table.LoadFromDB(), nova::dbi::Table.LoadFromDB(), nutools::dbi::Table.LoadFromDB(), OnMonPlotMaker(), PrintSyntax(), daq2raw::NOvASocketInputDriver.readFile(), jmshower::RecoJMShower.RecoShowers(), request_event(), request_xsec(), DispatcherCMD.setCommandDefault(), dbutils::daqappmgr::ApplicationType.setRshCommandForStart(), dbutils::daqappmgr::ApplicationType.setRshCommandForStop(), dbutils::daqappmgr::ApplicationType.setStartCommand(), dbutils::daqappmgr::ApplicationType.setStopCommand(), nova::database::Table.SetValiditySQL(), nova::dbi::Table.SetValiditySQL(), nutools::dbi::Table.SetValiditySQL(), nutools::dbi::Table.Table(), nova::dbi::Table.Table(), nova::database::Table.WriteToDB(), nova::dbi::Table.WriteToDB(), and nutools::dbi::Table.WriteToDB().

list runNovaSAM.cmdList = ['nova']

Definition at line 330 of file runNovaSAM.py.

runNovaSAM.copyfile

Definition at line 806 of file runNovaSAM.py.

string runNovaSAM.dataFlag = "data"

Definition at line 297 of file runNovaSAM.py.

runNovaSAM.decafdir

If using a txtfiledef make sure to clean up the InputFile List....

Definition at line 860 of file runNovaSAM.py.

runNovaSAM.default

Definition at line 520 of file runNovaSAM.py.

runNovaSAM.description

Definition at line 471 of file runNovaSAM.py.

runNovaSAM.dest

Definition at line 878 of file runNovaSAM.py.

runNovaSAM.detector = metadata["online.detector"].lower()

Definition at line 272 of file runNovaSAM.py.

Referenced by daq2raw::DAQHit2Raw.beginRun(), BuildMetricsTree(), DCSPlotMaker(), novaddt::utils::DetectorUtils.DetectorUtils(), daqchannelmap::NearDetDAQChannelMap.encodeDChan(), daqchannelmap::FarDetDAQChannelMap.encodeDChan(), daqchannelmap::TestBeamDAQChannelMap.encodeDChan(), daqchannelmap::DAQChannelMapOLD.encodeDChan(), daqchannelmap::NearDetDAQChannelMap.encodeLChan(), daqchannelmap::FarDetDAQChannelMap.encodeLChan(), daqchannelmap::TestBeamDAQChannelMap.encodeLChan(), meta::Metadata.FillMetadata(), daqchannelmap::DAQChannelMapOLD.getBlockOffline(), daqchannelmap::DAQChannelMapBaseOLD.getBlockOrDiblock(), daqchannelmap::DAQChannelMapOLD.getBlockType(), GetCosmics(), daqchannelmap::DAQChannelMapOLD.getDCMLinkOffline(), daqchannelmap::DAQChannelMapOLD.getDCMOffline(), daqchannelmap::DAQChannelMapOLD.getDiBlockOffline(), daqchannelmap::DAQChannelMapBaseOLD.getDiBlockType(), daqchannelmap::DAQChannelMapOLD.getDiBlockType(), daqchannelmap::DAQChannelMapOLD.getDiBlockTypeOffline(), daqchannelmap::DAQChannelMapOLD.getFirstDCMInViewOffline(), daqchannelmap::DAQChannelMapOLD.getLastDCMInViewOffline(), daqchannelmap::DAQChannelMapOLD.getLocalPlaneInBlockOffline(), daqchannelmap::DAQChannelMapBaseOLD.getLocalPlaneInBlockOrDiblock(), daqchannelmap::DAQChannelMapOLD.getLocalPlaneInDiblockOffline(), daqchannelmap::DAQChannelMapOLD.getLocalPlaneInDiblockViewOffline(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfChannelsInXPlane(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfChannelsInYPlane(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfPlanesBeforeBlock(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfPlanesBeforeDiblock(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfPlanesInBlock(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfPlanesInDiblock(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfXDCM(), daqchannelmap::DAQChannelMapBaseOLD.getNumberOfYDCM(), daqchannelmap::DAQChannelMapOLD.getOnlineCellOffline(), daqchannelmap::DAQChannelMapOLD.getPixelOffline(), daqchannelmap::DAQChannelMapOLD.getPlaneViewOffline(), GetSystsFromFile(), daqchannelmap::DAQChannelMapBaseOLD.getTotalNumberOfDiblocks(), GoodRuns(), daqchannelmap::DAQChannelMapBaseOLD.initNumberOfDCMsInDiblockDetector(), nova::dbi::RunHistory.LoadDAQRunHistory(), main(), make_fc_nus_surfs_nersc_2019(), MakeCovarSim(), MakeSurface(), NewNearlinePlots(), NuMu2019_BasicPIDPlots_FD(), NuMu2019_BasicPIDPlots_ND(), NuMu2020_BasicPIDPlots_FD(), NuMu2020_BasicPIDPlots_ND(), rawdata::RawBeamlineTrigger.RawBeamlineTrigger(), rawdata::RawBeamlineWC.RawBeamlineWC(), fnex::ReadCAFMakeEventList.ReadCAFTree(), om::HistoTable.ReadFile(), rawdata::RawBeamlineTrigger.SetDetectorID(), rawdata::RawBeamlineWC.SetDetectorID(), ana.TAHadEND(), and rawdata::RawBeamlineWC.~RawBeamlineWC().

runNovaSAM.detectors = dict()
runNovaSAM.detId = metadata["nova.detectorid"].lower()
runNovaSAM.dh = ifdh.ifdh("http://samweb.fnal.gov:8480/sam/nova/api")
runNovaSAM.dirList = os.listdir(".")

Definition at line 406 of file runNovaSAM.py.

runNovaSAM.doMeta

Definition at line 599 of file runNovaSAM.py.

runNovaSAM.experiment

Definition at line 544 of file runNovaSAM.py.

runNovaSAM.failFiles

Definition at line 801 of file runNovaSAM.py.

runNovaSAM.False

Definition at line 520 of file runNovaSAM.py.

runNovaSAM.fclFile = args.config

Definition at line 315 of file runNovaSAM.py.

runNovaSAM.fclFileObj = open(tmpFclName, 'a')

Definition at line 327 of file runNovaSAM.py.

runNovaSAM.fclPath = resolveFclPath(fclFile)

Definition at line 319 of file runNovaSAM.py.

runNovaSAM.file_type = metadata["file_type"]

Definition at line 291 of file runNovaSAM.py.

runNovaSAM.fileMetaDataMgr

Definition at line 561 of file runNovaSAM.py.

runNovaSAM.FirstRun

Definition at line 680 of file runNovaSAM.py.

runNovaSAM.flatLabel

Definition at line 733 of file runNovaSAM.py.

runNovaSAM.flatName

Definition at line 738 of file runNovaSAM.py.

runNovaSAM.flatTier

Definition at line 631 of file runNovaSAM.py.

runNovaSAM.gdbArgs

Definition at line 821 of file runNovaSAM.py.

runNovaSAM.gErrorIgnoreLevel
runNovaSAM.h5Label

Definition at line 748 of file runNovaSAM.py.

runNovaSAM.h5Name

Definition at line 753 of file runNovaSAM.py.

runNovaSAM.h5Tier

Definition at line 633 of file runNovaSAM.py.

runNovaSAM.help

Definition at line 205 of file runNovaSAM.py.

Referenced by GetCommandLineArgs().

runNovaSAM.histName

Definition at line 772 of file runNovaSAM.py.

runNovaSAM.ifdhcmd

Definition at line 808 of file runNovaSAM.py.

runNovaSAM.Index

Definition at line 682 of file runNovaSAM.py.

runNovaSAM.inFile = args.inFile

Definition at line 217 of file runNovaSAM.py.

runNovaSAM.inFileBase = os.path.basename(inFile)

Definition at line 221 of file runNovaSAM.py.

runNovaSAM.isRunningMetadataModule

Definition at line 582 of file runNovaSAM.py.

runNovaSAM.LastRun

Definition at line 681 of file runNovaSAM.py.

runNovaSAM.logfile

Definition at line 832 of file runNovaSAM.py.

Referenced by main(), and nl::timing::LogFile.ProcessLog().

dictionary runNovaSAM.metadata = samweb.getMetadata(inFileBase)
runNovaSAM.nevt = None

Definition at line 311 of file runNovaSAM.py.

runNovaSAM.NewOMod

Definition at line 658 of file runNovaSAM.py.

runNovaSAM.NewOName

Definition at line 695 of file runNovaSAM.py.

runNovaSAM.olddir

Are we streaming the files via xrootd? txtcmd="cat %s | xargs -n1 samweb2xrootd > xrootd_inFile.txt"inFile os.system(txtcmd) with open("xrootd_inFile.txt") as f: for line in f: print line.strip() cmdList.append( line.strip() ) print "" Are we going to copy the files?

Definition at line 798 of file runNovaSAM.py.

Referenced by numusand::NumuSandFxs.getScatt(), and cosrej::CosRejFxs.getScatt().

runNovaSAM.outC

Definition at line 653 of file runNovaSAM.py.

list runNovaSAM.outList = []

Definition at line 344 of file runNovaSAM.py.

Referenced by fnex::EventListManipulator.CreatePoissonFakeData().

runNovaSAM.outNameTemp

Definition at line 678 of file runNovaSAM.py.

runNovaSAM.outP

Definition at line 653 of file runNovaSAM.py.

runNovaSAM.output = outTier.split(":")[0]
runNovaSAM.outputs

Definition at line 639 of file runNovaSAM.py.

runNovaSAM.outTier

Definition at line 340 of file runNovaSAM.py.

runNovaSAM.outX

Definition at line 664 of file runNovaSAM.py.

runNovaSAM.outXc

Definition at line 654 of file runNovaSAM.py.

runNovaSAM.outXp

Definition at line 654 of file runNovaSAM.py.

runNovaSAM.outY

Definition at line 665 of file runNovaSAM.py.

runNovaSAM.outYc

Definition at line 655 of file runNovaSAM.py.

runNovaSAM.outYp

Definition at line 655 of file runNovaSAM.py.

runNovaSAM.parser = argparse.ArgumentParser(description='Run the nova command using SAM metadata')
runNovaSAM.PassFile

Definition at line 565 of file runNovaSAM.py.

runNovaSAM.precopyscript

Definition at line 636 of file runNovaSAM.py.

runNovaSAM.release = os.environ["SRT_BASE_RELEASE"]

Definition at line 285 of file runNovaSAM.py.

Referenced by AnalyzeNus18Systs(), bin_composition_pie_chart(), CalcRWithSystsNus17(), calculateComponentsNumu(), calculateWrongSignNue(), calculateWrongSignNumuQ1(), calculateWrongSignNumuQ2(), calculateWrongSignNumuQ3(), calculateWrongSignNumuQ4(), compare_pid_cut_sens(), ConsolidateSystMaker(), contours(), ana::CovMxManager.CovMxManager(), CVNCuts(), demo_trivial_xsec_analysis(), draw_michel_plots(), DrawExtrapSurface(), drawPlot(), drawSensitivity(), drawSystsShiftingNDdata(), drawSystsShiftingNDdata_updatedAna(), fa_numuContours(), fake_future_data(), FCContour(), ana.FCCorrectSlice(), FCCorrectSlice(), fd_plot(), fd_plot_bless(), fill_col(), FillHists(), futureSig_reach_singlePOTcombo_syst(), genie_contours(), GetBiases(), getContProf(), getContProf_Sensitivity(), getHists_FNEX(), GetMatrices(), GetMockData(), GetNueCosmics2017(), GetNueCosmics2018(), GetNueCosmics2019(), GetNueData2017(), GetNueData2018(), GetNueData2019(), GetNuePrediction2017(), GetNuePrediction2018(), GetNuePrediction2019(), GetNumuData2017(), getSensitivity(), GetSurf(), GetSystsFromFile(), getTimePeakPlots(), ana::InteractionSpectra.InteractionSpectra(), joint_fit_make_experiments(), joint_fit_make_fc_slice(), joint_fit_make_fc_surf(), LoadCovMx(), LoadData(), LoadExtrapPrediction(), ana::CountingExperiment.LoadFrom(), ana::TrivialBkgdEstimator.LoadFrom(), ana::PredictionSterile.LoadFrom(), ana::PredictionNueRebinSA.LoadFrom(), ana::TrivialSignalEstimator.LoadFrom(), ana::FDPredictionSterile.LoadFrom(), ana::PredictionTemplateShift.LoadFrom(), ana::NDPredictionSterile.LoadFrom(), ana::SingleNucAnalysis.LoadFrom(), ana::MultiExperiment.LoadFrom(), ana::FitInAnaBinsBkgdEstimator.LoadFrom(), ana::NumuCC2p2hAnalysis.LoadFrom(), ana::NumuCC2p2hBkgdEstimator.LoadFrom(), ana::PredictionNumuFAHadE.LoadFrom(), ana::nueccinc::NueCCIncMRECorrection.LoadFrom(), ana::PredictionCombinePeriods.LoadFrom(), ana::PredictionAddRock.LoadFrom(), ana::CrossSectionSpectra.LoadFrom(), ana::PredictionExtendToPeripheral.LoadFrom(), ana::SingleSampleExperiment.LoadFrom(), ana::PredictionScaleComp.LoadFrom(), ana::Multiverse.LoadFrom(), ana::TrivialCrossSectionAnalysis.LoadFrom(), ana::CrossSectionAnalysis.LoadFrom(), ana::NumuCCIncAnalysis.LoadFrom(), ana::nueccinc::NueCCIncCrossSectionAnalysis.LoadFrom(), ana::ModularExtrapSterile.LoadFrom(), ana::MichelDecomp.LoadFrom(), ana::TruthReweight.LoadFrom(), ana::DataMCPair.LoadFrom(), ana::RecoReweight.LoadFrom(), ana::NusSystMaker.LoadFrom(), ana::nueccinc::NueCCIncEnhancedSamples.LoadFrom(), ana::FluxReweight.LoadFrom(), ana::NusSystematicsMaker.LoadFrom(), ana::PredictionInterp.LoadFromBody(), LoadMaps(), ana.LoadMaps(), LoadPPFX(), LoadPrediction(), Make2DPlot(), make_extrap_figure(), make_extrap_figure_hists(), make_fc_nus_surfs_nersc_2019(), make_fc_slice(), make_fc_surf(), make_files_for_decomp_plots(), make_muonid_opt(), make_nominal_xs(), Make_NuMuCC_Inc_XS(), make_nus17_fc_surfs(), make_nus_fc_surfs(), make_pdf(), make_starplots(), make_surfprof(), make_vertex_optimiz(), make_xs(), make_xs_1D(), makeEnergyEstimator(), makeFlatWeight(), MakeISysts(), makeMatrixElementSurface(), MakePeriCutPlot(), MakePlot(), MakeSurface(), MakeTable(), mec_tuning_fitter_2020(), merge_periods(), merge_predictions(), monoprob_plot(), mre_blessed(), mre_comp_split(), nd_plot_bless(), nue_bg_stat_err_calc(), nuebar_signif(), OverlaySliceFCUpValues(), ana.OverlaySliceFCUpValues(), PeripheralCuts(), plot_3NDvsFD(), plot_3NDvsFD_FHC(), plot_3NDvsFD_RHC(), plot_BEN(), plot_contprof(), plot_datamc_ND_numu(), plot_datamc_ND_numu_REW(), plot_datamcpred(), plot_datapredictions(), plot_fd_datamc(), plot_nd_data_mc(), plot_ND_numu_NOMvsREW(), plot_NDvsFD_REW(), plot_NDvsFD_weights(), plot_NDvsFD_weights_FHC(), plot_NDvsFD_weights_RHC(), plot_nominal_spectra(), plot_nuCrystalBall(), plot_nue_filesyst_pred(), plot_nue_xsec_pred(), plot_nuTree(), plot_pi0_xcheck(), plot_pid(), plot_predictions(), plot_rationoosc(), plot_resolution(), plot_shifts(), plot_syst_contours(), plot_time(), plot_uncertainty(), plotContProf(), plotDataPred(), plotDataPred_SplitCanvas(), PlotNus17PredSystsData(), PlotNus18Sideband(), PlotNusSensAna01(), PlotPionPlots(), plots(), Plotting_CompareMultipleContours(), Plotting_DataAndPrediction(), PredictCosmic(), ana::PredictionSystJoint2018.PredictionSystJoint2018(), ana::PredictionSystJointDemo.PredictionSystJointDemo(), ana::PredictionSystNue2017.PredictionSystNue2017(), ana::PredictionSystNueSecondAna.PredictionSystNueSecondAna(), ana::PredictionSystNumu2017.PredictionSystNumu2017(), print_tables(), ratio(), ratio2D(), saTestContours(), saveContours_addExpt(), saveContours_complete(), saveContours_oscpar(), saveContours_simple(), saveContours_systs(), selection_story_plots(), sensitivity(), sensitivity_slices(), slices(), slices_paper(), starPlot(), syst_plot_test(), syst_table_fit(), systematics_table(), test_nue2017Prediction(), test_nue2018_fitter(), test_prediction_interp(), test_xsecanalysis(), TestPred(), Toy_analyses(), UnfoldInOut(), and xsec_extrap_plots().

runNovaSAM.ret

Definition at line 810 of file runNovaSAM.py.

Referenced by ana::PredictionExtrap._PredictComponent(), ana::PredictionInterp._PredictComponentSyst(), ana::Seed.ActiveFitVars(), ana::SeedList.ActiveFitVars(), ana::SystShifts.ActiveSysts(), ana.AddErrorInQuadrature(), AddHistograms(), ana.AddToSummaryV(), rawfileparser::RawFileParser.AdvanceToConfigEnd(), rawfileparser::RawFileParser.AdvanceToConfigStart_file(), rawfileparser::RawFileParser.AdvanceToConfigStart_mem(), rawfileparser::RawFileParser.AdvanceToFirstEvent_file(), rawfileparser::RawFileParser.AdvanceToFirstEvent_mem(), rawfileparser::RawFileParser.AdvanceToNextEvent_file(), rawfileparser::RawFileParser.AdvanceToNextEvent_mem(), rawfileparser::RawFileParser.AdvanceToPreviousEvent_mem(), rawfileparser::RawFileParser.AdvanceToRunHeader_file(), rawfileparser::RawFileParser.AdvanceToRunHeader_mem(), rawfileparser::RawFileParser.AdvanceToRunTail_file(), rawfileparser::RawFileParser.AdvanceToRunTail_mem(), dt::Chain.AllChunks(), dt::Chain.AllHits(), ana.AnaTypeToString(), dt::Chain.AsChunkMap(), ana::TrivialBkgdEstimator.Background(), calib::BetheBlochTables.BetheBlochTables(), rawfileparser::RawFileParser.BuildEventIndex_file(), rawfileparser::RawFileParser.BuildEventIndex_mem(), ana::StanFitter.BuildInitContext(), caldp::AttenProfilesMap.Channels(), ana::SolarConstraints.ChiSq(), ana::MultiExperiment.ChiSq(), rawfileparser::RawFileParser.close(), CombineAllCuts(), CombineHistograms(), ana.ComparisonTable(), ana::PredictionAddRock.ComponentCC(), convert(), convert_mcnp_txt_to_root(), ConvertNormalBasis(), osc::OscCalculatorGeneral.Copy(), osc::_OscCalculatorPMNSOpt< T >.Copy(), ana::HistCache.Copy(), gibuu::GiBUURegen.CopyGenieEvent(), dt::ViewMerger.CountUnexplainedOnLine(), ana.DataMCComparison(), ana.DataMCComparisonAreaNormalized(), ana.DataMCComparisonComponents(), novarwgt.DecodeGeneratorVersion(), caf.DecodeGeneratorVersion(), ana.DefaultOscCalc(), ana.DefaultOscCalcIH(), ana.DefaultSterileCalc(), ana::T2KToyExperiment.Derivative(), lem::Potential.Downsampled(), lem::MatchableEvent.Downsampled(), ana::CovMxSurface.DrawContours(), ana::Prod4LoadersBase.ECAFTypeFlatToTier(), novarwgt.EncodeGeneratorVersion(), EnergyBin(), ErrorBand(), tf::HoughScore.Eval(), NovaMCEmptyEvent.eventTimestamp(), rb::Cluster.Exclude(), gibuu::GiBUURegen.ExpandLibraryPath(), ana::IFitter.ExpandSeeds(), ana.factorial(), ana::Spectrum.FakeData(), dt::ViewMerger.FakeThirdDimension(), fill_col(), FillPCAContainers(), caf.FillProngVars(), calib::ThroughgoingSelection.filter(), calib::RockMuonStopperSelection.filter(), calib::StopperSelection.filter(), novaddt::MoonShadow.filter(), EliminateBeamSpills.filter(), hough::LiteTH2.FindBinX(), hv::LiteTH2.FindBinX(), hough::LiteTH2.FindBinY(), hv::LiteTH2.FindBinY(), ana.FindCurveCrossings(), geo::GeometryBase.FindGDMLFile(), caf::CAFMaker.FindManyPStrict(), lem.FindMatches(), ana.FindPackageDir(), trk::KalmanTrackAna.FindVisibleProngs(), cheat::RecoCheckAna.FindVisibleProngs(), fuzz::FuzzyKValidate.FindVisibleProngs3D(), fuzz::FuzzyKVertex.FindVisibleProngs3D(), calib::AttenFit.FitQuality(), calib::AttenuationFit.FitQuality(), ana::PredictionInterp.FitRatios(), lem::MatchableEvent.Flipped(), ana::Progress.FormatTime(), nuesand::FillNueSandbox.FracModalHits(), lem::dec::Forest.FromFile(), ana::SpectrumLoader.FromSAMProject(), lem::PIDExtraVars.FromString(), lem::PIDDetails.FromString(), ana::FCBin.FromTree(), lem::EventSummary.FromTree(), caf.GenieReweightTable(), ana2019::fakedata.Get2019Prediction(), ana.getAllAna2017Systs(), ana.getAllAna2018Systs(), ana.getAllCPTSysts(), caldp::AttenHistsMap.GetAllHistsByPlane(), ana.getAllNueSecondAnaFDHistDef(), ana.getAllNueSecondAnaNDHistDef(), ana.getAllNumuProd4FDHistDef(), ana.getAllNumuProd4NDHistDef(), ana.getAllNumuProd5FDHistDef(), ana.getAllNumuProd5FDMultiHistDef(), ana.getAllNumuProd5FDNuTruthHistDef(), ana.getAllNumuProd5NDHistDef(), ana.getAllNumuProd5NDMultiHistDef(), ana.getAllNumuProd5NDNuTruthHistDef(), ana.getAllNusAna01FDHistDefs(), ana.getAllNusAna01NDHistDefs(), caldp::AttenProfilesMap.GetAllProfilesByPlaneAndCell(), ana.getAllXsecNuTruthSysts_2017(), ana.getAna2017LargeXsecSysts(), ana.getAna2018LargeXsecSysts(), ana.getAna2018NueOnly(), ana.getAna2018NumuOnly(), cosrej::CosRejFxs.getAngle(), numusand::NumuSandFxs.getAngle(), GetBG(), ana.GetBG(), GetBiasErrorLine(), ana.GetCAFMetadata(), rawfileparser::RawFileParser.getConfigBlock(), GetConstraints(), ana::CovMxSurface.GetContours(), GetCorrelations(), GetCosmics(), ana::CovarianceMatrix.GetCovMxAbsoluteWithStats(), ana::CovarianceMatrix.GetCovMxRelative(), ana::CovarianceMatrix.GetCovMxRelativeWithStats(), evd::GeometryDrawer.GetDCMBoxes(), calib::IBetheBloch.GetdEdxGraph(), calib::EnergyLossVsDistance.GetEnergyLossGraph(), rawfileparser::RawFileParser.getEvent(), gibuu::GiBUURegen.GetEvent(), GetExtrapolationDefs(), ana.GetFDMCComponents(), rawfileparser::RawFileParser.getFirstEvent(), GetFNRatio(), GetGaussianProfile(), GetGaussianSurface(), geo::CellGeo.GetGeoMatrix(), ana::ISurface.GetGraphs(), GetHist(), ana::SystConcat.GetIndividualSystNames(), GetJointFitSystematicList(), GetMatrices(), calib::IBetheBloch.GetMPVGraph(), GetNC(), ana.GetNC(), ana.GetNDComponents(), ana.GetNDCompsFromDecomp(), ana.GetNDMCComponents(), rawfileparser::RawFileParser.getNextEvent(), ana.getNue2018PredFile(), ana.getNue2018PredVar(), GetNueNDComponents(), GetNueNDComponentsMC(), GetNuePredPath(), ana.getNumu2018PredFile(), ana.getNumu2018PredVar(), GetNus18Binning(), GetNus18Constraints(), GetNus18FitVars(), GetNus18SeedValues(), getPadHists(), osc::OscCalculatorSterileBeam.GetParamsHash(), osc::_NoOscillations< T >.GetParamsHash(), osc::OscCalculatorSterile.GetParamsHash(), osc::OscCalculatorCPT.GetParamsHash(), osc::_IOscCalculatorAdjustable< T >.GetParamsHashDefault(), osc::OscCalculatorPMNS_CPT.GetParamsHashDefaultBar(), GetPlotOptions(), GetPOTCombination(), GetPOTComboTitle(), rawfileparser::RawFileParser.getPreviousEvent(), ana::T2KToyExperiment.GetReweightedSignal(), rawfileparser::RawFileParser.getRunHeader(), rawfileparser::RawFileParser.getRunTail(), GetShift(), ana::SystConcat.GetShifts(), SystGroupHelper.GetShifts(), GetShifts2017(), ana.GetShifts2018(), GetSystConcats(), GetSystematics2017(), ana.GetSystematics2018(), ana::SystConcat.GetSysts(), calib::EnergyLossVsDistance.GetTF1(), GetTGraph(), GetTH1(), GetTH2(), GetTotFNRatio(), nuesand::FillNueSandbox.GetTrackAngle(), ana::FitDeltaInPiUnits.GetValue(), ana::FitDelta13InPiUnitsSterile.GetValue(), ana::FitDelta14InPiUnitsSterile.GetValue(), ana::FitDelta24InPiUnitsSterile.GetValue(), lem::LEMWorker.GetWork(), rawfileparser::RawFileParser.GotoEvent_file(), ana::MinuitFitter.Gradient(), HistNumuOpt(), dt::Chunk.HitsOnLine(), cheat::BackTracker.HitsToParticle(), cheat::BackTracker.HitToFLSHit(), tf::TimingFitAlg.HoughFitPts(), ana::Binning.IDMap(), InitCutDefs(), InitHistDefs(), InitSpectra(), geo::LiveGeometry.InMuonCatcher(), util.ipow(), join(), ana.JoinGraphs(), ana::SystShifts.LatexName(), load(), load_libs_nueccinc(), load_libs_numubarccinc(), load_libs_numucc2p2h(), load_libs_numuccinc(), LoadCosmic(), ana.LoadFileList(), ana::PredictionXSecTuning.LoadFrom(), ana::CountingExperiment.LoadFrom(), ana::PredictionNoOsc.LoadFrom(), ana::PredictionSterile.LoadFrom(), ana::SolarConstraints.LoadFrom(), ana::PredictionNueRebinSA.LoadFrom(), ana::Binning.LoadFrom(), ana::CheatDecomp.LoadFrom(), ana::PredictionNumuFAHadE.LoadFrom(), ana::NCDecomp.LoadFrom(), ana::CovMxSurface.LoadFrom(), ana::NDExtrapBeamComponent.LoadFrom(), ana::NueDecomp.LoadFrom(), ana::NDOscillatableSpectrum.LoadFrom(), ana::NDExtrapComponent.LoadFrom(), ana::NumuDecomp.LoadFrom(), ana::PredictionSystJoint2018.LoadFrom(), ana::PredictionSystJointDemo.LoadFrom(), ana::CovMxManager.LoadFrom(), ana::SingleSampleExperiment.LoadFrom(), ana::FDExtrap.LoadFrom(), ana::NDExtrap.LoadFrom(), ana::ProportionalDecomp.LoadFrom(), ana::TrivialExtrap.LoadFrom(), ana::FakeDecomp.LoadFrom(), ana::TrivialCrossSectionAnalysis.LoadFrom(), ana::SystShifts.LoadFrom(), ana::TwoSampleDecomp.LoadFrom(), ana::SpectrumComponents.LoadFrom(), ana::PredictionInterp.LoadFrom(), ana::CovarianceMatrix.LoadFrom(), ana::OscillatableSpectrum.LoadFrom(), ana::FluxDecomp.LoadFrom(), ana::PredictionSystNueSecondAna.LoadFrom(), ana::ModularExtrapSterile.LoadFrom(), ana::MichelDecomp.LoadFrom(), ana::ReweightableSpectrum.LoadFrom(), ana::PredictionSystNue2017.LoadFrom(), ana::PredictionSystNumu2017.LoadFrom(), ana::BENDecomp.LoadFrom(), ana::TruthReweight.LoadFrom(), ana::ModularExtrap.LoadFrom(), ana::DataMCPair.LoadFrom(), ana::RecoReweight.LoadFrom(), ana::FluxReweight.LoadFrom(), ana::Spectrum.LoadFrom(), ana::NusISyst.LoadFrom(), ana.LoadFrom< osc::IOscCalculatorAdjustable >(), ana::FCCollection.LoadFromFile(), ana::FCSurface.LoadFromFile(), genie::GSimFiles.LoadFromFile(), genie::XSecSplineList.LoadFromXml(), LoadPrediction(), ana::SAMQuerySource.LocateSAMFiles(), ana.LogLikelihoodDerivative(), ana::GaussianPriorSystShifts.LogPrior(), calib::AttenFit.lowessFit(), calib::AttenuationFit.lowessFit(), ana::GradientDescent.Magnitude(), MakeAverageTrueEnergySurface(), dt::View.MakeChunkCombos(), ana.MakeCosOutOfTimeList(), MakeCutFlowSpectra(), MakeCutSequence(), ana::NumuAnalysis.MakeExperiment(), MakeKin2DSpectra(), MakeKinSpectra(), MakeName(), MakeNMinusOneCuts(), ana.MakeNumiUnblindList(), MakeRatio(), MakeSample(), MakeSpectra(), MakeTitle(), ana.MakeUnblindList(), MakeUnblindList(), hough::MultiHough2P.MapToTH2F(), dt::ViewMerger.MatchVerticals(), osc.MatrixExp(), caldp::TCTrack.MaxCell(), rb::Cluster.MaxCell(), nuesand::FillNueSandbox.MaxHits(), caldp::TCTrack.MaxPath(), caldp::TCTrack.MaxPlane(), rb::Cluster.MaxPlane(), caldp::TCTrack.MaxTNS(), rb::Cluster.MaxTNS(), lem::Match.MaybeFlip(), dt::Cand.MaybeFlip(), cheat::BackTracker.MCTruthToParticles(), calib::AttenFit.MeanProfile(), calib::AttenuationFit.MeanProfile(), ana::ResolutionScan.MeanScan(), rb::Cluster.MeanTNS(), calib::AttenFit.MedianProfile(), calib::AttenuationFit.MedianProfile(), caldp::TCTrack.MinCell(), rb::Cluster.MinCell(), caldp::TCTrack.MinPath(), caldp::TCTrack.MinPlane(), rb::Cluster.MinPlane(), caldp::TCTrack.MinTNS(), rb::Cluster.MinTNS(), lem.MMapFileAtAddress(), ana::Spectrum.MockData(), MyDefaultOscCalc(), ana::HistCache.New(), NewEmptyHist(), ana::HistCache.NewF(), ana::HistCache.NewTH2D(), ana::HistCache.NewTH2F(), ana::HistCache.NewTH3D(), dt::Cand.NHitPlanes(), dt::Chain.NHitPlanes(), rb::Cluster.OfflineChans(), ana::Ratio.operator*(), ana::Multiverse.operator*(), ana::Spectrum.operator*(), ana::SpectrumStan.operator+(), ana::ReweightableSpectrum.operator+(), ana::OscillatableSpectrum.operator+(), ana::Spectrum.operator+(), ana::SpectrumStan.operator-(), ana::OscillatableSpectrum.operator-(), ana::Spectrum.operator-(), ana::Ratio.operator/(), ana::Multiverse.operator/(), ana::Spectrum.operator/(), ana::OscillatableSpectrum.Oscillated(), OscillateWithErrors(), lem::FindMatchesAlg.PackageMatches(), PaintReachCanvas(), parse_as_vector(), ana::SystShifts.Penalty(), PIDFileTag(), PIDLongName(), plot_ratios(), ana::NumuCCIncAnalysis.PlotHelper(), dt::DiscreteTracker.PossibleNextSegs(), ana::FDPredictionSterile.Predict(), ana::NDPredictionSterile.Predict(), ana::PredictionScaleComp.Predict(), ana::PredictionTemplateShift.PredictComponent(), ana::PredictionSterile.PredictComponent(), ana::PredictionNueRebinSA.PredictComponent(), ana::FDPredictionSterile.PredictComponent(), ana::NDPredictionSterile.PredictComponent(), ana::PredictionNoOsc.PredictComponent(), ana::PredictionExtendToPeripheral.PredictComponent(), ana::PredictionAddRock.PredictComponentSyst(), PredictCosmic(), ana::PredictionInterp.PredictionInterp(), Print(), ana::GaussianPriorSystShifts.Prior(), ana.Profile(), ProfileAxes(), calib::BetheBlochFit.ProfileMPV(), lem::dec::Cut.Prune(), caf.PtrVecToVec(), cheat::BackTracker.PtrVecToVecRawPtr(), ana::MCMCSamples.QuantileLL(), lem::dec::Forest.RandomOrthoMatrix(), RebinToShortAxis(), dt::DiscreteTracker.RecoDiscrete(), ana.RefineSeeds(), ana.replaceAll(), ana::ResolutionScan.RMSScan(), ana::PredictionAddRock.RockComponent(), ana::SummedSyst.Shift(), ana::SystShifts.ShortName(), ana::Registry< T >.ShortNameToPtr(), murem::MuonRemove.SliceSelection(), SplitHistograms(), ana.SqrtProfile(), ana.SqrtSlice(), Suffix(), ana.systsQ3Q0(), slid::DedxDistribution.TH1DToTH1F(), TH1ToTH2(), calib::ThresholdCorrMap.ThresholdCorrAt(), ana::SpectrumStan.ToBins(), dt::Chain.ToDebugTracks(), ana::BayesianMarginal.ToHistogram(), lem::PIDExtraVars.ToString(), ValidCalibPDF.ToString(), rb::Cluster.TotalADC(), caldp::LiteProfile.TotalEntries(), rb::Cluster.TotalGeV(), caldp::LiteProfile.TotalHits(), rb::Prong.TotalLength(), rb::Cluster.TotalPE(), ana::SpectrumLoaderBase::IDMap< T, U >.TotalSize(), rb::Cluster.TotalWeight(), ana::OscCurve.ToTH1(), ana::Ratio.ToTH1(), ana::Bayesian1DMarginal.ToTH1(), ana::Spectrum.ToTH1(), ana::Ratio.ToTH2(), ana::ISurface.ToTH2(), ana::ReweightableSpectrum.ToTH2(), ana::Spectrum.ToTH2(), hough::LiteTH2.ToTH2F(), hv::LiteTH2.ToTH2F(), ana.ToTH2Helper(), ana::ReweightableSpectrum.ToTH3(), ana::Spectrum.ToTH3(), ana.ToTH3Helper(), ana.ToTHStack(), dt::Cand.ToTrack(), lem::dec::Forest.Train(), lem::dec.TransformEvent(), calib::AttenCache.TranslateChannelMC(), ncid::MakeNCCosRej.TransMomFraction(), ncid::NCNNKeras.TransMomFraction(), cosrej::MakeNueCosRej.TransMomFraction(), calib::AttenFit.TruncatedMeanProfile(), calib::AttenuationFit.TruncatedMeanProfile(), ana::UnfoldSVD.Truth(), ana::UnfoldTikhonov.Truth(), cheat::BackTracker.VecPtrToVecRawPtr(), cheat::BackTracker.VecToVecRawPtr(), ana::Nus17SystFromHist.WeightFor(), ana::NusSystFromHist.WeightFor(), ana::NDSystFromHist.WeightFor(), ana::NueSystFromHist.WeightFor(), ana::Nus18SystFromHist.WeightFor(), ana::NusISyst.WeightFor(), ana::WildcardSource.WildcardOrLs(), ana::SpectrumLoaderBase.WildcardOrSAMQuery(), ana::PredictionSystNueSecondAna.Wrapped(), dt::ViewMerger.ZipVerticalTracks(), rb::Track.ZipWith(), ana::ProfilerSupport.~ProfilerSupport(), and calib::ThresholdCorrMap.~ThresholdCorrMap().

runNovaSAM.retCode = subprocess.call(cmdList)
runNovaSAM.run_match = run_pattern.match(inFileBase)

Definition at line 238 of file runNovaSAM.py.

runNovaSAM.run_pattern = re.compile(r"^.*?_r([0-9]+)_s([0-9]+).+")

Definition at line 237 of file runNovaSAM.py.

runNovaSAM.runNum = int(metadata["runs"][0][0])

Definition at line 234 of file runNovaSAM.py.

Referenced by calib::Calibrator.postBeginRun().

runNovaSAM.samweb = samweb_client.SAMWebClient(experiment='nova')

Definition at line 219 of file runNovaSAM.py.

runNovaSAM.shell

Definition at line 592 of file runNovaSAM.py.

runNovaSAM.skip_match = _skip_pattern.match(file)

Definition at line 408 of file runNovaSAM.py.

runNovaSAM.stderr

Definition at line 832 of file runNovaSAM.py.

runNovaSAM.stdout

Definition at line 832 of file runNovaSAM.py.

runNovaSAM.str

Definition at line 207 of file runNovaSAM.py.

Referenced by site_stats_from_log.SiteStats.__repr__(), file_size_ana.Node.__repr__(), log_trawl.Process.__repr__(), file_size_ana.Node.__str__(), log_trawl.Process.__str__(), nova_art_metadata._createMetadata(), samweb_client.http_client_requests.RequestsHTTPClient._doURL(), samweb_client.http_client_urllib2.URLLib2HTTPClient._doURL(), samweb_client.http_client.SAMWebHTTPClient._logger(), samweb_client._exceptions._Exceptions._makeHTTPError(), fabricate._results_handler(), make_static_page.AddFile(), samweb_client.admin.addValue(), canMan.ProgressTracker.advance(), POTGetData.append_json(), fabricate.args_to_list(), g4zmq.beamOn(), samweb_client.utility.calculateChecksum(), MetadataUtils.cleanup_metadata(), demo.App.cmd_beamOn(), Lesson1.App.cmd_beamOn(), moon_position_table_new3.computeDayBoundaryMoon(), createMetadata(), MetadataUtils.createMetadata(), ProductionTestTools.crontabToGantt(), POTGetData.database_connect(), fhicl::detail.decode(), log_trawl.Project.decomposeModes(), demoFitSlices(), parse_xml.deps_emitted(), gen_hdf5record.deps_emitted(), POTUptimeData.do_detector_mass(), bp.DownloadFiles(), plot_validation_datamc.Spectrum.Draw(), generic.tools.ImageMaker.ImageMaker.draw(), plot_validation_datamc_2018.Spectrum.Draw(), canMan.drawOverlay(), fabricate.Builder.echo_command(), log_trawl.Process.errPath(), escapeQuotes(), generic.controllers.MakeCanvases.HistogramExtractor.ExtractHistsFromDirectory(), fake_future_data(), PlotUtilityNew.file_list(), samweb_client.utility.fileChecksum(), PlotUtilityNew.find_files(), bp.FindFiles(), regression.generate_name(), POTPopulateData.get_active_chans(), POTGetData.get_active_chans(), POTGetData.get_runs(), POTSpillRate.get_spills(), POTGetData.get_spills(), lem_server.get_tag(), genie::utils::xml.GetAttribute(), ana::ISurface.GetBestFitY(), TB_WatchdogFx.getDBRunsHist(), WatchdogFx.getDBRunsHist(), helpers.GetDoc(), bp_docdb.DocDB.GetDocIDsByCategory(), bp_docdb.DocDB.GetDocument(), TB_WatchdogFx.Tier.getHist(), WatchdogFx.Tier.getHist(), meta::MetadataManager.GetKeys(), TB_WatchdogFx.getMaxMinRunNumDB(), WatchdogFx.getMaxMinRunNumDB(), DeclareReco.getMetadata(), getOutDir(), TB_WatchdogFx.getSAMRunsHist(), WatchdogFx.getSAMRunsHist(), ana::SpectrumLoaderBase.Gone(), lem_server.handle_backlog(), lem_server.handle_ids(), om::HeaderBar.HandleTimer(), log_trawl.Project.inspectProcs(), joint_fit_2017_slices(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_slices(), ana::MCMCSamples.LoadFrom(), nova_caf_metadata.loads_recursive(), ana::SAMQuerySource.LocationsForSAMQuery(), PandAna.utils.sadd_pandana.main(), DCS_db_parser.main(), pot-for-runs.main(), POTUptimeData.main(), POTPopulateData.main(), POTGetData.main(), om::PlotOptions.MakeLabelText(), PlotDataQA.MakePlots(), samweb_client.projects.makeProcessUrl(), fnex::StarPlot.MakeStarPlot(), nova_uptime.nactive_chans(), canMan.newCan(), plotSysts.newCan(), POTSpillRate.num_spills_between(), POTUptimeData.options(), POTPopulateData.options(), POTGetData.options(), nova_uptime.options(), log_trawl.Process.outPath(), Expression.Parse(), evd::PlotView.Parse(), update_sam_good_runs_metadata.percentStr(), plot_shifts(), Tier.Tier.prepareAndExecuteProcess(), file_size_ana.prettyPrint(), daqdataformats::VERSION_NAMESPACE::RawConfigurationSystemID.print(), daqdataformats::RawDAQData.print(), SAMView.SamView.print_summary(), uptime_graphic.print_table(), log_trawl.Project.printModes(), bp.ProcessImages(), PlotUtilityNew.pull_data(), nova::dbi::Table.RemoveValidityRange(), BatchLog.BatchLog.run_time(), lemmon_tools.runStatusCheck(), ViewHTML.samDefinitionDescriptionsModal(), samweb_client.http_client.SAMWebHTTPClient.set_timezone(), ana::Progress.SetProgress(), SliceLegend(), lem_server.status_text(), StripSpecialChar(), submit_concat_project.Submit(), plot_timing_data.time_format(), file_size_ana.toJSON(), daqdataformats::RawMilliSlice.tprintf(), daqdataformats::VERSION_NAMESPACE::RawDataBlock.tprintf(), genie::utils::xml.TrimSpaces(), Tutorial2019Fit(), Tutorial2019FitSlices(), parse_xml.type_to_proxy_type(), gen_hdf5record.variables_inc_bases(), gen_hdf5record.write_hd5record_h(), POTUptimeData.write_json(), POTGetData.write_json(), parse_xml.write_srproxy_h(), ana.WriteCAFMetadata(), lem.writeMemoryCallback(), genie::Spline.YCanBeNegative(), genie::flux::GDk2NuFluxXMLHelper.~GDk2NuFluxXMLHelper(), and genie::flux::GNuMIFluxXMLHelper.~GNuMIFluxXMLHelper().

runNovaSAM.stream = int(metadata["data_stream"])

Definition at line 251 of file runNovaSAM.py.

Referenced by genie::Algorithm.AllowReconfig(), genie::RSHelicityAmpl.Amp20Plus(), genie::ProcessInfo.AsString(), ClassImp(), genie::geometry::FidPolyhedron.clear(), nova::database::Row.Col(), genie::GVldContext.Emax(), genie::RunOpt.EnableBareXSecPreCalc(), novaddt::HitSubtract.endJob(), Expression.Eval(), genie::geometry::FidCylinder.FidCylinder(), genie::geometry::FidSphere.FidSphere(), genie::Spline.GetAsTSpline(), nutools::dbi::Table.GetConnectionTimeout(), rvp::RecVarPID.getMethodNameFromXML(), xnue::XnuePID.getMethodNameFromXML(), rvp::RecVarPID.getVarNamesFromXML(), xnue::XnuePID.getVarNamesFromXML(), genie::PDF.Gluon(), genie::Kinematics.HadSystP4(), genie::Target.HitNucP4(), genie::geometry::PathSegment.IsTrimmedEmpty(), genie::geometry::PlaneParam.IsValid(), genie::AlgId.Key(), genie::AxialFormFactor.Model(), genie::ELFormFactors.Model(), genie::QELFormFactors.Model(), genie::DISStructureFunc.Model(), genie::CacheBranchNtp.Ntuple(), genie::TuneId.OnlyConfiguration(), genie::geometry.operator<(), genie::utils.operator<<(), genie::exceptions.operator<<(), genie::geometry.operator<<(), operator<<(), genie.operator<<(), nova::database.operator<<(), nutools::dbi.operator<<(), nova::dbi.operator<<(), genie::flux.operator<<(), genie::Interaction.PhaseSpacePtr(), genie::exceptions::EVGThreadException.ReturnStep(), genie::GHepParticle.SetLastDaughter(), genie::RegistryItem< T >.SetLocal(), genie::XclsTag.SetNNeutrons(), nutools::dbi::Row.SetVldTimeEnd(), nova::dbi::Row.SetVldTimeEnd(), genie::exceptions::INukeException.ShowReason(), genie::exceptions::NievesQELException.ShowReason(), genie::CacheBranchFx.Spl(), genie::InitialState.TgtPtr(), nova::database::Column.Update(), nutools::dbi::Column.Update(), nova::dbi::Column.Update(), genie::GHepRecord.Vertex(), genie::GEVGDriver.XSecSumSpline(), genie::geometry::FidShape.~FidShape(), genie::flux::GJPARCNuFluxPassThroughInfo.~GJPARCNuFluxPassThroughInfo(), genie::flux::GNuMIFluxPassThroughInfo.~GNuMIFluxPassThroughInfo(), genie::flux::GSimpleNtpAux.~GSimpleNtpAux(), genie::flux::GSimpleNtpEntry.~GSimpleNtpEntry(), genie::flux::GSimpleNtpNuMI.~GSimpleNtpNuMI(), genie::exceptions::InteractionException.~InteractionException(), and genie::utils::T2KEvGenMetaData.~T2KEvGenMetaData().

runNovaSAM.stream_match = stream_pattern.match(inFileBase)

Definition at line 263 of file runNovaSAM.py.

runNovaSAM.stream_pattern = re.compile(r"^.*?_(dd.*?)[_,.].+", re.IGNORECASE)

Definition at line 262 of file runNovaSAM.py.

string runNovaSAM.streamEntry = 't{0:02d}'

Definition at line 252 of file runNovaSAM.py.

runNovaSAM.subNum = int(metadata["runs"][0][1])

Definition at line 235 of file runNovaSAM.py.

int runNovaSAM.subversion = os.environ["NPASS"]

Definition at line 305 of file runNovaSAM.py.

runNovaSAM.tier = outTier.split(":")[1]

Definition at line 349 of file runNovaSAM.py.

Referenced by ana::FileReducer.UpdateMetadata().

runNovaSAM.tmpFclName = os.path.basename(fclPath).replace(".fcl", "_" + os.path.splitext(inFileBase)[0] + ".fcl")

Definition at line 322 of file runNovaSAM.py.

runNovaSAM.type

Definition at line 205 of file runNovaSAM.py.