Skip to content

aminnj/NanoTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Environment & setup

cd /cvmfs/cms.cern.ch/slc6_amd64_gcc700/cms/cmssw/CMSSW_10_2_9/ ; cmsenv ; cd -
git clone https://github.com/cmstas/NanoTools
cd NanoTools/NanoCORE
make test -j12

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.