CMS 3D CMS Logo

Classes | Functions | Variables
dataset_test Namespace Reference

Classes

class  TestDataset
 

Functions

def create_dataset (name, number_of_files, basedir=BASE_DIR)
 

Variables

 BASE_DIR
 

Function Documentation

def dataset_test.create_dataset (   name,
  number_of_files,
  basedir = BASE_DIR 
)

Definition at line 11 of file dataset_test.py.

Referenced by dataset_test.TestDataset.test_local().

11 def create_dataset(name, number_of_files, basedir=BASE_DIR):
12  if not os.path.isdir(basedir):
13  os.mkdir(basedir)
14  old = os.getcwd()
15  os.chdir(basedir)
16  if os.path.isdir(name):
17  shutil.rmtree(name)
18  os.mkdir(name)
19  os.chdir(name)
20  for i in range(number_of_files):
21  os.system('touch file_{i:d}.root'.format(i=i))
22  os.chdir(old)
23 
def create_dataset(name, number_of_files, basedir=BASE_DIR)
Definition: dataset_test.py:11

Variable Documentation

dataset_test.BASE_DIR

Definition at line 9 of file dataset_test.py.