git clone https://github.com/cmstas/NanoTools
cd NanoTools/
cd /cvmfs/cms.cern.ch/slc6_amd64_gcc700/cms/cmssw/CMSSW_10_2_9/ ; cmsenv ; cd -
cd NanoCORE
make test -j12
cd ..
Unit tests of NanoCORE/
are inside NanoCORE/Tools/unit_tests/
and can be run with
make test
inside of NanoCORE/
.
We use clang-format
based on LLVM style to format our code. To format the ElectronSelections.cc
file in-place, do
clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, ColumnLimit: 120, AllowShortIfStatementsOnASingleLine: true, AllowShortBlocksOnASingleLine: true}" -i ElectronSelections.cc
Add this to the ~/.vimrc
and use vim
to code. (Assumes you are working on UAF)
autocmd BufNewFile,BufRead *.cc,*.h,*.C,*.cxx set formatprg=clang-format\ -style=\"{BasedOnStyle:\ llvm,\ IndentWidth:\ 4,\ ColumnLimit:\ 100,\ AllowShortIfStatementsOnASingleLine:\ true,\ AllowShortBlocksOnASingleLine:\ false,\ BreakBeforeBraces:\ Allman}\"
To format your code, press ggvGgq
.