diff --git a/.cmake-format.py b/.cmake-format.py index 9827eecd329c4..ae092bc09f363 100644 --- a/.cmake-format.py +++ b/.cmake-format.py @@ -66,12 +66,6 @@ "HEADERS": '*', } }, - "o2_target_man_page": { - "kwargs": { - "NAME": '+', - "SECTION": '*', - } - }, "add_root_dictionary": { "kwargs": { "LINKDEF": '+', diff --git a/Algorithm/CMakeLists.txt b/Algorithm/CMakeLists.txt index b245562c7cc93..ed7a42a96e528 100644 --- a/Algorithm/CMakeLists.txt +++ b/Algorithm/CMakeLists.txt @@ -11,9 +11,6 @@ o2_add_header_only_library(Algorithm INTERFACE_LINK_LIBRARIES O2::Headers) -o2_target_man_page(Algorithm NAME Algorithm SECTION 3) -o2_target_man_page(Algorithm NAME algorithm_parser SECTION 3) - o2_add_test(o2formatparser SOURCES test/o2formatparser.cxx COMPONENT_NAME Algorithm diff --git a/Algorithm/doc/Algorithm.3.in b/Algorithm/doc/Algorithm.3.in deleted file mode 100644 index eaf618ee68da2..0000000000000 --- a/Algorithm/doc/Algorithm.3.in +++ /dev/null @@ -1,12 +0,0 @@ -.\" Alice O2 manpage for module Algorithm -.TH "AliceO2" 3 "17 Jan 2017" "1.0" "Algorithm man page" - -.SH NAME -AliceO2 - module -.B Algorithm - -.SH DESCRIPTION -A collection of generic algorithms for Alice O2 - -.SH SEE ALSO -algorithm_parser(3) diff --git a/Algorithm/doc/algorithm_parser.3.in b/Algorithm/doc/algorithm_parser.3.in deleted file mode 100644 index 98f45df279669..0000000000000 --- a/Algorithm/doc/algorithm_parser.3.in +++ /dev/null @@ -1,135 +0,0 @@ -.\" Alice O2 manpage for parser algorithms -.TH "AliceO2" 3 "17 Jan 2017" "1.0" "Algorithm Parser man page" - -.SH NAME -AliceO2 - module -.B Algorithm -- data parsers - -.SH SYNOPSIS -.B ForwardParser< -.I SomeHeaderType -, -.I SomeTrailerType -.B > - -.B ReverseParser< -.I SomeHeaderType -, -.I SomeTrailerType -.B > - -.SS Public types -.TP 2 -// a compound of header, data, and trailer -.B struct FrameInfo { - using PtrT = const PayloadType*; - const HeaderType* header = nullptr; - const TrailerType* trailer = nullptr; - PtrT payload = nullptr; - size_t length = 0; - -.B }; - -.TP 2 -.B using CheckHeaderFct = std::function; -alias for callback checking the header, return true if the object is a valid header -.TP 2 -.B using CheckTrailerFct = std::function; -alias for callback checking the trailer -.TP 2 -.B using GetFrameSizeFct = std::function; -alias for callback to get the complete frame size including header, trailer and the data -.TP 2 -.B using InsertFct = std::function; -function callback to insert/handle one frame into, sequentially called for all frames if the whole block has a valid format - -.SS Public member functions -.TP 2 -.B template -.B int parse(const InputType* \fIbuffer\fB, size_t \fIbufferSize\fB, CheckHeaderFct \fIcheckHeader\fB, CheckTrailerFct \fIcheckTrailer\fB, GetFrameSizeFct \fIgetFrameSize\fB, InsertFct \fIinsert\fB) - -.SS Public member variables -.TP 2 -.B static const size_t headOffset = typesize::size; -the length offset due to header -.TP 2 -.B static const size_t tailOffset = typesize::size; -the length offset due to trailer -.TP 2 -.B static const size_t totalOffset = headOffset + tailOffset; -total length offset due to header and trailer - -.SH DESCRIPTION -Template utilities for parsing of data sequences. Each entry in the sequence consist of a header, variable payload, and optionally a trailer. The three parts are collected in the FrameInfo structure for every entry. - -Callback functions for checking header and trailer integrity, getting length of the current frame and handling of a frame. - -.SS ForwardParser -The size is expected to be part of the header, parsing starts at beginning of buffer. -Trailer type can be void, which is also the default template parameter. That -allows to define a frame consisting of only header and data. - -.SS ReverseParser -The size is expected to be part of the trailer, the parsing is thus in reverse direction. Also the insert callback is called with the entries starting form the end of the buffer. -An easy extension can be to reverse the order of the inserts, meaning that the entries are read from the beginning. - -.SH EXAMPLES -.SS ReverseParser example -.EX -using SomeParser = ReverseParser; -SomeParser parser; -std::vector frames; -parser.parse(ptr, size, - [] (const typename SomeParser::HeaderType& h) { - // check the header - return true; - }, - [] (const typename SomeParser::TrailerType& t) { - // check the trailer - return true; - }, - [] (const typename SomeParser::TrailerType& t) { - // get the size of the frame including payload - // and header and trailer size, e.g. payload size - // from a trailer member - return t.payloadSize + SomeParser::totalOffset; - }, - [&frames] (typename SomeParser::FrameInfo& info) { - frames.emplace_back(info); - return true; - } - ) -.EE - -.SS ForwardParser example with frame consisting of header and payload -.EX -using SomeParser = ForwardParser; -SomeParser parser; -std::vector frames; -parser.parse(ptr, size, - [] (const typename SomeParser::HeaderType& h) { - // check the header - return true; - }, - [] (const typename SomeParser::HeaderType& h) { - // get the size of the frame including payload - // and header and trailer size, e.g. payload size - // from a header member - return h.payloadSize + SomeParser::totalOffset; - }, - [&frames] (typename SomeParser::FrameInfo& info) { - frames.emplace_back(info); - return true; - } - ) -.EE - -.SH BUGS, CONTRIBUTIONS -Please add an issue to -.UR https://github.com/AliceO2Group/AliceO2/issues -.UE - -.SH SEE ALSO -.UR https://github.com/AliceO2Group/AliceO2/blob/dev/Algorithm/include/Algorithm/Parser.h -.UE diff --git a/CMakeLists.txt b/CMakeLists.txt index b71d05175e9e9..adecffc0f4dbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,6 @@ include(O2AddTestRootMacro) include(O2ReportNonTestedMacros) include(O2TargetRootDictionary) include(O2DataFile) -include(O2TargetManPage) include(O2AddWorkflow) include(O2SetROOTPCMDependencies) include(O2AddHipifiedExecutable) @@ -117,10 +116,6 @@ endif() add_subdirectory(config) -add_custom_target(man ALL) -o2_target_man_page(man NAME o2) -o2_target_man_page(man NAME FairMQDevice) - # Testing and packaging only needed if we are the top level directory if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) # Documentation diff --git a/Examples/Ex5/CMakeLists.txt b/Examples/Ex5/CMakeLists.txt index 3951709a8a050..f6216bcebdad2 100644 --- a/Examples/Ex5/CMakeLists.txt +++ b/Examples/Ex5/CMakeLists.txt @@ -12,5 +12,3 @@ o2_add_executable(ex5 SOURCES src/run.cxx COMPONENT_NAME example TARGETVARNAME targetName) - -o2_target_man_page(${targetName} NAME ex5 SECTION 7) diff --git a/Examples/Ex5/doc/ex5.7.in b/Examples/Ex5/doc/ex5.7.in deleted file mode 100644 index 5d346f7f4798d..0000000000000 --- a/Examples/Ex5/doc/ex5.7.in +++ /dev/null @@ -1,62 +0,0 @@ -.\" Manpage for ex5. - -.\" this file gives some basic introduction on how to use the -.\" roff format to write man pages -.\" NOTE: all formatting commands start with a dot and must be -.\" at the beginning of the line - -.\" the header section -.TH AliceO2 1 "07 July 2019" "1.0" "ex5 man page" - -.\" .SH starts a new section, NAME is the first section -.SH NAME - -ex5 - A simple example for AliceO2 submodules - -.\" next is the SYNOPSIS section -.SH SYNOPSIS - -.\" some bold formatted text -.B ex5 -.\" alternate between roman and bold font, separated by blank, i.e. the -.\" square backets in roman and the option in bold -.RB [ --someoption ] -.\" same here, in addition, the dots indicating the argument string are in -.\" italic. Note: the quoted " [" makes sure there is a blank -.RB [ --debug " [" --gdb=\fI...\fR ]] -.\" italic formatting (underline in man) -.I mandatory_argument -.\" alternate roman and italic -.RI [ further_arguments... ] - - -.SH DESCRIPTION - -ex5 is an example to demonstrate the AliceO2 cmake setup of -modules. This document illustrates creation of man pages. All options and -arument are pure fictive. - -.SH OPTIONS - -.\" indented paragraph with label, indentation is set to the optional number -.TP 5 -.B --someoption -This is a fancy option of the example. - -.TP 5 -.B --debug -Run everything with debugging options - -.TP 5 -.B --gdb=\fI...\fR -Add additional information to run with gdb - -.SH SEE ALSO - -ex5(1) - -http://gnustep.made-it.com/man-groff.html - -.SH BUGS - -No known bugs diff --git a/cmake/O2TargetManPage.cmake b/cmake/O2TargetManPage.cmake deleted file mode 100644 index 5d29447c52536..0000000000000 --- a/cmake/O2TargetManPage.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 2019-2020 CERN and copyright holders of ALICE O2. -# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -# All rights not expressly granted are reserved. -# -# This software is distributed under the terms of the GNU General Public -# License v3 (GPL Version 3), copied verbatim in the file "COPYING". -# -# In applying this license CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. - -include_guard() - -# Generate a man page -# -# Make sure we have nroff. If that is not the case we will not generate man -# pages -find_program(NROFF_FOUND nroff) - -function(o2_target_man_page target) - if(NOT NROFF_FOUND) - return() - endif() - cmake_parse_arguments(PARSE_ARGV - 1 - A - "" - "NAME;SECTION" - "") - - # check the target exists - if(NOT TARGET ${target}) - # try with out naming conventions - set(baseTargetName ${target}) - o2_name_target(${baseTargetName} NAME target) - if(NOT TARGET ${target}) - # not a library, maybe an executable ? - o2_name_target(${baseTargetName} NAME target IS_EXE) - if(NOT TARGET ${target}) - message(FATAL_ERROR "Target ${target} does not exist") - endif() - endif() - endif() - - if(NOT A_SECTION) - set(A_SECTION 1) - endif() - if(NOT A_NAME) - message( - FATAL_ERROR - "You must provide the name of the input man file in doc/.
.in" - ) - endif() - if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/${A_NAME}.${A_SECTION}.in) - message( - FATAL_ERROR - "Input file ${CMAKE_CURRENT_SOURCE_DIR}/doc/${A_NAME}.${A_SECTION}.in does not exist" - ) - endif() - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${A_NAME}.${A_SECTION} - MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/doc/${A_NAME}.${A_SECTION}.in - COMMAND nroff - -Tascii - -man - ${CMAKE_CURRENT_SOURCE_DIR}/doc/${A_NAME}.${A_SECTION}.in - > - ${CMAKE_CURRENT_BINARY_DIR}/${A_NAME}.${A_SECTION} - VERBATIM) - # the prefix man. for the target name avoids circular dependencies for the man - # pages added at top level. Simply droping the dependency for those does not - # invoke the custom command on all systems. - set(CUSTOM_TARGET_NAME man.${A_NAME}.${A_SECTION}) - add_custom_target(${CUSTOM_TARGET_NAME} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${A_NAME}.${A_SECTION}) - add_dependencies(${target} ${CUSTOM_TARGET_NAME}) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${A_NAME}.${A_SECTION} - DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man${A_SECTION}) -endfunction() diff --git a/doc/CMakeInstructions.md b/doc/CMakeInstructions.md index c4f55140f611c..e0438c985c41d 100644 --- a/doc/CMakeInstructions.md +++ b/doc/CMakeInstructions.md @@ -349,24 +349,6 @@ Note as well that some (very few) tests are ran only for some configurations ctest -C RelWithDebInfo ``` -#### [Ex5](../Examples/Ex5) Adding a man page - -If a module provides one or more executables, it might be of interest for the users of those executables to have access to a man page for them. Ex5 illustates that use case. - - . - ├── CMakeLists.txt - ├── README.md - ├── doc - │   └── ex5.7.in - └── src - └── run.cxx - -The [man page](ManPages.md) is created using : - - o2_target_man_page([targetName] NAME ex5 SECTION 7) - -where `NAME xx` refers to a file `doc/xx.[SECTION].in`, and the actual `targetName` can be found from the base target name (ex5 in that case) using the [o2_name_target](../cmake/O2NameTarget.cmake) function. - ## CTest In the build directory of O2, if you launch the `ctest` command, all the O2 tests will be ran, which is not always what you want/need, in particular during development. diff --git a/doc/FairMQDevice.1.in b/doc/FairMQDevice.1.in deleted file mode 100644 index 4e33e3379ae82..0000000000000 --- a/doc/FairMQDevice.1.in +++ /dev/null @@ -1,64 +0,0 @@ -.\" Manpage for general FairMQ device properties and options. -.TH AliceO2 1 "10 Apr 2022" "1.1" "FairMQ device man page" -.SH NAME -fair::mq::Device - The basis for software devices in O2 - -.SH SYNOPSIS -.I deviceapp -.BI --id deviceid -.BI --mq-config " configfile" -| -.BI --channel-config " config" -| -.BI --config-json-string " arg" -| -.BI --config-xml-string " arg" - -.SH DESCRIPTION -All AliceO2 devices derive from fair::mq::Device which provides the -transport functionality. - -.SH OPTIONS -.SS Common FairMQ device options -.TP 2 -.BI --id " id" -A unique identifier of the device -.TP 2 -.BI --verbosity " arg " \fR(=DEBUG) -.RS -Verbosity level : -.B TRACE -.B DEBUG -.B RESULTS -.B INFO -.B WARN -.B ERROR -.B STATE -.B NOLOG -.RE - -.SS FairMQ device channel configuration -.TP 2 -.BI --config-xml-string " arg " -XML input as command line string. -.TP 2 -.BI --config-json-string " arg " -JSON input as command line string. -.TP 2 -.BI --mq-config " arg " -JSON/XML input as file. The configuration object will check xml or -json file extention and will call the json or xml parser accordingly -.TP 2 -.BI --channel-config " args " -channel configuration as comma separated key=\fIvalue\fR pairs -.RS -Valid Keys: -.B name -.B type -.B method -.B address -.B property -.RE - -.SH MORE OPTIONS -Use '\fIdeviceapp\fR --help' to get a full list of options. diff --git a/doc/ManPages.md b/doc/ManPages.md deleted file mode 100644 index 8fb7b48b07beb..0000000000000 --- a/doc/ManPages.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Man Pages - -You can create man pages in nroff format under: - - Subsystem/Module/docs/.
.in - -and it will create a man page for you in: - - ${CMAKE_BINARY_DIR}/stage/share/man/man
- -if you add: - - o2_target_man_page(target NAME SECTION
) - -to your `CMakeLists.txt`. Note the man page is "attached" to a given target. -If `SECTION` is omitted it will default to 1 -(executables). For more informantion about nroff format you can look at: - - http://www.linuxjournal.com/article/1158 diff --git a/doc/o2-timeframe-file-format.1.in b/doc/o2-timeframe-file-format.1.in deleted file mode 100644 index df36ff7256e33..0000000000000 --- a/doc/o2-timeframe-file-format.1.in +++ /dev/null @@ -1,27 +0,0 @@ -.\" Manpage for O2. -.TH man 1 "19 May 2017" "1.0" "Alice O2 Timeframe Format" - -.SH DESCRIPTION - -O2 is Alice next generation software framework to be used for RUN3. This is a -quick desctiption of the timeframe file format as dumped by -o2-timeframe-writer-device and read by the o2-timeframe-reader-device. - -The file format is simply a dump of the timeframe on disk. Multiple timeframes -can be concatenated resulting in a valid file. The format is as follow: - -o2tf: Timeframe [Timeframe [..]] -Timeframe: Subtimeframe [Subtimeframe [...]] TimeframeIndex -Subtimeframe: Header Payload -Header: DataHeader derived header stack -Payload: binary blob -TimeframeIndex: IndexElement [IndexElement [..]] -IndexElement: DataHeader Payload -Position in timeframe: int (4 bytes) -DataHeader: only the DataHeader part -Payload: binary blob - -.SH DISCLAIMER - -Notice that this file format is a work in progress and cannot be used for -anything but debugging purposes. diff --git a/doc/o2.1.in b/doc/o2.1.in deleted file mode 100644 index 57d74acf1640d..0000000000000 --- a/doc/o2.1.in +++ /dev/null @@ -1,19 +0,0 @@ -.\" Manpage for O2. -.TH man 1 "19 May 2017" "1.0" "Alice O2 man page" - -.SH NAME - -O2 is Alice next generation software framework to be used for RUN3. - -.SH DEVICES - -o2-alicehlt-wrapper-device(1), o2-subframebuilder-device(1) - -.\.SH TOOLS - -.SH SEE ALSO -FairMQDevice(1) - -.SH BUGS - -No bugs whatsoever