Functions | Variables
run_hadd Namespace Reference

Functions

def checkFileCount (s_Dir)
 

Variables

bool isTrial = False
 
string dirFile = "dirsToHadd.txt"
 
list l_Dirs = [line.rstrip('\n') for line in open(dirFile)]
 
string s_Persistent = "/pnfs/nova/persistent/users/aboot"
 
 s_FirstDir = l_Dirs[0]
 
 s_ExampleFile = subprocess.check_output("ls " + d + " | grep root | tail -n1", shell=True);
 
 s_FileStub = s_ExampleFile.split(".")[0]
 
string s_DestFile = s_Persistent+s_FileStub+".root"
 
string cmd = "hadd_cafana "
 
string s_BasePersistent = "/pnfs/nova/persistent/users/aboot"
 

Function Documentation

def run_hadd.checkFileCount (   s_Dir)

Definition at line 15 of file run_hadd.py.

References print, and runNovaSAM.str.

15 def checkFileCount(s_Dir):
16  s_ExampleFile = subprocess.check_output("ls " + d + " | grep root | tail -n1", shell=True);
17  nFiles = subprocess.check_output("ls " + s_Dir + " | grep root | wc -l", shell=True);
18  for sub in nFiles.split():
19  if sub.isdigit():
20  nFiles = sub;
21  break;
22 
23  if str(nFiles)=="0":
24  print(s_Dir + " IS EMPTY!");
25  return False;
26 
27  s_ExpectedFiles = re.search("_of_(.*).root", s_ExampleFile);
28  print("IN THIS DIR THERE ARE " + nFiles + " of " + s_ExpectedFiles.group(1) + " ROOT FILES");
29  return ("of_"+str(nFiles)) in s_ExampleFile;
30 
def checkFileCount(s_Dir)
Definition: run_hadd.py:15
bool print

Variable Documentation

string run_hadd.cmd = "hadd_cafana "

Definition at line 52 of file run_hadd.py.

string run_hadd.dirFile = "dirsToHadd.txt"

Definition at line 11 of file run_hadd.py.

bool run_hadd.isTrial = False

Definition at line 5 of file run_hadd.py.

list run_hadd.l_Dirs = [line.rstrip('\n') for line in open(dirFile)]

Definition at line 12 of file run_hadd.py.

string run_hadd.s_BasePersistent = "/pnfs/nova/persistent/users/aboot"

Definition at line 13 of file run_hadd.py.

string run_hadd.s_DestFile = s_Persistent+s_FileStub+".root"

Definition at line 46 of file run_hadd.py.

run_hadd.s_ExampleFile = subprocess.check_output("ls " + d + " | grep root | tail -n1", shell=True);

Definition at line 44 of file run_hadd.py.

run_hadd.s_FileStub = s_ExampleFile.split(".")[0]

Definition at line 45 of file run_hadd.py.

run_hadd.s_FirstDir = l_Dirs[0]

Definition at line 32 of file run_hadd.py.

string run_hadd.s_Persistent = "/pnfs/nova/persistent/users/aboot"

Definition at line 13 of file run_hadd.py.