This page covers naming conventions, formatting, and static-analysis tools. Contributor-critical ROOT and persistence rules live in guide.md.
- Libraries: a folder named
AtFooproduces shared objectlibAtFoo - Classes: non-namespaced classes use the
Atprefix in CamelCase —AtBaseEvent,AtPSAMax,AtFitterTask - Namespaced code (e.g.,
EventFit::,kf::) omits theAtprefix
- Private and protected members:
fprefix + capital letter —fTrackID,fDriftVelocity - Boolean flags:
kprefix —kIsGood,kInitialized - Local variables and function parameters: no prefix, lowercase camelCase
Follow ROOT naming conventions:
- Getters:
GetXaxis()notGetXAxis()(avoid back-to-back capitals) - Setters:
SetThreshold() - Boolean queries:
IsValid(),HasHits()
Use ClassDef and ClassImp only for classes that need ROOT-generated class metadata or streamer support.
For reflection-only classes, prefer a -! LinkDef entry. Use + only for classes written to disk.
When a streamed class changes memory layout, increment the version number in ClassDef:
ClassDef(AtMyData, 2); // bump when adding/removing/reordering membersThe project uses clang-format-17 with the repo-root .clang-format.
Format one file:
clang-format-17 -i path/to/file.cxxFormat changed files:
scripts/formatAll.shThe repo also carries .clang-tidy configuration and CI checks for:
clang-formatclang-tidyiwyu
Run clang-tidy manually on a file:
clang-tidy path/to/file.cxx -- -I...For framework-specific contributor rules, use guide.md.