CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 11 of file dataset_test.py.

References sistrip::SpyUtilities.range().

Referenced by dataset_test.TestDataset.test_local().

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

Variable Documentation

string dataset_test.BASE_DIR = 'datasets'

Definition at line 9 of file dataset_test.py.