Giter Site home page Giter Site logo

grsisort's Introduction

GRSISort

A lean, mean, sorting machine base on ROOT, used to analyze data from experiments at Triumf, ILL, iThemba, or HIL.

For Up-To-Date Information please Join the Analysis_User team.

There is a wiki! Use the link-> WIKI

To compile using a bash shell, execute source thisgrsi.sh in your terminal from the GRSISort Directory.

To avoid running this script every session, add the following to your ~/.profile or ~/.bash_profile:

source path-to-GRSISort/thisgrsi.sh

To compile using a .crsh or .tcsh shell replace the .sh with .csh in the commands above.

Warning: compiling in csh has been known to be an issue. Use sh if possible.

Once complete type make in the GRSISort directory

See also Setup Guide.


Running

For information on running GRSISort see Running-GRSISort.


Adding Documentation

Everybody is welcome to help and expand the wiki.

See Commenting Code for HTML for information about in-code documentation for the doxygen generated Reference Guide.

grsisort's People

Contributors

andrewmac1 avatar atlaffoley avatar bolaizol avatar cbray0 avatar dayates avatar dependabot[bot] avatar e-j-w avatar gdemand avatar grsiuser avatar jhenderson88 avatar jpore avatar k-raymond avatar lpgaff avatar mrdunlop avatar pcbend avatar r3dunlop avatar rbraid avatar sgillespie90 avatar smithjk avatar tammyzidar avatar tiguser avatar vinzenzbildstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grsisort's Issues

words.o

The words.o library needs to be compiled using a #if statement based on architecture, not platform. It has failed on an i386 Ubuntu machine. Maybe we just put a flag checking for 32-bit machines or change the startup to not say GRSI"Spoon" anymore?

Gain Matching

We need a gain matching script. This may eventually output odb style information for easy uploading to the odb.

TChannel thread safety

I think this is a potentially large issue. TChannel is used in multiple places in the code at both reading and writing points. We add channels when they do not exist and this could lead to multiple creations if multiple threads pass the if(!TChannel) statements before creation.

On top of this, the way I fixed TFragmentSelector involving TChannel is a temporary fix at best. It is very thread un-safe. It seems to me that the code in TFragmentSelector::Init() is broken and the map isn't being created at the very start.

Sym Links

Just throwing this out there. I think we can put the users directory into our list of includes on compilation rather than creating a symbolic link for the compilation of TSelector. The reason I say this is I don't think it will hurt what we are doing, and for some reason Sci Linux has been giving people problems with the automatic making of the symbolic links. I forget the exact problem (it's something that came up a few weeks ago and resurfaces yesterday although I wasn't there to do an actual diagnosis). I remember it either being permissions based or it's creating an invalid link. This is a trivial change so I'm leaving the decision up to you @pcbend because I don't know if it breaks a future plan of yours with the structure of the code.

Network packet 0xd

Chris has introduced a network packet type 0xd which will help us determine if we are losing events from the master filter to MIDAS. We have currently implemented this by reading in the word, and then moving on. We are thinking about putting this data word in the fragment as a non-tree-writable member and then recording the stats on it in the stats tree. However, if we would like to stay consistent with our MIDAS->Fragment everything gets converted standard, we should be writing this word to the tree. @pcbend, do you have any thoughts on whether we should do this or not?

HTML documentation

During my bored/down time I will plug away at HTML documentation commenting. I will try to stay on top of this with any code I generate in the future

Angular Correlations

We need to start thinking about how to implement angular correlations. I'm assuming we will be creating a TGriffin class which will contain all of the information about a griffin detector (position etc.) @pcbend let me know what you are thinking for this as you have spent time doing this in Tigress. I have maps etc. so if you let me know what the plan is, I can start implementing things this weekend.

HTML PATH

Hey Guys,
I got a "terminate called after throwing an instance of 'std::bad_alloc' " when running the code on the sample MIDAS file Ryan provided (https://github.com/r3dunlop/MidasFiles). Where in the code do you specify the RAM memory allocation. I can lower this for my needs. I'm running a 64-bit VM (2 cores) with 8GB of RAM.

image

tcsh/SciLinux

Csh is stupid and we shouldn't accommodate it... but it seems like every instance of it is behaving differently. Attempting to compile it on Evan's computer resulted in new errors. The main errors included weird PATH errors not seen when compiling on Andrew's computer. Both of these are virtual SciLinux machines (and I believe they are even the same vdi.

Also, the automatic symlink creation had strange behaviour. It placed random "?" symbols in the path. Manual creation of the symlink solved this problem. We may have to include this in the README, or figure out why this is happening on SciLinux/tcsh.

Fragment Tree Names

The fragment Tree for run00487_000.mid is being output as fragment00007_000.root. I'm heading to the cottage in about an hour, but when I get some time I will get around to fixing this.

Script to convert cal files to odb script

I don't like typing things in line-by-line 128 times...This script will take a cal file and write the odb setting script. Needs to be done by the next GRIFFIN experiment.

Screen Output logging

When there are many errors it might be nice to log them all in a .log file. I have been piping the output to my own .log file, but since grsisort wants to start a root session when it is done sorting, the pipe gets stuck in the file and I have no way to tell if the run is done. Maybe there is a way to push a .q into the command I'm using. Other options include: a flag that does not allow a root session to start. Another option is that we can create a flag and define a function (logprintf?) that does both a printf and fprintf of the same string of text.

Another issue I have found with the logging, and maybe there is an easy way to change this in most editors, is that unless i use vim, cat, or some other terminal based viewer, the escape characters make the output look like junk. Any suggestions on how we should proceed with this? I think a .log file of the terminal output is definitely something we should consider.

Autosort

The auto sort isn't 100% functional. I believe the way it is setup we have to pass the output fragment file to the InputRoot variables. Otherwise we need to type `grsisort -s file.mid file.root.

Changes to TDataParser

I will be slightly changing TDataParser to help DAQ debugging. This is going to involve commenting out the current method of assigning the master filter pattern and id and putting in a new one that parses the current single master filter word. I am creating an issue so that

  1. if I forget to undo my changes and push other things to the main code that everyone else knows what is going on when the sort code is "broken" for full GRIFFIN data
  2. I remind myself to fix it for the main code when we are done.

This is also going to lead to the creation of more filter vs detector number checks, as well as detector v detector coincidence histograms.

-s flag

This lets you sort on the fragment tree, but you are still put in the grsi environment after the sort finishes. This might be caused by the speedometer.

hists.root name

We need to change the name for the hosts file to be consistent with the original midas file name. I will fix this when I get a chance.

Error Logging

We should log the number of errors and output them to screen at the end of the run with a % of errors even on suppress_error flag.

Removing compilation of UserObj headers

As per Issue #51 , it would be useful to come up with a way to edit these codes and run grsisort without the need to re-compile. This might be done through TEnv, or CINT. This is not high priority but would be useful to have.

Event Building

The plan is to build events using the master filter ID and master filter pattern. If we have a map which calls the event based on the requested filter ID then this step should be trivial. I believe there is a map like this in the code already.

The last time I checked the filter was performing very poorly so we may not be able to test this yet. We should however, keep this as an important point to focus on.

Tigress library linking issue

I'll try to find the issue but @pcbender might have a quick fix to this..
Seems like libTigress isn't linking to TGRSIDetector properly.

rm TAnalysisTreeBuilder.o
 Now Compiling  main.o                               [OK]
 Now Compiling  grsisort                          [ERROR]
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `typeinfo for TGRSIDetectorData'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetector::ShowMembers(TMemberInspector&)'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorHit::TGRSIDetectorHit()'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorData::~TGRSIDetectorData()'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `typeinfo for TGRSIDetectorHit'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorHit::~TGRSIDetectorHit()'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorData::Streamer(TBuffer&)'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetector::~TGRSIDetector()'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `typeinfo for TGRSIDetector'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorHit::ShowMembers(TMemberInspector&)'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorHit::Streamer(TBuffer&)'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetector::TGRSIDetector()'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorData::TGRSIDetectorData()'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetector::Streamer(TBuffer&)'
/home/rdunlop/Programs/GRSISort/libraries/libTigress.so: undefined reference to `TGRSIDetectorData::ShowMembers(TMemberInspector&)'
collect2: error: ld returned 1 exit status
/home/rdunlop/Programs/GRSISort
mv: cannot stat ‘src/grsisort’: No such file or directory
make: *** [grsisort] Error 1

SCEPTAR Address Hack

We are hacking the TDataParser to change the SCEPTAR addresses to read out as 0x8*** rather than what they are doing now. We will need to fix this once the data format is corrected and the SCEPTAR events are read out of the 4G cards properly.

Html Autogen

I've basically got this working. Just going to clean up the THtml spew to the shell.

Source Data

I'm slowly writing a code that contains source data for access by scripts. This will be useful for efficiency, energy calibration, and possibly for other analysis scripts since I'm hoping that other nuclei can be added in later. It's only going to contain 60Co to start (2 strong peaks with intensities and energies). I'm currently thinking that this is going to be a compiled library that gets loaded in by the scripts that want to use it. If I do it this way should I make a Dictionary as well?

TAnalysisTreeBuilder Make File

I think there are files missing from the git such as the makefile, for the TAnalysisTreeBuilder library. This is the error I am receiving during compilation:

rm TKinematics.o TKinematicsDict.o TKinematicsDict.cxx
make[3]: *** No targets specified and no makefile found. Stop.
make[2]: *** [TAnalysisTreeBuilder] Error 2
make[1]: *** [TGRSIAnalysis] Error 2
make: *** [libraries] Error 2

The only file in the directory on the git is the TAnalysisTreeBuilder.cxx.

TH2D to .mat

There is a bug in the TH2D to .mat conversion utility that causes some events to be missed in the conversion. Don't currently know where the issue is as this code is fairly straight forward.

Radware Utils

The Old guys want some Radware utilities. The argument is that this will allow for root vs history checks of fitting functions. It will also allow us to use existing infrastructure while the new utilities are created. The most important utilities to have are:
-1D hist -> .spe
-2D hist-> .mat
The .mat one might seem silly but we have lifetime fitting codes that read in matrices and process them accordingly, and yes this is the easiest way to deal with it in RadWare life.

TECal class

A TECal class is being added for Energy, and Efficiency calibration purposes.

Change to TDataParser for testing

Most SCEPTAR events are coming with an 0xefffffff trailer. We are changing the if(value == ChannelId) condition in TDataParser to if(true). We will need to fix take this out once the 4G cards are working properly.

HTML Generator

I added an html documentation generator. It's about as basic as it gets. The current problem I'm having is that the script has to be run from the GRSISYS top level directory as

.x util/html_generator(). 

I would like to be able to make this smarter and not require us to run it from a specific directory.

Error when compiling TGRSIintDict.cxx

Hey @r3dunlop I just installed a new 64 bit OS on my laptop but can't compile the code. Is this because I'm just missing some common packages with this fresh install?

alaffole@Xenu ~/Programs/GRSISort $ make
Compiling on Linux
Now Compiling TGRSIint.o [OK]
Now Compiling TGRSIintDict.cxx [ERROR]
Error: cannot open file "gnu/stubs.h" /usr/include/features.h:399:
Error: cannot open file "bits/wchar.h" /usr/include/stdint.h:27:
Error: cannot open file "bits/wordsize.h" /usr/include/stdint.h:28:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
!!!Removing TGRSIintDict.cxx TGRSIintDict.h !!!
Error: rootcint: error loading headers...
/home/alaffole/Programs/GRSISort
Now Compiling TGRSIintDict.o [ERROR]
g++: error: TGRSIintDict.cxx: No such file or directory
g++: fatal error: no input files
compilation terminated.
/home/alaffole/Programs/GRSISort
Now Compiling TGRSIOptions.o [OK]
Now Compiling TGRSIOptionsDict.cxx [OK]
Now Compiling TGRSIOptionsDict.o [OK]
Now Compiling libTGRSIint.so [ERROR]
g++: error: TGRSIintDict.o: No such file or directory
/home/alaffole/Programs/GRSISort
cp: cannot stat ‘libTGRSIint.so’: No such file or directory
make[2]: *** [libTGRSIint.so] Error 1
rm TGRSIOptionsDict.cxx
make[1]: *** [TGRSIint] Error 2
make: *** [libraries] Error 2

Link to plone for data words

Hey Ryan,

Just wondering if you can put up a link to the words meanings on here, so when we look at the errors I can see what they are or find them easily.

Cheers,
Andrew

HTML documentation and vector<string>

I haven't 100% confirmed this but I'm fairly sure the reason I cannot generate documentation for TGRSIInt and TGRSILoop is that they both make calls to TGRSIOption fields of type std::vector<std::string> . When I load the shared object library through gSystem in order to generate this documentation it dies on these fields. I don't think it's critical at this point to get them into the documentation, it's just that if this is the problem it might make sense for us to use TStrings in the future to get everyone playing nicely.

Compiled Utilities

I think it would be worth compiling the compiled utilities such as Root2Rad using the main make file and then sending the binary to the bin directory.

Run 800 errors?

I just tried sorting the test midas file Ryan provided and accidentally forgot to use the suppress_error flag. Turns out that every event contains an error. Is this an issue on my end? I've only noticed 2 different types of error.

errors

Fitting Functions

I think it would eventually be worthwhile to put a library of fitting functions into the code so that we can load them in and use them anywhere else in the analysis code. This is not priority, I am just putting ideas in here as they come to me; an online lab book if you will.

mnemonic warnings

I'm getting warnings during compilation from every file that uses Globals.h from the PrintMNEMONIC function. The line in question is:

    printf("======MNEMONIC 0x%08x======\n");

The problem is that there is a format specifier but no variables being written. I'm assuming that the plan is to put the address in this print statement?

Auto-efficiency script

I'm working on an auto-efficiency calibration script. It currently uses TSpectrum and auto-finds, and fits peaks. Just have to iron out a few wrinkles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.