HOME ESR EXPERIMENTS LABS etc
E121 E127 E132 E125 E143 laser_cooling_2021 E142 Ê128 E146 E0052 E0018 E0028 E0038
  Bound beta decay experiment on Tl-205  Not logged in ELOG logo
Message ID: 10     Entry time: Wed Jun 26 16:20:31 2019
Author: Jan 
Category: DAQ 
Subject: unpacker: lmd > root 
I have written an unpacker for the lmd data taken with the current daq-system for E121.
The crate configuration is as follows:
ADC1 channels 1-32 (Caen 785)
ADC2 channels 1-32 (Caen 785)
ADC3 channels 1-32 (Caen 785)
SCALER channels 1-32 (Caen 830)

The unpacker binary can be found here
/u/litv-exp/unpacker/unpackexps/E121/E121

The current spec file is attached.

To convert lmd-files to root-files, please use it as follows:
litv-exp@lxg___: E121_unpacker /path/to/file.lmd --ntuple=RAW,/path/to/new_file.root
Attachment 1: E121.spec  769 Bytes  Uploaded Wed Jun 26 17:36:18 2019  | Hide | Hide all
// -*- C++ -*-

ADC(start)
{
	MEMBER(DATA12 data[32]);

	list(0 <= ch < 32)
	{
		UINT32 item NOENCODE
		{
			0_15: channel;
			16_27: value;
			28_31: 0;

			ENCODE(data[channel - start], (value=value));
		}
	}
}

SCALER(start)
{
	MEMBER(DATA32 data[32]);

	list(0 <= ch < 32)
	{
		UINT32 high NOENCODE
		{
			0_15: channel;
			16_31: value;
		}

		UINT32 low NOENCODE
		{
			0_15: channel;
			16_31: value;

		}

		ENCODE(data[(high.channel / 2) - start], (value=(high.value << 16) | low.value));
	}
}



SUBEVENT(ESR)
{
      adc[0]   = ADC(start = 0);
      adc[1]   = ADC(start = 32);
      adc[2]   = ADC(start = 64);
      select optional {
				scaler[0] = SCALER(start = 0x100);
			}
}

EVENT
{
 esr		= ESR(type = 10, subtype = 1);
}

#include "det_mapping.hh"

Attachment 2: det_mapping.hh  316 Bytes  Uploaded Wed Jun 26 17:37:10 2019  | Hide | Hide all
SIGNAL(	ADC1_1, esr.adc[0].data[0],
	ADC1_32, esr.adc[0].data[31], DATA12);
SIGNAL( ADC2_1, esr.adc[1].data[0],
	ADC2_32, esr.adc[1].data[31], DATA12);
SIGNAL( ADC3_1, esr.adc[2].data[0],
	ADC3_32, esr.adc[2].data[31], DATA12);
//SIGNAL( SC_1, esr.scaler[0].data[0],
//        SC_32, esr.scaler[0].data[31],DATA32);
ELOG V3.1.5-fc6679b