16#include "eformat/eformat.h"
21int main (
int argc,
char** argv)
25 if ( argc != 2 && argc != 3 ) {
26 std::cerr <<
"usage: " << argv[0] <<
" <source-id>" << std::endl;
27 std::cerr <<
"usage: " << argv[0] <<
" <subdetector> "
28 <<
"<module-id>" << std::endl;
29 std::cerr <<
" 1. The first format transforms from source identifier"
30 <<
" into components." << std::endl;
31 std::cerr <<
" 2. The second format transforms from the components into"
32 <<
" source identifiers." << std::endl;
37 uint32_t source_id =
static_cast<uint32_t
>(std::strtoul(argv[1], 0, 0));
39 std::cout <<
"Components for event format v3.0 are:" << std::endl;
40 std::cout <<
" - SubDetector ID => "
44 std::cout <<
" - Module ID => "
51 uint16_t
id =
static_cast<uint16_t
>(std::strtoul(argv[2], 0, 0));
53 std::cout <<
"Source identifier for event format v3.0 is: "