Giter VIP home page Giter VIP logo

sbncode's Introduction

SBN Code

This package contains code for SBN-wide simulation and analysis. This includes:

  • fcl: Production FHiCL configurations
  • sbncode: Common LArSoft modules and other utilities
  • env: Scripts to set up joint SBND/MicroBooNE/ICARUS environments (to be automated in future versions)

Cloning submodules

mrb gitCheckout should take care of git submodules if the origin repository is the default one, i.e. SBNSoftware. If sbncode is cloned from any repository other than the official one (SBNSoftware), git submodules need to be initalized after mrb gitCheckout with the following command:

$ git submodule update --init --recursive

sbncode's People

Contributors

brucehoward-physics avatar bzamorano avatar cjbacchus avatar dpmendez avatar etworcester avatar etyley avatar fernandapsihas avatar fjnicolas avatar gartung avatar gputnam avatar henrylay97 avatar hgreenlee avatar ikatza avatar jacoblarkin avatar jedori0228 avatar jzennamo avatar lgarren avatar luispelegrina avatar lynnt20 avatar marcodeltutto avatar mastbaum avatar miquelnebot avatar mroda88 avatar ooohu avatar petrilloatwork avatar temigo avatar vclannguyen avatar wesketchum avatar woodtp avatar yeonjaej avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbncode's Issues

SBNCode doesn't build standalone

Following the split of sbncode/sbnana I can't build sbncode on its own.

I'm getting a few errors like this:

[57/127] Building CXX object sbncode/sbncode/CAFMaker/CMakeFiles/CAFMaker.dir/FillFlashMatch.cxx.o
FAILED: sbncode/sbncode/CAFMaker/CMakeFiles/CAFMaker.dir/FillFlashMatch.cxx.o
/cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/g++  -DCAFMaker_EXPORTS -DNDEBUG -I/sbnd/app/users/icaza/work/sbncode/srcs -I/sbnd/app/users/icaza/work/sbncode/srcs/sbncode -Isbncode -I/cvmfs/larsoft.opensciencegrid.org/products/cppunit/v1_14_0/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/clhep/v2_4_1_2/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/cetlib_except/v1_04_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/sqlite/v3_26_00_00/Linux64bit+3.10-2.17/include -I/cvmfs/larsoft.opensciencegrid.org/products/tbb/v2019_3/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/hep_concurrency/v1_04_01/slf7.x86_64.e19.prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/cetlib/v3_10_00/slf7.x86_64.e19.prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/fhiclcpp/v4_11_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/messagefacility/v2_06_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/range/v3_0_4_0/include -I/cvmfs/larsoft.opensciencegrid.org/products/canvas/v3_09_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/root/v6_18_04d/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/larcoreobj/v09_01_00/include -I/cvmfs/larsoft.opensciencegrid.org/products/larcorealg/v09_00_02/include -I/cvmfs/larsoft.opensciencegrid.org/products/art/v3_05_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/canvas_root_io/v1_05_02/include -I/cvmfs/larsoft.opensciencegrid.org/products/art_root_io/v1_03_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/larcore/v09_01_00/include -I/cvmfs/larsoft.opensciencegrid.org/products/dk2nudata/v01_08_00g/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/nusimdata/v1_21_05/include -I/cvmfs/larsoft.opensciencegrid.org/products/lardataobj/v09_00_07/include -I/cvmfs/larsoft.opensciencegrid.org/products/lardataalg/v09_03_06/include -I/cvmfs/larsoft.opensciencegrid.org/products/postgresql/v9_6_11b/Linux64bit+3.10-2.17-p372/include -I/cvmfs/larsoft.opensciencegrid.org/products/fftw/v3_3_8a/Linux64bit+3.10-2.17-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/lardata/v09_01_09/include -I/cvmfs/larsoft.opensciencegrid.org/products/libwda/v2_28_0/Linux64bit+3.10-2.17/include -I/cvmfs/larsoft.opensciencegrid.org/products/larevt/v09_01_06/include -I/cvmfs/larsoft.opensciencegrid.org/products/marley/v1_1_1e/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/nutools/v3_07_05/include -I/cvmfs/larsoft.opensciencegrid.org/products/xerces_c/v3_2_2/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/nug4/v1_05_04/include -I/cvmfs/larsoft.opensciencegrid.org/products/genie/v3_00_06i/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/dk2nugenie/v01_08_00l/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/nugen/v1_10_12/include -I/cvmfs/larsoft.opensciencegrid.org/products/nurandom/v1_04_05/include -I/cvmfs/larsoft.opensciencegrid.org/products/log4cpp/v1_1_3b/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/larsim/v09_08_00/include -I/cvmfs/larsoft.opensciencegrid.org/products/eigen/v3_3_5/include/eigen3 -I/cvmfs/larsoft.opensciencegrid.org/products/larreco/v09_04_10/include -I/cvmfs/larsoft.opensciencegrid.org/products/nuevdb/v1_02_09/include -I/cvmfs/larsoft.opensciencegrid.org/products/lareventdisplay/v09_00_20/include -I/cvmfs/larsoft.opensciencegrid.org/products/larexamples/v09_00_19/include -I/cvmfs/larsoft.opensciencegrid.org/products/larana/v09_00_20/include -I/cvmfs/larsoft.opensciencegrid.org/products/protobuf/v3_11_2a/Linux64bit+3.10-2.17-e19/include -I/cvmfs/larsoft.opensciencegrid.org/products/tensorflow/v1_12_0c/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/trtis_clients/v19_11b/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/larrecodnn/v09_04_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/pandora/v03_16_00/Linux64bit+3.10-2.17-e19-prof/include -I/cvmfs/larsoft.opensciencegrid.org/products/larpandoracontent/v03_22_04/include -I/cvmfs/larsoft.opensciencegrid.org/products/larpandora/v09_04_01/include -I/cvmfs/larsoft.opensciencegrid.org/products/TRACE/v3_16_00/include -I/cvmfs/larsoft.opensciencegrid.org/products/artdaq_core/v3_06_03/include -I/cvmfs/sbnd.opensciencegrid.org/products/sbnd/sbnobj/v09_10_00/include -I/sbnd/app/users/icaza/work/sbncode/srcs/sbncode/sbncode/CAFMaker -I/cvmfs/larsoft.opensciencegrid.org/products/ifdhc/v2_5_7/Linux64bit+3.10-2.17-e19-p372-prof/inc -I/cvmfs/larsoft.opensciencegrid.org/products/ifdh_art/v2_10_07/slf7.x86_64.e19.prof/inc -isystem /cvmfs/larsoft.opensciencegrid.org/products/boost/v1_70_0/Linux64bit+3.10-2.17-e19-prof/include -g -gdwarf-4 -O3 -fno-omit-frame-pointer -std=c++98 -Werror -Wno-error=deprecated-declarations -pedantic -Wno-unused-local-typedefs -Wno-undefined-var-template -I /include/c++/v1 -std=c++17 -Wall -Werror=return-type -fPIC -MD -MT sbncode/sbncode/CAFMaker/CMakeFiles/CAFMaker.dir/FillFlashMatch.cxx.o -MF sbncode/sbncode/CAFMaker/CMakeFiles/CAFMaker.dir/FillFlashMatch.cxx.o.d -o sbncode/sbncode/CAFMaker/CMakeFiles/CAFMaker.dir/FillFlashMatch.cxx.o -c /sbnd/app/users/icaza/work/sbncode/srcs/sbncode/sbncode/CAFMaker/FillFlashMatch.cxx
In file included from /sbnd/app/users/icaza/work/sbncode/srcs/sbncode/sbncode/CAFMaker/FillFlashMatch.cxx:7:
/sbnd/app/users/icaza/work/sbncode/srcs/sbncode/sbncode/CAFMaker/FillFlashMatch.h:14:10: fatal error: sbnanaobj/StandardRecord/StandardRecord.h: No such file or directory
 #include "sbnanaobj/StandardRecord/StandardRecord.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

where crucially the path to StandardRecord.h is not included.

Inconsistent units of energy in CAFMaker

I've noticed that the units of energy whenever dealing with a truth quantity are in GeV, whilst reconstructed quantities; and actually maybe only rec.reco.slc.shw are in MeV.

Not a deal breaker, but it's a minor nuisance that seems unnecessary to me.

Document list of "standard" fcl files for SBN jobs

Make a nicely documented site for listing standard fcl files. Needs to have an avenue for being updated as needed, with as little maintenance that we can image.

Could also include "common configuration" set.

Wildcards in CMake causing ninja problems?

CI builds using ninja were failing, and could be fixed by removing wildcards from the cmake files (see branch feature/wketchum_NoWildcard). For now we'll have CI not use ninja, but in the future would be good to arrange things such that ninja can work (while also including everything properly).

Thanks to @vitodb and @cjbackhouse for talking through this.

Integrate CI Validation into pull-requests

When a pull-request is issued trigger a CI validation and have the results of that validation be reported back on the pull-request to enable a rapid validation of code changes

Improve FlashMatch error message

I got

%MSG-s ArtException:  FlashPredict:fmatchREDO@Construction  26-Mar-2021 08:33:46 CDT ModuleConstruction
cet::exception caught in art
---- FatalRootError BEGIN
  Fatal Root Error: TFile::TFile
  file name is not specified
  ROOT severity: 3000
---- FatalRootError END

which didn't give me very much to go on. It turns out the problem is I hadn't setup the sbnd_data product. It would be good to improve the message to something like

"the_flashmatch_file.root" not found in $FW_SEARCH_PATH

plus maybe some hint that this is likely about sbnd_data

Create a sbnobj repository

A repository sbnobj is needed hosting data products.
This issue is for the creation of the empty GIT/cetbuildtools based repository.

I think the dependencies should be either on lardataobj or with the same as nusimdata.

Consider a continuous integration test system for sbncode

A continuous integration system might be useful for sbncode itself.

We need to figure out what would be the content of the integration tests, which may be at different levels, e.g.:

  • no actual test, but just a way to make sure the code still compiles
  • minimal unit tests (e.g. for data products and libraries)
  • actual tests

Contact people for the infrastructure are @vitodb (SBND) and Vladimir Podstavkov.
Deciding on the content is to us.

sbncode is missing c7 builds

While testing SBND CI workflow using sbndcode from CVMFS, I found out that sbncode is missing the c7 build.
In the updated CI workflow the CI will build sbncode for c7 itself, so this is no more an issue for the CI, but users could still require it.

Bad Version: sbnobj 1.70.0 is less than minimum required version 1.50

Building icaruscode v09_15_00 I encountered the following CMake error:

CMake Error at /cvmfs/larsoft.opensciencegrid.org/products/cetbuildtools/v7_17_01/Modules/CheckUpsVersion.cmake:142 (message):
  Bad Version: sbnobj 1.70.0 is less than minimum required version 1.50
Call Stack (most recent call first):
  /cvmfs/larsoft.opensciencegrid.org/products/cetbuildtools/v7_17_01/Modules/FindUpsPackage.cmake:161 (_check_version)
  /cvmfs/sbn.opensciencegrid.org/products/sbn/sbncode/v09_15_00/slf7.x86_64.e19.prof/lib/sbncode/cmake/sbncodeConfig.cmake:192 (fi
nd_ups_product)
  /cvmfs/larsoft.opensciencegrid.org/products/cetbuildtools/v7_17_01/Modules/FindUpsPackage.cmake:38 (find_package)
  /cvmfs/larsoft.opensciencegrid.org/products/cetbuildtools/v7_17_01/Modules/FindUpsPackage.cmake:157 (_use_find_package)
  icaruscode/CMakeLists.txt:63 (find_ups_product)

I can't fully understand what's happening, but I drop here a point: as far as I know, specifying a minimum version in find_ups_products() macro (like in SBNSoftware/sbncode:CMakeLists.txt) is not necessary; now I find it actually deleterious.
I have solved it locally by checking out sbncode in my working area and removing version requirements.

P.S. That CMakeLists.txt appears to also be missing the inclusion of $ENV{ART_DIR}/Modules.

sbncode does not build standalone, it requires sbnobj to be checked out too

When one tries to build only sbncode the build crashes here:

/sbnd/app/users/jaz8600/ChrisTest/srcs/sbncode/sbncode/LArRecoProducer/CRTHitConverter_module.cc:22:10: fatal error: sbnobj/Common/CRT/CRTHit.hh: No such file or directory #include "sbnobj/Common/CRT/CRTHit.hh" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [sbncode/sbncode/LArRecoProducer/CMakeFiles/sbncode_LArRecoProducer_CRTHitConverter_module.dir/CRTHitConverter_module.cc.o] Error 1 make[1]: *** [sbncode/sbncode/LArRecoProducer/CMakeFiles/sbncode_LArRecoProducer_CRTHitConverter_module.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....

this is overcome by also checking out sbnobj, but it would be nice if that wasn't necessary.

Define CVMFS location(s) for common sbn software products

@cjbackhouse brought this up in a slack channel: we don't have an obvious place to put common SBN software productions, like a SBN CVMFS area? For the moment, can request to publish all areas, but we should define the proper area(s) for this as part of the repository restructuring.

Example CAF scripts do not run

The example scripts in anademo do not run. I get the following error:

/sbnd/app/users/etyley/cafs/localProducts_larsoft_v09_09_01_e19_prof/sbncode/v09_09_01/include//sbncode/CAFAna/Core/Var.h:12:10: fatal error: 'StandardRecord/Proxy/FwdDeclare.h' file not found
#include "StandardRecord/Proxy/FwdDeclare.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error in <ACLiC>: Dictionary generation failed!

Port file_size_ana

This is a useful tool. Fernanda has a working version that should be cleaned up and committed.

Set up more modern gdb and valgrind

setup gdb and setup valgrind get you much more modern versions of these tools than you get from the base OS, versions that actually work. We should give these to users by default, but it's not quite clear to me where to put this, since they can't strictly be said to be dependencies of any of our packages.

Reduce file sizes

Test and make configurations for reducing the overall file sizes.

CAF duplicated reco in slc missing information

The duplication of the trk and shw branches within the slc branch (added here) is incomplete as the shower energy and dEdx are not filled whilst they are filled in the original rec branch. The daughters branch is filled in neither the trk or shower branches.

shw.energy, shw.dEdx and FlatCAFs

We have a little bit of a mess with the flatcafs that needs to be straightened out.

Due to my oversight, convert_to_flat wasn't propagating the POT information until this morning, so Gray will have to remake the MCP2020A flatcaf file. Sorry!

While looking into doing that myself, I ran into a bit of a complication with reco.shw.energy. Due to the nested-vectors fiasco, this array was inaccessible straight from ROOT. One of the motivations for flatcafs is to get access to it, and things like it.

As a temporary workaround, Diana added 3 non-vector fields containing this information, and likewise with dEdx, and commented out the vector.

Unfortunately, this means that code running from develop expects these fields in Gray's file, which predates them. Even though they would be able to read just fine from the vector in the flatcaf. Similarly, convert_to_flat in development is going to choke on the absence of these fields. It would have to be run in whatever revision was used to make the original CAF. But the resulting file will still be hard to read from development.

I think the best solution is to reinstate the proper array, and also leave the individual variables in place, duplicating the information, alongside for now, and then regenerate CAFs and FlatCAFs. That gives all versions the best chance to access what they're expecting. If/when we wind up in a world where the flatcafs are universal then we can safely remove the duplicates.

Look into adopting some duneutil tools

NOvA originated some scripts, which are now also available in duneutil, which I think are very useful. Perhaps SBN already has equivalents, in which case please point me to them, but if not I think we should look into adopting these.

setup_fnal_security - takes care of getting all the various tickets you need to work with the grid, xrootd, etc. This is all very confusing, and the advice keeps changing, so having one script to do everything, that someone else maintains, is very useful.

samweb2xrootd - This is a combination of pnfs2xrootd (which SBN already has a version of as pnfsToXRootD from the larsoft product itself) and samweb locate-file. The upshot is you give it the filename of something in SAM, and it gives back an xrootd URL, allowing you to open the file in one step.

latest - finds the most recent version of a ups product and prints it in a form appropriate for passing to ups setup

cache_state.py - reports whether a file, or what fraction of a dataset, is available in cache vs only on tape

ack - this is a better (more code-focused) version of grep. https://beyondgrep.com/ This one is so good I have gone to the effort of installing it in my home directory (it's just a perl script).

There was talk of moving these to some more central larsoft location, but now that dune has its itch scratched I imagine there will be no further movement unless we start making requests.

Test issue

Testing automating add to project ...

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.