Skip to content

Latest commit

 

History

History
executable file
·
29 lines (22 loc) · 1.05 KB

README.md

File metadata and controls

executable file
·
29 lines (22 loc) · 1.05 KB

Environment & setup

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

Unit tests of NanoCORE/ are inside NanoCORE/Tools/unit_tests/ and can be run with make test inside of NanoCORE/.

Style

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.