User Tools


This is an old revision of the document!


The code I have converts the raw CAMAC data to ROOT. While it's potentially a nuisance to have to do this before other steps, I somewhat recommend against writing your own parser. Parsing the data requires knowledge of exactly what modules are in what slots, so a quickly written parser can almost as quickly become useless if modules end up getting shuffled around due to dead slots, bad modules, or other musical-chair-esque activities. I tried to write a parser where you simply provide a set of crates and their associated modules, and it does the rest. This of course depends on being synched up with the code that sets up the CAMAC command stack and how to read various modules, but I believe Craig and I made that synchronization a couple weeks ago.

The code is here:

http://www.phys.hawaii.edu/~kurtisn/software/2013-05-24_conversion_code.tar.gz

http://www.phys.hawaii.edu/~kurtisn/software/2013-05-28_conversion_code.tar.gz (Updated May 28, 2013)

If you need to make modifications, the primary place to look is in src/lib/CamacStructure.cpp. This is where you set up the crates and modules. In the future, this should migrate to a configuration file, but alas, I never had time to get that part going.

You can also add new configurations by adding #defines for different locations (e.g., CAMAC_SLAC_SCANNING, CAMAC_SLAC_CRT, CAMAC_ITOP). These are in src/lib/CAMAC.h.

Unfortunately, because the parser is linked with the CAMAC readout code, it does require the libxx_usb library that comes with the crate controller. This can be hacked away (one way, at least) by setting up #ifdefs that don't compile in the readout bits of the code under certain conditions. I can work on this if it's desirable. In the meantime, I would just compile libxx_usb and make sure the following files are in contrib/

libxx_usb.h libxx_usb.so libxxusb.so

Those files are in the tarball, but may not (/probably won't) work with your flavor of linux. In case they don't, a version (maybe not the most recent) of the source is here:

http://www.phys.hawaii.edu/~kurtisn/software/xxusb_3.15.tar.gz

I verified the following with the CAMAC conversion code:

1) I can convert the file 20130524_scrodAll/data/topcrt-laser-e000001r001408-f000.cmc to ROOT without crashing. 2) The trigger phase measurement seems to be in the second channel of the LeCroy 2228A in slot 18. Hopefully this is correct, as it looks like the flat distribution we've seen before. 3) The UnixTimeSec and UnixTimeMilliSec are acting as expected. From these, it looks like the readout rate is around 330 Hz.

And the following issue:

- The event number does not seem to be incrementing, ever. 1)

I'm trying to spot check other modules but I don't really know what I should be seeing out of them. Can you verify that the following is still the current configuration:

Station Module

——- ——

2 Kaizu ADC (12 ch)

4 Kaizu ADC (12 ch)

6 Kaizu ADC (12 ch)

8 Kaizu TDC (8 ch)

10 Kaizu TDC (8 ch)

12 Kaizu TDC (8 ch)

14 Kaizu TDC (8 ch)

16 LeCroy 3377 TDC (32 ch)

18 LeCroy 2228A TDC (8 ch)

21 Kaizu Scaler (12 ch)

22 Dataway Indicator (Not actually a readable module)

In particular, are the channel counts above right? I see many modules that have partially populated values, so I may be assuming the wrong number of channels. If any of them are wrong on my end I can fix it up immediately and send you a new version.

1)
Fixed in the updated version

Top