test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
dataset_test Namespace Reference

Classes

class  TestDataset
 

Functions

def create_dataset
 

Variables

string BASE_DIR = 'datasets'
 

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

Variable Documentation

string dataset_test.BASE_DIR = 'datasets'

Definition at line 7 of file dataset_test.py.