Difference between revisions of "CH Starting CODA & Reading CODA Data"

From New IAC Wiki
Jump to navigation Jump to search
Line 173: Line 173:
 
===='''ROOT Commands'''====
 
===='''ROOT Commands'''====
  
<big>'''These commands need to be updated for ease of use'''</big>
+
''<big>'''These commands need to be updated for ease of use'''</big>''
  
 
'''In the same terminal window as above:'''
 
'''In the same terminal window as above:'''

Revision as of 16:52, 19 May 2022

Current as of 8/26/21

Starting CODA and RCGUI

DAQ2 Startup Sequence

First open 7 different terminal windows with csh (tcsh) environment

Source CODA 2.6.2 TWICE in each with the following command (assuming you're in the home/daq/ directory)

source CODA/2.6.2/setup

Run each of the following commands in a different window

msqld
et_start
rcplatform

Then run the following two commands in different windows

coda_eb_rc3 -i -s DAQ -n eb1 -t CDEB
coda_er_rc3 -i -s DAQ -n LDS_ER -t ER

Next, SSH into the read out controller (rocdaq1)

ssh root@rocdaq1.physics.isu.edu
csh
source CODA/2.6.2/setup
coda_roc_rc3 -t ROC -n rocdaq1

In the last unused terminal window, start up the run control gui (RCGUI) with the following command

rcgui

Once the RCGUI has populated, select the configuration settings needed

  • Configuration->Cool
  • Select "PAA"
  • Click the Configure button (wrench & screwdriver icon on upper left)
  • Click the download button (floppy disk icon)
  • Click "Prestart" and then "Go" buttons

Error FAQ

Solid Green Light on Read Card in rocdaq1

The bottom right light in the read card in rocdaq1 is solid means rocdaq1 needs to be restarted. (VU Light)

Either use the terminal open in daq2 or a keyboard connected to rocdaq1 itself to enter

shutdown -r 0

This will restart rocdaq1 immediately. Then SSH back into it using the commands in the "Starting CODA" section above. Given that everything works correctly (lol), you should only have to choose your configuration in the RCGUI again and then be able to continue collecting data.

Discrepancy between run numbers

I see the following error message when I click pre start in CODA. Discrepancy between run numbers: Coda2 db = 4384 Cool db = 4385 CodaRcPrestart service aborted.


The fastest fix is to go to the "expert" menu un rcgui and choose Set Run Number for both databases.
This will resync the two databases.

CODA2 dp communication error

Restart the process "et_start"

rm /tmp/et_sys_DAQ
et_start

If et_start fails to restart with the following error message:

"ERROR: et_system_start, ET system process already exists!"

find the PID number with

 netstat -ap | grep et_start

, kill the process, then try again.

ERROR: Data not ready in event 12164121 evStored = 0

The above error started happening.

Its not a multiple TDC hit just before a DAQ trigger


The problem was the the TDC sopt pulse was too close to the 25 ns width limit. I increased it to 40 ns and the problem went away.

Lost connection to the platform

rcgui killed EB and ER because it "lost connection to the platform".

The above error happens intermittently.

I think this is because the host computers hard disk is failing. Ben has made an image of the current disk which we will transfer, OS and all, to a new disk to see if this error stops.


Can not find container_admin

2013/06/12 10:03:01 Component = eb1 Host = daq2.physics.isu.edu registered with the platform.

ControlDesigner ERROR :Can not find container_admin on the node daq2.physics.isu.edu

Cant connect to MSQL server

moved daq2 to the IAC. hardcoded the IP addresses to the names in /etc/hosts file to bypass DNS server

The ROC appears to still be unable to talk to the MSQL server running on daq2 because it is using daq2's old IP address event though it pings the right address through the /etc/hosts file. perhaps the MSQL server address is cardcoded somewhere?

[root@rocdaq1 /etc]# coda_roc_rc3 -t ROC -n rocdaq1 Connect: Connection timed out msql error : Can't connect to MSQL server on 134.50.3.130 Connect: Connection timed out MSQL_Cmd_Connect: error 'cause socket < 0 msql: Can't connect to MSQL server on 134.50.3.130

solution, the MSQL_HOME environmental variable was set to the IP address instead of the computer name

turn off the firewall

On CentOS 7 you use the command

systemctl status firewalld

to check the firewall status

to turn off the firewall

systemctl stop firewalld

Analyzing CODA Data Sets using ROOT

DAQ1

Commands

  • source ~/CODA/coda_scripts/setupCODA3.bash
  • source ~/src/ROOT/root-6.22.00/obj/bin/thisroot.sh
  • cd /data/
  • ~daq/CODA/CODAreader/ROOT_V6.22/PAA/evio2nt -fr####.dat > /dev/null
  • Since future me is probably just as dumb as I am now, the r####.dat is the dat file output from the event manager (should match what is in RCGUI)
  • Example: r7074.dat

DAQ2

Open one terminal window and run the following commands

source CODA/3.10/coda_scripts/setupCODA3.tcsh
source ~/src/ROOT/v6.20/builddir/bin/thisroot.csh

Remove the >/dev/null to have the data conversion print to the screen. Not recommended for large files.

~daq/CODA/CODAreader/ROOT_V6.22/PAA/evio2nt -fr####.dat >/dev/null

Processing the EVIO2NT file creates a .ROOT file in the /home/daq directory. I do a general sweep and move all files to the data directory which is a 1TB disk mounted to DAQ2 as bulk storage. If you have just converted the file from CODA to ROOT, then you will find it in /home/daq, if it's not there, check the /data/ directory.

cd /data/

ROOT Commands

These commands need to be updated for ease of use

In the same terminal window as above:

Open ROOT and attach the file you want to analyze

root -l r####.root

The following step is to draw a single plot for data taken through channel [9] of the ADC. If you want to overlay multiple runs, skip this step.

PAA->Draw("PADC.PADC785N[9]>>(4096,0,4096)")

If you using a detector, like a HPGe, which requires an energy calibration, click here for directions on how to make non-uniform binning and create plots using the created bin edges. That page also includes directions on how to add and subtract histograms, which will also be included below.

For multiple runs or more flexibility within ROOT framework.
new TBrowser();

Fill in the *** with whatever you want to name the object and change the Plot Title to your liking. 4096 is the number of channels in the ADC, which means the 4096, 0, 4096 arguments are present to create 4096 bins in x, ranging from a low 0 to a high of 4095. The following commands will create a histogram of ADC channel number v counts.

TH1F *** = TH1F("***","Plot Title",4096,0,4096);
PAA->Project("***","PADC.PADC785N[9]");
***.Draw();

To scale the run by runtime, find runtime in seconds and invert. I usually refer to this variable as the Time Factor. [math] TF = \frac{1}{runtime (s)}[/math]. Expect a small decimal.

***->Scale(Time Factor);

Scaling by the time factor causes ROOT to default to a different type of histogram, run the following command to re-plot your data with standard histogram format. The next command will redraw the histogram scaled by the time factor, creating an ADC channel number v count rate (Hz) histogram.

***->Draw("Hist");

At this point, you can use the file browser in the left hand side of the TBrowser window and open more root files. You may need to close and then open the directory you're working within to populate the root file you've opened. You can then navigate into that root file and see the trees present within, create more histograms using the steps presented above, and then add/subtract histograms using the following.

Once you have your (at least 2) histograms created within root, create a third to combine however many you please.

TH1F Third = TH1F("Third","Third Plot Title",4096,0,4096);

This step will add the first histogram to the currently empty third histogram you just created.

Third->Add(FirstPlot,1);

Next, you can add the second. When I do this, I'm usually doing a background subtraction of sorts to see the effect the addition/removal of a neutron converter. Note the "-1" in the second argument of the add command. Simply adding the negative of the second plot.

Third->Add(SecondPlot,-1);
Third->Draw("Hist");

Previous Page

CaGaS Phase II

PAS_Experiment