def record(self, driver, inputs, outputs, exc, case_uuid, parent_uuid):

        hdf5_file_object = self.hdf5_case_record_file_objects[driver]

        info = self.get_case_info(driver, inputs, outputs, exc,
                                  case_uuid, parent_uuid)

        self._cases += 1
        iteration_case_name = 'iteration_case_%s' % self._cases

        int_names = []
        float_names = []
        str_names = []

        # create dataset for the record metadata: _driver_id, _id, _parent_id, error_message, error_status, timestamp
        # From Python and HDF5 Book on Safari Online
        if not "/metadatatype" in hdf5_file_object: # TODO use actual string lengths
            hdf5_file_object['metadatatype'] =  np.dtype([
                ('_driver_id', 'i8'),
                ('_driver_name', np.str_, 40),
                ('_id', np.str_, 40),
                ('_parent_id', np.str_, 40),
                ('_itername', np.str_, 40),
                ('error_message', np.str_, 40),
                ('error_status', 'i8'),
                ('timestamp', 'f8')]
                )

        self._count += 1
        iteration_case_group = create_group(hdf5_file_object, iteration_case_name)
        iteration_case_group = hdf5_file_object.create_group(iteration_case_name)
        metadata_dset = create_dataset(iteration_case_group, "metadata",(1,), dtype=hdf5_file_object['metadatatype'])
        metadata_dset = iteration_case_group.create_dataset("metadata",(1,), dtype=hdf5_file_object['metadatatype'])
        data_grp = create_group( iteration_case_group, 'data' )
        data_grp = iteration_case_group.create_group( 'data' )
        for k,v in info.items():
            if k != 'data': # record metadata # TODO get rid of this clause
                # write_groups_to_hdf5( iteration_case_group, k, v )
                pass
            else:
                max_str_len = 0
                for name,value in v.items():
                    if isinstance(value,int):
                        int_names.append(name)
                    elif isinstance(value,( np.float64, float )):
                        float_names.append(name)
                    elif isinstance(value, str):
                        str_names.append(name)
                        max_str_len = max( max_str_len, len(value))
                    else:
                        write_groups_to_hdf5(data_grp, name, value )

        # only add this info once per record file
        if not "/float_names" in hdf5_file_object:
            create_dataset(hdf5_file_object, 'float_names', data=np.array( float_names ) )
            hdf5_file_object.create_dataset('float_names', data=np.array( float_names ) )
        if not "/int_names" in hdf5_file_object: # only add this info once per record file
            create_dataset(hdf5_file_object, 'int_names', data=np.array( int_names ) )
            hdf5_file_object.create_dataset('int_names', data=np.array( int_names ) )
        if not "/str_names" in hdf5_file_object: # only add this info once per record file
            create_dataset(hdf5_file_object, 'str_names', data=np.array( str_names ) )
            hdf5_file_object.create_dataset('str_names', data=np.array( str_names ) )

        # Create the datasets for the int and float and string arrays
        int_arrays_dset = create_dataset(data_grp, 'array_of_ints', (len(int_names),),dtype=np.int64)
        int_arrays_dset = data_grp.create_dataset('array_of_ints', (len(int_names),),dtype=np.int64)
        float_arrays_dset = create_dataset(data_grp, 'array_of_floats', (len(float_names),),dtype=np.float64)
        float_arrays_dset = data_grp.create_dataset('array_of_floats', (len(float_names),),dtype=np.float64)
        #str_arrays_dset = data_grp.create_dataset('array_of_strs', (len(str_names),),str_dtype )
        str_arrays_dset = create_dataset(data_grp, 'array_of_strs', (len(str_names),),str_dtype )
        str_arrays_dset = data_grp.create_dataset('array_of_strs', (len(str_names),),str_dtype )

        scope = driver.parent
        prefix = scope.get_pathname()

        ##### Write the datasets using only the data available to this process ######
        data_grp = iteration_case_group['data']

        dp( 'determine metadata' )
        metadata = []
        for name in [ '_driver_id', '_driver_name', '_id', '_parent_id', '_itername', 'error_message', 'error_status', 'timestamp'] :
            value = info[ name ]
            if name == 'error_status' and value == None :
                from sys import maxint
                value = maxint
            metadata.append( value )

        dp('set metadata_dset' )
        metadata_dset[()] = np.array([ tuple(metadata), ], dtype = hdf5_file_object['metadatatype'])

        dp('set values in data')
        for name, value in info[ 'data' ].items():

            print_var = self.is_variable_local( driver, prefix, name )

            if print_var:
                if isinstance(value,int):
                    idx = int_names.index(name) # where in the index is this value?
                    int_arrays_dset[idx] = value
                elif isinstance(value,(np.float64,float)):
                    idx = float_names.index(name) # where in the index is this value?
                    float_arrays_dset[idx] = value
                elif isinstance(value,str):
                    idx = str_names.index(name) # where in the index is this value?
                    str_arrays_dset[idx] = value
                else:
                    write_to_hdf5( data_grp, name, value )

        dp('exit record')
Wrap an active socket in an SSL socket.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/casehandlers/hdf5case.py/HDF5CaseRecorder.record--crossover with--dataset/ETHPy150Open HenryHu/pybbs/xmpp/aio.py/starttls