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 9 of file dataset_test.py.

Referenced by dataset_test.TestDataset.test_local().

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

Variable Documentation

dataset_test.BASE_DIR

Definition at line 7 of file dataset_test.py.