EVIO 4 CODA

From New IAC Wiki
Revision as of 17:23, 15 September 2014 by Foretony (talk | contribs) (→‎R1DC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

References

https://coda.jlab.org/wiki/index.php/Evio_-_CODA_Event_I/O_libraries

Download EVIO

EVIO 2.2

evio-2.2

cd CODA/evio/evio-2.2/

1.) set the environmental variable to tell the software where CODA is

setenv CODA_HOME /home/daq/CODA/evio/evio-2.2

setenv LD_LIBRARY_PATH $CODA_HOME/Linux-i686/lib/


2.) While in the directory evio-2.2 run scons to compile everything

scons

3.)

Linux-i686/bin/evio2xml ~/test.dat | less


4.) If you type

scons install

the programs will be moved to the CODA_HOME subdirectory under Linux-

CODAreader

A temporary system of converting CODA data files to ROOT files and analyzing them.

The programs are located in DAQ's subdirectory

/home/daq/CODA/CODAreader/ROOT_V5.30/R1DC


the program

evio2nt

is used to convert the raw CODA data file into a ROOT tree. Here is an example of the commands used

first setup the environmental variables (you only need to do this once at the beginning)

source ~/CODA/2.6.2/setup
source ~/src/root/root-5.34.00/bin/thisroot.csh

now execute the command

./evio2nt -f/home/daq/r3804.dat

the CODA data file located at /home/daq/r3804.dat will be used to generate the file

/home/daq/r3804

root will recognize the root file if you add the extension .root

mv /home/daq/r3804 /home/daq/r3804.root

You can now use root to look at the TDC hits with the commands

root -l /home/daq/r3804.root
R1DC->Draw("(evt.TDC1190[1])/10","abs(evt.TDC1190[121]-evt.TDC1190[123])<100");

the TDC time for channel 1 will be plotted in nanoseconds and a timing cut will require the 2 scintillator hits to be within 10 ns of eachother.

You can look at individual TDC hits using this ROOT file

R1DC->Draw("(evt.TDC1190[29])/10");
R1DC->Draw("(evt.TDC1190[31])/10");
R1DC->Draw("(evt.TDC1190[31]-evt.TDC1190[29])/10");


R1DC

A ROOT script is available to look at the hits graphically

you need to edit the file

R1DC.h

and set the root filename you wish to visualize. Look for lines in the code which resemble this

    TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/home/daq/r3804.root");
     if (!f || !f->IsOpen()) {
        f = new TFile("~/r3804.root");
 

change run number as needed.

after that you can begin visualization using the commands below

root -l
.L R1DC.C
R1DC t;
t.loop();

EVIO 4.0

Prereqs

sudo yum install {expat,libz}-devel

on DAQ2 i had 4.0 installed in

~/CODA/evio/evio-4.0

I set the environmental variable

export CODA_HOME ~/CODA/2.6.2


I ran scons to compile evio-4.0 in the subdirectory


libraries were installed in the subdirectory

/home/daq/CODA/evio/evio-4.0/src/2.6.2/Linux-i686/lib/

svn

On 4/12/12 EVIO was being distributed using SVN and only on a jlabX machine onsite

If you login to a jlab machine you can see the contents of the repository using the command

svn ls svn://phecda.jlab.org/daqfs/source/svnroot/

Check Out

svn co svn://phecda.jlab.org/daqfs/source/svnroot/evio-4.0

Compile evio library on CODA machine

evio-2.2

1.) set the environmental variable to tell the software where CODA is

setenv CODA_HOME /usr/local/coda/2.5

setenv LD_LIBRARY_PATH $CODA_HOME/Linux6-86

2.) While in the directory evio-2.0 run scons to compile everything

scons

3.) If you type

scons install

the programs will be moved to the CODA_HOME subdirectory under Linux-

Compile evio2xml

Compiling EVIO on my Mac

https://gemc.jlab.org/gemc/Support/Entries/2011/8/1_Step_by_Step.html


1.) downloading and trying to compile with scons

 scons: Reading SConscript files ...
EnvironmentError: No module named _md5:
  File "/Users/tforest/src/evio/evio-4.0/evio-4.0/SConstruct", line 36:
    env = Environment(ENV = {'PATH' : os.environ['PATH']})
  File "/opt/local/lib/scons-1.2.0/SCons/Environment.py", line 992:
    apply_tools(self, tools, toolpath)
  File "/opt/local/lib/scons-1.2.0/SCons/Environment.py", line 106:
    env.Tool(tool)
  File "/opt/local/lib/scons-1.2.0/SCons/Environment.py", line 1676:
    tool(self)
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/__init__.py", line 181:
    apply(self.generate, ( env, ) + args, kw)
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/default.py", line 40:
    for t in SCons.Tool.tool_list(env['PLATFORM'], env):
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/__init__.py", line 661:
    env)
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/__init__.py", line 549:
    return filter (ToolExists, tools)
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/__init__.py", line 548:
    return Tool(tool).exists(env)
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/__init__.py", line 95:
    module = self._tool_module()
  File "/opt/local/lib/scons-1.2.0/SCons/Tool/__init__.py", line 146:
    raise SCons.Errors.EnvironmentError, e

evio-ntmaker

http://clasweb.jlab.org/wiki/index.php/CLAS12_Software_Workshop_2012.10_Agenda#EVIO_to_ROOT_ntuple_program