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

◆ create_dataset()

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

Definition at line 11 of file dataset_test.py.

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 

References FastTimerService_cff.range.

Referenced by dataset_test.TestDataset.test_local().

Variable Documentation

◆ BASE_DIR

dataset_test.BASE_DIR

Definition at line 9 of file dataset_test.py.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
dataset_test.create_dataset
def create_dataset(name, number_of_files, basedir=BASE_DIR)
Definition: dataset_test.py:11
format