Functions | Variables
mkDefs Namespace Reference

Functions

def deleteDef (defname)
 
def createDef (defname, constraints)
 

Variables

 test
 
 daqReleases
 
 samweb
 
 experiment
 
 detName
 
 fileType
 
 baseDef
 
 streamConstraint
 
 streamName
 
 defname
 
 constraints
 
 daqRelease
 
 inFileName
 if we get here, we're doing the base definitions: More...
 
 inFile
 
 firstRun
 
 lastRun
 
 line
 
 fields
 
 msg
 

Function Documentation

def mkDefs.createDef (   defname,
  constraints 
)

Definition at line 37 of file mkDefs.py.

References print.

37 def createDef(defname,constraints):
38  if test:
39  print("Would create %s with contraints" % defname)
40  print(constraints)
41  if count:
42  nfiles=samweb.countFiles(constraints)
43  print("and %d files" %(nfiles))
44 
45  return
46 
47  samweb.createDefinition(defname,constraints)
48  if count:
49  nfiles=samweb.countFiles(constraints)
50  info("Made %s with %d files" %(defname,nfiles))
51 
52 prog=sys.argv[0]
53 NovaGridUtils.prog=prog
54 
55 parser=argparse.ArgumentParser(prog=prog,
56  description="Create raw and artdaq definitions")
57 
58 parser.add_argument('--det',
59  required=True,
60  help='Detector (can be neardet or fardet)',
61  type=str)
62 
63 parser.add_argument('--span',
64  required=True,
65  help='Timespan: must be a valid period (eg period1) or epoch (eg epoch3a)',
66  type=str)
67 
68 parser.add_argument('--defType',
69  required=True,
70  help='Type of definition to create (base, raw or artdaq); base implies basic definition w/o specifying a tier',
71  type=str)
72 
73 parser.add_argument('--fileType',
74  required=True,
75  help='Type of files: data or mc',
76  type=str)
77 
78 parser.add_argument('--stream',
79  help='Type of stream (numi or cosmic), required for anything other than --defType=base',
80  type=str)
81 
82 parser.add_argument('--test',
83  help='Do not delete or create datasets, but print definitions and constraints',
84  action='store_true',default=False)
85 
86 parser.add_argument('--count',
87  help='Count files in',
88  action='store_true',default=False)
89 
90 
91 parser.add_argument('--delete',
92  help='delete old definition first (if it exists)',
93  action='store_true',default=False)
94 
95 
96 args=parser.parse_args()
97 test=args.test
98 count=args.count
99 
100 span=args.span
101 
102 defType=args.defType
103 detName=""
104 
105 det=args.det
def createDef(defname, constraints)
Definition: mkDefs.py:37
bool print
def mkDefs.deleteDef (   defname)

Definition at line 19 of file mkDefs.py.

References print.

19 def deleteDef(defname):
20  if test:
21  info("Would delete %s" % defname)
22  return
23 
24  info("About to delete %s, y/n?" % defname)
25  while True:
26  c=sys.stdin.read(1)
27  if c=="y":
28  break
29  elif c=="n":
30  print("Quitting w/o doing anything")
31  sys.exit(0)
32  else:
33  print("Please enter 'y' or 'n' only")
34 
35  samweb.deleteDefinition(defname)
36 
def deleteDef(defname)
Definition: mkDefs.py:19
bool print

Variable Documentation

mkDefs.baseDef

Definition at line 117 of file mkDefs.py.

mkDefs.constraints

Definition at line 148 of file mkDefs.py.

Referenced by MakeFakeExperiment().

mkDefs.daqRelease

Definition at line 155 of file mkDefs.py.

mkDefs.daqReleases

Definition at line 13 of file mkDefs.py.

mkDefs.defname

Definition at line 144 of file mkDefs.py.

mkDefs.detName
mkDefs.experiment

Definition at line 17 of file mkDefs.py.

mkDefs.fields

Definition at line 177 of file mkDefs.py.

mkDefs.fileType
mkDefs.firstRun

Definition at line 172 of file mkDefs.py.

mkDefs.inFile

Definition at line 170 of file mkDefs.py.

mkDefs.inFileName

if we get here, we're doing the base definitions:

Definition at line 169 of file mkDefs.py.

Referenced by BestFit(), art::TrivialFileTransfer.doTranslateToLocalFilename(), MakeISysts(), MergePredictions(), and NuSCalculateCorr().

mkDefs.lastRun

Definition at line 173 of file mkDefs.py.

mkDefs.line

Definition at line 176 of file mkDefs.py.

mkDefs.msg

Definition at line 179 of file mkDefs.py.

mkDefs.samweb

Definition at line 17 of file mkDefs.py.

mkDefs.streamConstraint

Definition at line 126 of file mkDefs.py.

mkDefs.streamName

Definition at line 127 of file mkDefs.py.

mkDefs.test

Definition at line 11 of file mkDefs.py.