# DAQ Package Code Organization
###### tags: `Software Management` `DAQ` `DUNE`
## Package Structure
```
dingpf@docker-bd:~$ tree dune-daq-template/
dune-daq-template/
├── apps
│ ├── CMakeLists.txt
│ └── dune-daq-template.cc
├── CMakeLists.txt
├── doc
│ └── html
│ ├── annotated.html
│ ...
│ ...
├── include
│ └── dune-daq-template
│ ├── Bar.hh
│ └── Foo.hh
├── README.md
├── scripts
├── src
│ └── CMakeLists.txt
│ ├── Bar.cc
│ ├── Foo.cc
│ └── PrivateHeader.hh
├── test
│ └── CMakeLists.txt
└── unittest
├── CMakeLists.txt
├── bar_test.cc
├── foo_test.cc
└── main_test.cc
10 directories, 100 files
```
* Public headers go to `include/package_name`;
* Private headers should be kept with source files under `src`;
* Files in `src` are compiled into a share library;
* Source files for binary executables are in `apps`;
* Doxygen-generated html files go to `doc/html`;
* Any further documentation goes to `doc`;
* Package level `README.md` is stored in the package's root directory;
* `.clang-format` is going to be stored into another place which will be shared by all packages.
## Package Name
* Contain only **English alphanumeic characters and dash**;
* Always use **lower case** as much as possible;
* Use underscores or dashes to separate words for easy readling.
## Filenames
==Different from google C++ style guide==
* Contain only **English alphanumeic characters, dash or period**;
* No spaces or funny characters are allowed;
* C++ header files should have the suffix `.hh` (`.cc` for source files);
* C header files should have the suffix `.h` (`.c` for source files.
* Public headers and their implementation source files should use **`UpperCamelCase`**;
* Initials and acronyms should be capitalized, longer (>2 letter) acronyms can also be treated as words;
* Use underscores or dashes to separate words for easy readling;
* put `_test` **after** filename for unit test files.