// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::Clone()
LMF_IO * LMF_IO::Clone()
/////////////////////////////////////////////////////////////////
{
	LMF_IO * clone = new LMF_IO(num_channels,num_ions);
	if (!clone) return 0;

	clone->Versionstring			= this->Versionstring;
	clone->FilePathName				= this->FilePathName;
	clone->OutputFilePathName		= this->OutputFilePathName;
	clone->Comment					= this->Comment;
	clone->Comment_output			= this->Comment_output;
	clone->DAQ_info					= this->DAQ_info;
	clone->Camac_CIF				= this->Camac_CIF;
	
	clone->Starttime				= this->Starttime;
	clone->Stoptime					= this->Stoptime;
	clone->Starttime_output			= this->Starttime_output;
	clone->Stoptime_output			= this->Stoptime_output;
	
	clone->time_reference			= this->time_reference;
	clone->time_reference_output	= this->time_reference_output;
	
	clone->ArchiveFlag				= this->ArchiveFlag;
	clone->Cobold_Header_version	= this->Cobold_Header_version;
	clone->Cobold_Header_version_output	= this->Cobold_Header_version_output;
	
	clone->uint64_LMF_EventCounter	= this->uint64_LMF_EventCounter;
	clone->uint64_number_of_read_events	= this->uint64_number_of_read_events;
	clone->uint64_Numberofevents	= this->uint64_Numberofevents;
	
	clone->Numberofcoordinates		= this->Numberofcoordinates;
	clone->CTime_version			= this->CTime_version;
	clone->CTime_version_output		= this->CTime_version_output;
	clone->CTime_version_output		= this->CTime_version_output;
	clone->SIMPLE_DAQ_ID_Orignial	= this->SIMPLE_DAQ_ID_Orignial;
	clone->DAQVersion				= this->DAQVersion;
	clone->DAQVersion_output		= this->DAQVersion_output;
	clone->DAQ_ID					= this->DAQ_ID;
	clone->DAQ_ID_output			= this->DAQ_ID_output;
	clone->data_format_in_userheader	= this->data_format_in_userheader;
	clone->data_format_in_userheader_output	= this->data_format_in_userheader_output;
	
	clone->Headersize				= this->Headersize;
	clone->User_header_size			= this->User_header_size;
	clone->User_header_size_output	= this->User_header_size_output;
	
	clone->IOaddress				= this->IOaddress;
	clone->timestamp_format			= this->timestamp_format;
	clone->timestamp_format_output	= this->timestamp_format_output;
	clone->timerange				= this->timerange;
	
	clone->number_of_channels		= this->number_of_channels;
	clone->number_of_channels2		= this->number_of_channels2;
	clone->max_number_of_hits		= this->max_number_of_hits;
	clone->max_number_of_hits2		= this->max_number_of_hits2;
	
	clone->number_of_channels_output	= this->number_of_channels_output;
	clone->number_of_channels2_output	= this->number_of_channels2_output;
	clone->max_number_of_hits_output	= this->max_number_of_hits_output;
	clone->max_number_of_hits2_output	= this->max_number_of_hits2_output;
	
	clone->DAQSubVersion			= this->DAQSubVersion;
	clone->module_2nd				= this->module_2nd;
	clone->system_timeout			= this->system_timeout;
	clone->system_timeout_output	= this->system_timeout_output;
	clone->common_mode				= this->common_mode;
	clone->common_mode_output		= this->common_mode_output;
	clone->DAQ_info_Length			= this->DAQ_info_Length;
	clone->Camac_CIF_Length			= this->Camac_CIF_Length;
	clone->LMF_Version				= this->LMF_Version;
	clone->LMF_Version_output		= this->LMF_Version_output;
	clone->TDCDataType				= this->TDCDataType;
	
	clone->LMF_Header_version		= this->LMF_Header_version;
	
	clone->number_of_bytes_in_PostEventData = this->number_of_bytes_in_PostEventData;
	
	clone->tdcresolution			= this->tdcresolution;
	clone->tdcresolution_output		= this->tdcresolution_output;
	clone->frequency				= this->frequency;
	clone->DOUBLE_timestamp			= this->DOUBLE_timestamp;
	clone->ui64_timestamp			= this->ui64_timestamp;

	clone->number_of_CCFHistory_strings = this->number_of_CCFHistory_strings;
	clone->number_of_DAN_source_strings = this->number_of_DAN_source_strings;
	clone->number_of_DAQ_source_strings = this->number_of_DAQ_source_strings;
	clone->number_of_CCFHistory_strings_output = this->number_of_CCFHistory_strings_output;
	clone->number_of_DAN_source_strings_output = this->number_of_DAN_source_strings_output;
	clone->number_of_DAQ_source_strings_output = this->number_of_DAQ_source_strings_output;

	if (number_of_CCFHistory_strings >= 0) {
		clone->CCFHistory_strings = new std::string*[number_of_CCFHistory_strings];
		memset(clone->CCFHistory_strings,0,sizeof(std::string*)*number_of_CCFHistory_strings);
	}
	if (number_of_DAN_source_strings >= 0) {
		clone->DAN_source_strings = new std::string*[number_of_DAN_source_strings];
		memset(clone->DAN_source_strings,0,sizeof(std::string*)*number_of_DAN_source_strings);
	}
	if (number_of_DAQ_source_strings >= 0) {
		clone->DAQ_source_strings = new std::string*[number_of_DAQ_source_strings];
		memset(clone->DAQ_source_strings,0,sizeof(std::string*)*number_of_DAQ_source_strings);
	}
	if (this->CCFHistory_strings) {
		for (__int32 i=0;i<number_of_CCFHistory_strings;++i) {clone->CCFHistory_strings[i] = new std::string(); *clone->CCFHistory_strings[i] = *this->CCFHistory_strings[i];}
	}
	if (this->DAN_source_strings) {
		for (__int32 i=0;i<number_of_DAN_source_strings;++i) {clone->DAN_source_strings[i] = new std::string(); *clone->DAN_source_strings[i] = *this->DAN_source_strings[i];}
	}
	if (this->DAQ_source_strings) {
		for (__int32 i=0;i<number_of_DAQ_source_strings;++i) {clone->DAQ_source_strings[i] = new std::string(); *clone->DAQ_source_strings[i] = *this->DAQ_source_strings[i];}
	}

	if (number_of_CCFHistory_strings_output>=0) {
		clone->CCFHistory_strings_output = new std::string*[number_of_CCFHistory_strings_output];
		memset(clone->CCFHistory_strings_output,0,sizeof(std::string*)*number_of_CCFHistory_strings_output);
	}
	if (number_of_DAN_source_strings_output>=0) {
		clone->DAN_source_strings_output = new std::string*[number_of_DAN_source_strings_output];
		memset(clone->DAN_source_strings_output,0,sizeof(std::string*)*number_of_DAN_source_strings_output);
	}
	if (number_of_DAQ_source_strings_output>=0) {
		clone->DAQ_source_strings_output = new std::string*[number_of_DAQ_source_strings_output];
		memset(clone->DAQ_source_strings_output,0,sizeof(std::string*)*number_of_DAQ_source_strings_output);
	}
	if (this->CCFHistory_strings_output) {
		for (__int32 i=0;i<number_of_CCFHistory_strings_output;++i) {clone->CCFHistory_strings_output[i] = new std::string(); *clone->CCFHistory_strings_output[i] = *this->CCFHistory_strings_output[i];}
	}
	if (this->DAN_source_strings_output) {
		for (__int32 i=0;i<number_of_DAN_source_strings_output;++i) {clone->DAN_source_strings_output[i] = new std::string(); *clone->DAN_source_strings_output[i] = *this->DAN_source_strings_output[i];}
	}
	if (this->DAQ_source_strings_output) {
		for (__int32 i=0;i<number_of_DAQ_source_strings_output;++i) {clone->DAQ_source_strings_output[i] = new std::string(); *clone->DAQ_source_strings_output[i] = *this->DAQ_source_strings_output[i];}
	}

	clone->CCF_HISTORY_CODE_bitmasked = this->CCF_HISTORY_CODE_bitmasked;
	clone->DAN_SOURCE_CODE_bitmasked = this->DAN_SOURCE_CODE_bitmasked;
	clone->DAQ_SOURCE_CODE_bitmasked = this->DAQ_SOURCE_CODE_bitmasked;
	
	clone->errorflag				= this->errorflag;
	clone->skip_header				= this->skip_header;
	
	clone->uint64_number_of_written_events	= this->uint64_number_of_written_events;
	
	clone->not_Cobold_LMF			= this->not_Cobold_LMF;
	clone->Headersize_output		= this->Headersize_output;
	clone->output_byte_counter		= this->output_byte_counter;
	clone->Numberofcoordinates_output	= this->Numberofcoordinates_output;
	clone->must_read_first			= this->must_read_first;

	clone->num_channels				= this->num_channels;
	clone->num_ions					= this->num_ions;



// pointers and other special stuff:


//clone->InputFileIsOpen		= this->InputFileIsOpen;
//clone->in_ar					= this->in_ar;
//clone->input_lmf				= this->input_lmf;

//clone->OutputFileIsOpen			= this->OutputFileIsOpen;
//clone->out_ar					= this->out_ar;
//clone->output_lmf				= this->output_lmf;


	// TDC8PCI2
	clone->TDC8PCI2.GateDelay_1st_card			= this->TDC8PCI2.GateDelay_1st_card;
	clone->TDC8PCI2.OpenTime_1st_card			= this->TDC8PCI2.OpenTime_1st_card;
	clone->TDC8PCI2.WriteEmptyEvents_1st_card	= this->TDC8PCI2.WriteEmptyEvents_1st_card;
	clone->TDC8PCI2.TriggerFalling_1st_card		= this->TDC8PCI2.TriggerFalling_1st_card;
	clone->TDC8PCI2.TriggerRising_1st_card		= this->TDC8PCI2.TriggerRising_1st_card;
	clone->TDC8PCI2.EmptyCounter_1st_card		= this->TDC8PCI2.EmptyCounter_1st_card;
	clone->TDC8PCI2.EmptyCounter_since_last_Event_1st_card = this->TDC8PCI2.EmptyCounter_since_last_Event_1st_card;
	clone->TDC8PCI2.use_normal_method			= this->TDC8PCI2.use_normal_method;
	clone->TDC8PCI2.use_normal_method_2nd_card	= this->TDC8PCI2.use_normal_method_2nd_card;
	clone->TDC8PCI2.sync_test_on_off			= this->TDC8PCI2.sync_test_on_off;
	clone->TDC8PCI2.io_address_2nd_card			= this->TDC8PCI2.io_address_2nd_card;
	clone->TDC8PCI2.GateDelay_2nd_card			= this->TDC8PCI2.GateDelay_2nd_card;
	clone->TDC8PCI2.OpenTime_2nd_card			= this->TDC8PCI2.OpenTime_2nd_card;
	clone->TDC8PCI2.WriteEmptyEvents_2nd_card	= this->TDC8PCI2.WriteEmptyEvents_2nd_card;
	clone->TDC8PCI2.TriggerFallingEdge_2nd_card = this->TDC8PCI2.TriggerFallingEdge_2nd_card;
	clone->TDC8PCI2.TriggerRisingEdge_2nd_card	= this->TDC8PCI2.TriggerRisingEdge_2nd_card;
	clone->TDC8PCI2.EmptyCounter_2nd_card		= this->TDC8PCI2.EmptyCounter_2nd_card;
	clone->TDC8PCI2.EmptyCounter_since_last_Event_2nd_card = this->TDC8PCI2.EmptyCounter_since_last_Event_2nd_card;
	clone->TDC8PCI2.variable_event_length		= this->TDC8PCI2.variable_event_length;


	// HM1
	clone->HM1.FAK_DLL_Value			= this->HM1.FAK_DLL_Value;
	clone->HM1.Resolution_Flag			= this->HM1.Resolution_Flag;
	clone->HM1.trigger_mode_for_start	= this->HM1.trigger_mode_for_start;
	clone->HM1.trigger_mode_for_stop	= this->HM1.trigger_mode_for_stop;
	clone->HM1.Even_open_time			= this->HM1.Even_open_time;
	clone->HM1.Auto_Trigger				= this->HM1.Auto_Trigger;
	clone->HM1.set_bits_for_GP1			= this->HM1.set_bits_for_GP1;
	clone->HM1.ABM_m_xFrom				= this->HM1.ABM_m_xFrom;
	clone->HM1.ABM_m_xTo				= this->HM1.ABM_m_xTo;
	clone->HM1.ABM_m_yFrom				= this->HM1.ABM_m_yFrom;
	clone->HM1.ABM_m_yTo				= this->HM1.ABM_m_yTo;
	clone->HM1.ABM_m_xMin				= this->HM1.ABM_m_xMin;
	clone->HM1.ABM_m_xMax				= this->HM1.ABM_m_xMax;
	clone->HM1.ABM_m_yMin				= this->HM1.ABM_m_yMin;
	clone->HM1.ABM_m_yMax				= this->HM1.ABM_m_yMax;
	clone->HM1.ABM_m_xOffset			= this->HM1.ABM_m_xOffset;
	clone->HM1.ABM_m_yOffset			= this->HM1.ABM_m_yOffset;
	clone->HM1.ABM_m_zOffset			= this->HM1.ABM_m_zOffset;
	clone->HM1.ABM_Mode					= this->HM1.ABM_Mode;
	clone->HM1.ABM_OsziDarkInvert		= this->HM1.ABM_OsziDarkInvert;
	clone->HM1.ABM_ErrorHisto			= this->HM1.ABM_ErrorHisto;
	clone->HM1.ABM_XShift				= this->HM1.ABM_XShift;
	clone->HM1.ABM_YShift				= this->HM1.ABM_YShift;
	clone->HM1.ABM_ZShift				= this->HM1.ABM_ZShift;
	clone->HM1.ABM_ozShift				= this->HM1.ABM_ozShift;
	clone->HM1.ABM_wdShift				= this->HM1.ABM_wdShift;
	clone->HM1.ABM_ucLevelXY			= this->HM1.ABM_ucLevelXY;
	clone->HM1.ABM_ucLevelZ				= this->HM1.ABM_ucLevelZ;
	clone->HM1.ABM_uiABMXShift			= this->HM1.ABM_uiABMXShift;
	clone->HM1.ABM_uiABMYShift			= this->HM1.ABM_uiABMYShift;
	clone->HM1.ABM_uiABMZShift			= this->HM1.ABM_uiABMZShift;
	clone->HM1.use_normal_method		= this->HM1.use_normal_method;

	clone->HM1.TWOHM1_FAK_DLL_Value		= this->HM1.TWOHM1_FAK_DLL_Value;
	clone->HM1.TWOHM1_Resolution_Flag	= this->HM1.TWOHM1_Resolution_Flag;
	clone->HM1.TWOHM1_trigger_mode_for_start	= this->HM1.TWOHM1_trigger_mode_for_start;
	clone->HM1.TWOHM1_trigger_mode_for_stop		= this->HM1.TWOHM1_trigger_mode_for_stop;
	clone->HM1.TWOHM1_res_adjust		= this->HM1.TWOHM1_res_adjust;
	clone->HM1.TWOHM1_tdcresolution		= this->HM1.TWOHM1_tdcresolution;
	clone->HM1.TWOHM1_test_overflow		= this->HM1.TWOHM1_test_overflow;
	clone->HM1.TWOHM1_number_of_channels	= this->HM1.TWOHM1_number_of_channels;
	clone->HM1.TWOHM1_number_of_hits	= this->HM1.TWOHM1_number_of_hits;
	clone->HM1.TWOHM1_set_bits_for_GP1	= this->HM1.TWOHM1_set_bits_for_GP1;
	clone->HM1.TWOHM1_HM1_ID_1			= this->HM1.TWOHM1_HM1_ID_1;
	clone->HM1.TWOHM1_HM1_ID_2			= this->HM1.TWOHM1_HM1_ID_2;

	clone->TDC8HP.no_config_file_read	= this->TDC8HP.no_config_file_read;
	clone->TDC8HP.RisingEnable_p61		= this->TDC8HP.RisingEnable_p61;
	clone->TDC8HP.FallingEnable_p62		= this->TDC8HP.FallingEnable_p62;
	clone->TDC8HP.TriggerEdge_p63		= this->TDC8HP.TriggerEdge_p63;
	clone->TDC8HP.TriggerChannel_p64		= this->TDC8HP.TriggerChannel_p64;
	clone->TDC8HP.OutputLevel_p65		= this->TDC8HP.OutputLevel_p65;
	clone->TDC8HP.GroupingEnable_p66		= this->TDC8HP.GroupingEnable_p66;
	clone->TDC8HP.GroupingEnable_p66_output	= this->TDC8HP.GroupingEnable_p66_output;
	clone->TDC8HP.AllowOverlap_p67		= this->TDC8HP.AllowOverlap_p67;
	clone->TDC8HP.TriggerDeadTime_p68	= this->TDC8HP.TriggerDeadTime_p68;
	clone->TDC8HP.GroupRangeStart_p69	= this->TDC8HP.GroupRangeStart_p69;
	clone->TDC8HP.GroupRangeEnd_p70		= this->TDC8HP.GroupRangeEnd_p70;
	clone->TDC8HP.ExternalClock_p71		= this->TDC8HP.ExternalClock_p71;
	clone->TDC8HP.OutputRollOvers_p72	= this->TDC8HP.OutputRollOvers_p72;
	clone->TDC8HP.DelayTap0_p73			= this->TDC8HP.DelayTap0_p73;
	clone->TDC8HP.DelayTap1_p74			= this->TDC8HP.DelayTap1_p74;
	clone->TDC8HP.DelayTap2_p75			= this->TDC8HP.DelayTap2_p75;
	clone->TDC8HP.DelayTap3_p76			= this->TDC8HP.DelayTap3_p76;
	clone->TDC8HP.INL_p80				= this->TDC8HP.INL_p80;
	clone->TDC8HP.DNL_p81				= this->TDC8HP.DNL_p81;
	clone->TDC8HP.csConfigFile			= this->TDC8HP.csConfigFile;
	clone->TDC8HP.csINLFile				= this->TDC8HP.csINLFile;
	clone->TDC8HP.csDNLFile				= this->TDC8HP.csDNLFile;
	clone->TDC8HP.csConfigFile_Length	= this->TDC8HP.csConfigFile_Length;
	clone->TDC8HP.csINLFile_Length		= this->TDC8HP.csINLFile_Length;
	clone->TDC8HP.csDNLFile_Length		= this->TDC8HP.csDNLFile_Length;
	clone->TDC8HP.UserHeaderVersion		= this->TDC8HP.UserHeaderVersion;
	clone->TDC8HP.VHR_25ps				= this->TDC8HP.VHR_25ps;
	clone->TDC8HP.SyncValidationChannel	= this->TDC8HP.SyncValidationChannel;
	clone->TDC8HP.variable_event_length	= this->TDC8HP.variable_event_length;
	clone->TDC8HP.SSEEnable				= this->TDC8HP.SSEEnable;
	clone->TDC8HP.MMXEnable				= this->TDC8HP.MMXEnable;
	clone->TDC8HP.DMAEnable				= this->TDC8HP.DMAEnable;
	clone->TDC8HP.GroupTimeOut			= this->TDC8HP.GroupTimeOut;

	clone->TDC8HP.i32NumberOfDAQLoops   = this->TDC8HP.i32NumberOfDAQLoops;   
	clone->TDC8HP.TDC8HP_DriverVersion 	= this->TDC8HP.TDC8HP_DriverVersion; 	
	clone->TDC8HP.iTriggerChannelMask	= this->TDC8HP.iTriggerChannelMask;	
	clone->TDC8HP.iTime_zero_channel	= this->TDC8HP.iTime_zero_channel;	

	clone->TDC8HP.Number_of_TDCs = this->TDC8HP.Number_of_TDCs;
	for (__int32 i = 0;i<3;++i) {
		if (this->TDC8HP.TDC_info[i]) {
			clone->TDC8HP.TDC_info[i]->index				= this->TDC8HP.TDC_info[i]->index;
			clone->TDC8HP.TDC_info[i]->channelCount			= this->TDC8HP.TDC_info[i]->channelCount;
			clone->TDC8HP.TDC_info[i]->channelStart			= this->TDC8HP.TDC_info[i]->channelStart;
			clone->TDC8HP.TDC_info[i]->highResChannelCount	= this->TDC8HP.TDC_info[i]->highResChannelCount;
			clone->TDC8HP.TDC_info[i]->highResChannelStart	= this->TDC8HP.TDC_info[i]->highResChannelStart;
			clone->TDC8HP.TDC_info[i]->lowResChannelCount	= this->TDC8HP.TDC_info[i]->lowResChannelCount;
			clone->TDC8HP.TDC_info[i]->lowResChannelStart	= this->TDC8HP.TDC_info[i]->lowResChannelStart;
			clone->TDC8HP.TDC_info[i]->resolution			= this->TDC8HP.TDC_info[i]->resolution;
			clone->TDC8HP.TDC_info[i]->serialNumber			= this->TDC8HP.TDC_info[i]->serialNumber;
			clone->TDC8HP.TDC_info[i]->version				= this->TDC8HP.TDC_info[i]->version;
			clone->TDC8HP.TDC_info[i]->fifoSize				= this->TDC8HP.TDC_info[i]->fifoSize;
			clone->TDC8HP.TDC_info[i]->flashValid			= this->TDC8HP.TDC_info[i]->flashValid;
			memcpy(clone->TDC8HP.TDC_info[i]->INLCorrection,this->TDC8HP.TDC_info[i]->INLCorrection,sizeof(__int32)*8*1024);
			memcpy(clone->TDC8HP.TDC_info[i]->DNLData,this->TDC8HP.TDC_info[i]->DNLData,sizeof(__int16)*8*1024);
		}
	}




	clone->fADC8.driver_version					=	this->fADC8.driver_version;
	clone->fADC8.i32NumberOfDAQLoops			=	this->fADC8.i32NumberOfDAQLoops;
	clone->fADC8.number_of_bools				=	this->fADC8.number_of_bools;
	clone->fADC8.number_of_int32s				=	this->fADC8.number_of_int32s;
	clone->fADC8.number_of_uint32s				=	this->fADC8.number_of_uint32s;
	clone->fADC8.number_of_doubles				=	this->fADC8.number_of_doubles;
	clone->fADC8.GroupEndMarker					=	this->fADC8.GroupEndMarker;
	clone->fADC8.i32NumberOfADCmodules			=	this->fADC8.i32NumberOfADCmodules;
	clone->fADC8.iEnableGroupMode				=	this->fADC8.iEnableGroupMode;
	clone->fADC8.iTriggerChannel				=	this->fADC8.iTriggerChannel;
	clone->fADC8.iPreSamplings_in_4800ps_units	=	this->fADC8.iPreSamplings_in_4800ps_units;
	clone->fADC8.iPostSamplings_in_9600ps_units	=	this->fADC8.iPostSamplings_in_9600ps_units;
	clone->fADC8.iEnableTDCinputs				=	this->fADC8.iEnableTDCinputs;
	clone->fADC8.bReadCustomData				=	this->fADC8.bReadCustomData;
	clone->fADC8.veto_gate_length				=	this->fADC8.veto_gate_length;
	clone->fADC8.veto_delay_length				=	this->fADC8.veto_delay_length;
	clone->fADC8.veto_mask						=	this->fADC8.veto_mask;
	clone->fADC8.dGroupRangeStart				=	this->fADC8.dGroupRangeStart;
	clone->fADC8.dGroupRangeEnd					=	this->fADC8.dGroupRangeEnd;
	clone->fADC8.at_least_1_signal_was_written	=	this->fADC8.at_least_1_signal_was_written;
	for (__int32 m = 0;m<8;m++) {
		clone->fADC8.firmware_version[m]	= this->fADC8.firmware_version[m];
		clone->fADC8.serial_number[m]		= this->fADC8.serial_number[m];
		for (__int32 adc = 0;adc<2;adc++) {
			clone->fADC8.dSyncTimeOffset[m][adc]	=	this->fADC8.dSyncTimeOffset[m][adc];
			clone->fADC8.iChannelMode[m][adc]		=	this->fADC8.iChannelMode[m][adc]; // 0 = 1.25Gs, 1 = 2.5Gs, 2 = 5Gs
			clone->fADC8.iThreshold_GT[m][m]		=	this->fADC8.iThreshold_GT[m][m];
			clone->fADC8.iThreshold_LT[m][m]		=	this->fADC8.iThreshold_LT[m][m];
			clone->fADC8.iSynchronMode [m][adc]		=	this->fADC8.iSynchronMode [m][adc];
		}
		for (__int32 ch = 0;ch<2;ch++)
			clone->fADC8.GND_level[m][ch] = this->fADC8.GND_level[m][ch];
	}


	clone->fADC4.packet_count =				this->fADC4.packet_count;
	clone->fADC4.number_of_bools =			this->fADC4.number_of_bools;
	clone->fADC4.number_of_int32s =			this->fADC4.number_of_int32s;
	clone->fADC4.number_of_uint32s =		this->fADC4.number_of_uint32s;
	clone->fADC4.number_of_doubles =		this->fADC4.number_of_doubles;
	clone->fADC4.GroupEndMarker =			this->fADC4.GroupEndMarker;
	clone->fADC4.driver_version =			this->fADC4.driver_version;
	clone->fADC4.i32NumberOfDAQLoops =		this->fADC4.i32NumberOfDAQLoops;
	clone->fADC4.bReadCustomData =			this->fADC4.bReadCustomData;
	clone->fADC4.i32NumberOfADCmodules =	this->fADC4.i32NumberOfADCmodules;
	clone->fADC4.iTriggerChannel =			this->fADC4.iTriggerChannel;
	clone->fADC4.dGroupRangeStart =			this->fADC4.dGroupRangeStart;
	clone->fADC4.dGroupRangeEnd =			this->fADC4.dGroupRangeEnd;
	clone->fADC4.csConfigFile =				this->fADC4.csConfigFile;
	clone->fADC4.csINLFile =				this->fADC4.csINLFile;
	clone->fADC4.csDNLFile =				this->fADC4.csDNLFile;
	for (__int32 i=0;i<20;i++) clone->fADC4.bits_per_mVolt[i] = this->fADC4.bits_per_mVolt[i];

	return clone;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl $0x2b80, %edi           # imm = 0x2B80
callq 0x2130
movq %rax, %rbx
movl 0x2b70(%r14), %esi
movl 0x2b74(%r14), %edx
movq %rax, %rdi
callq 0x25b8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20a0
leaq 0x20(%r14), %rsi
leaq 0x20(%rbx), %rdi
callq 0x20a0
leaq 0x40(%r14), %rsi
leaq 0x40(%rbx), %rdi
callq 0x20a0
leaq 0x60(%r14), %rsi
leaq 0x60(%rbx), %rdi
callq 0x20a0
movl $0x80, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movl $0xa0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movl $0xc0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movups 0x220(%r14), %xmm0
movups %xmm0, 0x220(%rbx)
movups 0x230(%r14), %xmm0
movups %xmm0, 0x230(%rbx)
movups 0x240(%r14), %xmm0
movups %xmm0, 0x240(%rbx)
movl 0x250(%r14), %eax
movl %eax, 0x250(%rbx)
movups 0x258(%r14), %xmm0
movups %xmm0, 0x258(%rbx)
movq 0x268(%r14), %rax
movq %rax, 0x268(%rbx)
movups 0x270(%r14), %xmm0
movups %xmm0, 0x270(%rbx)
movups 0x280(%r14), %xmm0
movups %xmm0, 0x280(%rbx)
movups 0x290(%r14), %xmm0
movups %xmm0, 0x290(%rbx)
movups 0x2a0(%r14), %xmm0
movups %xmm0, 0x2a0(%rbx)
movups 0x2b0(%r14), %xmm0
movups %xmm0, 0x2b0(%rbx)
movups 0x2c0(%r14), %xmm0
movups %xmm0, 0x2c0(%rbx)
movl 0x2d0(%r14), %eax
movl %eax, 0x2d0(%rbx)
movups 0x1290(%r14), %xmm0
movups %xmm0, 0x1290(%rbx)
movups 0x12a0(%r14), %xmm0
movups %xmm0, 0x12a0(%rbx)
movl 0x12b0(%r14), %eax
movl %eax, 0x12b0(%rbx)
movups 0x1280(%r14), %xmm0
movups %xmm0, 0x1280(%rbx)
movups 0x12b8(%r14), %xmm0
movups %xmm0, 0x12b8(%rbx)
movups 0x12c8(%r14), %xmm0
movups %xmm0, 0x12c8(%rbx)
movq 0x12d8(%r14), %rax
movq %rax, 0x12d8(%rbx)
movq 0x12f4(%r14), %r12
movq %r12, 0x12f4(%rbx)
movq 0x1310(%r14), %rax
movq %rax, %xmm0
movq %rax, 0x1310(%rbx)
movq 0x1328(%r14), %r13
movq %r13, 0x1328(%rbx)
testl %r12d, %r12d
js 0xfc60
movl %r12d, %r15d
shlq $0x3, %r15
movq %r15, %rdi
movdqa %xmm0, (%rsp)
callq 0x2030
movq %rax, 0x1300(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20b0
movdqa (%rsp), %xmm0
movq %r13, %xmm1
movd %xmm0, %eax
testl %eax, %eax
js 0xfc9a
movl %eax, %r15d
shlq $0x3, %r15
movq %r15, %rdi
movdqa %xmm1, (%rsp)
callq 0x2030
movq %rax, 0x1318(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20b0
movdqa (%rsp), %xmm1
movd %xmm1, %eax
testl %eax, %eax
js 0xfcc5
movl %eax, %r15d
shlq $0x3, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x1330(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20b0
cmpq $0x0, 0x1300(%r14)
je 0xfd28
xorl %r13d, %r13d
pushq $0x20
popq %r15
movslq %r12d, %rax
cmpq %rax, %r13
jge 0xfd28
movq %r15, %rdi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1300(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x1300(%r14), %rax
movq (%rax,%r13,8), %rsi
movq 0x1300(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x20a0
incq %r13
movl 0x12f4(%r14), %r12d
jmp 0xfcd6
cmpq $0x0, 0x1318(%r14)
je 0xfd88
xorl %r12d, %r12d
pushq $0x20
popq %r15
movslq 0x1310(%r14), %rax
cmpq %rax, %r12
jge 0xfd88
movq %r15, %rdi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1318(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x1318(%r14), %rax
movq (%rax,%r12,8), %rsi
movq 0x1318(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x20a0
incq %r12
jmp 0xfd39
cmpq $0x0, 0x1330(%r14)
je 0xfde8
xorl %r12d, %r12d
pushq $0x20
popq %r15
movslq 0x1328(%r14), %rax
cmpq %rax, %r12
jge 0xfde8
movq %r15, %rdi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1330(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x1330(%r14), %rax
movq (%rax,%r12,8), %rsi
movq 0x1330(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x20a0
incq %r12
jmp 0xfd99
movslq 0x12f8(%r14), %r12
testq %r12, %r12
js 0xfe18
leaq (,%r12,8), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x1308(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20b0
movslq 0x1314(%r14), %r15
testq %r15, %r15
js 0xfe44
shlq $0x3, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x1320(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20b0
movslq 0x132c(%r14), %r15
testq %r15, %r15
js 0xfe70
shlq $0x3, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x1338(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20b0
cmpq $0x0, 0x1308(%r14)
je 0xfed3
xorl %r13d, %r13d
pushq $0x20
popq %r15
movslq %r12d, %rax
cmpq %rax, %r13
jge 0xfed3
movq %r15, %rdi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1308(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x1308(%r14), %rax
movq (%rax,%r13,8), %rsi
movq 0x1308(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x20a0
incq %r13
movl 0x12f8(%r14), %r12d
jmp 0xfe81
cmpq $0x0, 0x1320(%r14)
je 0xff33
xorl %r12d, %r12d
pushq $0x20
popq %r15
movslq 0x1314(%r14), %rax
cmpq %rax, %r12
jge 0xff33
movq %r15, %rdi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1320(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x1320(%r14), %rax
movq (%rax,%r12,8), %rsi
movq 0x1320(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x20a0
incq %r12
jmp 0xfee4
cmpq $0x0, 0x1338(%r14)
je 0xff93
xorl %r12d, %r12d
pushq $0x20
popq %r15
movslq 0x132c(%r14), %rax
cmpq %rax, %r12
jge 0xff93
movq %r15, %rdi
callq 0x2130
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x1338(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x1338(%r14), %rax
movq (%rax,%r12,8), %rsi
movq 0x1338(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x20a0
incq %r12
jmp 0xff44
movl 0x12f0(%r14), %eax
movl %eax, 0x12f0(%rbx)
movq 0x12e8(%r14), %rax
movq %rax, 0x12e8(%rbx)
movl 0x12e0(%r14), %eax
movl %eax, 0x12e0(%rbx)
movb 0x12e4(%r14), %al
movb %al, 0x12e4(%rbx)
movq 0x2b10(%r14), %rax
movq %rax, 0x2b10(%rbx)
movb 0x2b3c(%r14), %al
movb %al, 0x2b3c(%rbx)
movq 0x2b40(%r14), %rax
movq %rax, 0x2b40(%rbx)
movl 0x2b48(%r14), %eax
movl %eax, 0x2b48(%rbx)
movb 0x2b4c(%r14), %al
movb %al, 0x2b4c(%rbx)
movq 0x2b70(%r14), %rax
movq %rax, 0x2b70(%rbx)
movups 0x1558(%r14), %xmm0
movups %xmm0, 0x1558(%rbx)
movq 0x1568(%r14), %rax
movq %rax, 0x1568(%rbx)
movl 0x1570(%r14), %eax
movl %eax, 0x1570(%rbx)
movb 0x1574(%r14), %al
movb %al, 0x1574(%rbx)
movb 0x1575(%r14), %al
movb %al, 0x1575(%rbx)
movups 0x1578(%r14), %xmm0
movups %xmm0, 0x1578(%rbx)
movups 0x1588(%r14), %xmm0
movups %xmm0, 0x1588(%rbx)
movq 0x1598(%r14), %rax
movq %rax, 0x1598(%rbx)
movups 0x1340(%r14), %xmm0
movups %xmm0, 0x1340(%rbx)
movups 0x1350(%r14), %xmm0
movups %xmm0, 0x1350(%rbx)
movups 0x1360(%r14), %xmm0
movups %xmm0, 0x1360(%rbx)
movups 0x1370(%r14), %xmm0
movups %xmm0, 0x1370(%rbx)
movups 0x1380(%r14), %xmm0
movups %xmm0, 0x1380(%rbx)
movups 0x1390(%r14), %xmm0
movups %xmm0, 0x1390(%rbx)
movups 0x13a0(%r14), %xmm0
movups %xmm0, 0x13a0(%rbx)
movq 0x13b0(%r14), %rax
movq %rax, 0x13b0(%rbx)
movl 0x13b8(%r14), %eax
movl %eax, 0x13b8(%rbx)
movb 0x13bc(%r14), %al
movb %al, 0x13bc(%rbx)
movups 0x13c0(%r14), %xmm0
movups %xmm0, 0x13c0(%rbx)
movl 0x13d0(%r14), %eax
movl %eax, 0x13d0(%rbx)
movsd 0x13d8(%r14), %xmm0
movsd %xmm0, 0x13d8(%rbx)
movups 0x13e0(%r14), %xmm0
movups %xmm0, 0x13e0(%rbx)
movq 0x13f0(%r14), %rax
movq %rax, 0x13f0(%rbx)
movl 0x13fc(%r14), %eax
movl %eax, 0x13fc(%rbx)
movups 0x1400(%r14), %xmm0
movups %xmm0, 0x1400(%rbx)
movups 0x1410(%r14), %xmm0
movups %xmm0, 0x1410(%rbx)
movq 0x1420(%r14), %rax
movq %rax, 0x1420(%rbx)
movups 0x1428(%r14), %xmm0
movups %xmm0, 0x1428(%rbx)
movsd 0x1438(%r14), %xmm0
movsd %xmm0, 0x1438(%rbx)
movups 0x1440(%r14), %xmm0
movups %xmm0, 0x1440(%rbx)
movups 0x1450(%r14), %xmm0
movups %xmm0, 0x1450(%rbx)
movl $0x1470, %edi           # imm = 0x1470
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movl $0x1490, %edi           # imm = 0x1490
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movl $0x14b0, %edi           # imm = 0x14B0
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movups 0x14d0(%r14), %xmm0
movups %xmm0, 0x14d0(%rbx)
movb 0x14e0(%r14), %al
movb %al, 0x14e0(%rbx)
movq 0x14e4(%r14), %rax
movq %rax, 0x14e4(%rbx)
movb 0x14ec(%r14), %al
movb %al, 0x14ec(%rbx)
movb 0x14ed(%r14), %al
movb %al, 0x14ed(%rbx)
movb 0x14ee(%r14), %al
movb %al, 0x14ee(%rbx)
movsd 0x14f0(%r14), %xmm0
movsd %xmm0, 0x14f0(%rbx)
movups 0x1518(%r14), %xmm0
movups %xmm0, 0x1518(%rbx)
movl 0x14f8(%r14), %eax
movl %eax, 0x14f8(%rbx)
movl $0x2a0, %r15d           # imm = 0x2A0
cmpq $0x2a3, %r15            # imm = 0x2A3
je 0x10318
movq (%r14,%r15,8), %rax
testq %rax, %rax
je 0x10310
movq (%rbx,%r15,8), %r12
movups (%rax), %xmm0
movups %xmm0, (%r12)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%r12)
movl 0x18(%rax), %ecx
movl %ecx, 0x18(%r12)
movsd 0x20(%rax), %xmm0
movsd %xmm0, 0x20(%r12)
movq 0x28(%rax), %rcx
movq %rcx, 0x28(%r12)
movl 0x30(%rax), %ecx
movl %ecx, 0x30(%r12)
movb 0x48(%rax), %cl
movb %cl, 0x48(%r12)
movq 0x38(%r12), %rdi
movq 0x38(%rax), %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0x20e0
movq 0x40(%r12), %rdi
movq (%r14,%r15,8), %rax
movq 0x40(%rax), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x20e0
incq %r15
jmp 0x10292
movups 0x15a0(%r14), %xmm0
movups %xmm0, 0x15a0(%rbx)
movups 0x15b0(%r14), %xmm0
movups %xmm0, 0x15b0(%rbx)
movups 0x15c0(%r14), %xmm0
movups %xmm0, 0x15c0(%rbx)
movl 0x15d0(%r14), %eax
movl %eax, 0x15d0(%rbx)
movb 0x1854(%r14), %al
movb %al, 0x1854(%rbx)
movq 0x1898(%r14), %rax
movq %rax, 0x1898(%rbx)
movl 0x18a0(%r14), %eax
movl %eax, 0x18a0(%rbx)
movups 0x19e8(%r14), %xmm0
movups %xmm0, 0x19e8(%rbx)
movb 0x1a78(%r14), %al
movb %al, 0x1a78(%rbx)
movl $0x19f8, %eax           # imm = 0x19F8
leaq (%r14,%rax), %rcx
addq %rbx, %rax
movl $0x15d4, %edx           # imm = 0x15D4
leaq (%r14,%rdx), %rsi
addq %rbx, %rdx
movl $0x1614, %edi           # imm = 0x1614
leaq (%r14,%rdi), %r8
movq %r8, 0x20(%rsp)
addq %rbx, %rdi
movq %rdi, (%rsp)
movl $0x1714, %edi           # imm = 0x1714
leaq (%r14,%rdi), %r8
movq %r8, 0x10(%rsp)
addq %rbx, %rdi
movq %rdi, 0x18(%rsp)
movl $0x18a4, %r11d          # imm = 0x18A4
leaq (%r14,%r11), %r15
addq %rbx, %r11
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x104b2
movl 0x1858(%r14,%r12,4), %edi
movl %edi, 0x1858(%rbx,%r12,4)
movl 0x1878(%r14,%r12,4), %edi
movl %edi, 0x1878(%rbx,%r12,4)
movq %r12, %rdi
shlq $0x5, %rdi
movq 0x20(%rsp), %r8
addq %rdi, %r8
movl (%r8,%r12,4), %ebp
movq (%rsp), %r8
addq %rdi, %r8
leaq (%r8,%r12,4), %r13
movq 0x10(%rsp), %r8
addq %rdi, %r8
movl (%r8,%r12,4), %r8d
addq 0x18(%rsp), %rdi
leaq (%rdi,%r12,4), %r10
xorl %edi, %edi
cmpq $0x8, %rdi
je 0x1047d
movsd (%rcx,%rdi,2), %xmm0
movsd %xmm0, (%rax,%rdi,2)
movl (%rsi,%rdi), %r9d
movl %r9d, (%rdx,%rdi)
movl %ebp, (%r13)
movl %r8d, (%r10)
movl 0x240(%rsi,%rdi), %r9d
movl %r9d, 0x240(%rdx,%rdi)
addq $0x4, %rdi
jmp 0x10448
xorl %edi, %edi
cmpq $0x2, %rdi
je 0x10492
movl (%r15,%rdi,4), %r8d
movl %r8d, (%r11,%rdi,4)
incq %rdi
jmp 0x1047f
incq %r12
addq $0x10, %rcx
addq $0x10, %rax
addq $0x8, %rsi
addq $0x8, %rdx
addq $0x28, %r15
addq $0x28, %r11
jmp 0x103e9
movups 0x1a94(%r14), %xmm0
movups %xmm0, 0x1a94(%rbx)
movq 0x1ab8(%r14), %rax
movq %rax, 0x1ab8(%rbx)
movl 0x1a80(%r14), %eax
movl %eax, 0x1a80(%rbx)
movl 0x1a88(%r14), %eax
movl %eax, 0x1a88(%rbx)
movb 0x1a8c(%r14), %al
movb %al, 0x1a8c(%rbx)
movl 0x1a84(%r14), %eax
movl %eax, 0x1a84(%rbx)
movl 0x1a90(%r14), %eax
movl %eax, 0x1a90(%rbx)
movups 0x1aa8(%r14), %xmm0
movups %xmm0, 0x1aa8(%rbx)
movl $0x2ab0, %edi           # imm = 0x2AB0
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movl $0x2ad0, %edi           # imm = 0x2AD0
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x20a0
movl $0x2af0, %eax           # imm = 0x2AF0
leaq (%r14,%rax), %rsi
movq %rbx, %rdi
addq %rax, %rdi
callq 0x20a0
movl $0x542, %eax            # imm = 0x542
cmpq $0x556, %rax            # imm = 0x556
je 0x10572
movsd (%r14,%rax,8), %xmm0
movsd %xmm0, (%rbx,%rax,8)
incq %rax
jmp 0x1055a
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x2b80, %esi           # imm = 0x2B80
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x2210