From 66f9aaa00ab42a5a0069dbe12b800c75f86ce463 Mon Sep 17 00:00:00 2001 From: RoccoA97 <roccoardino@gmail.com> Date: Mon, 25 Sep 2023 14:50:25 +0200 Subject: [PATCH] BMTF processor added to Giovanna's feature/multiple-pipelines --- src/OutputFileHandler.cc | 2 +- src/OutputFileHandler.h | 2 +- src/config.cc | 19 ---- src/config.h | 9 +- src/format.h | 30 +++++++ src/processor.cc | 182 ++++++++++++++++++++++++++++++++++----- src/processor.h | 7 +- src/tcp-test1.conf | 21 +++-- src/tcp-test2.conf | 26 +++--- src/tcp-test3.conf | 135 +++++++++++++++++++++++++++++ src/tcp-test4.conf | 135 +++++++++++++++++++++++++++++ 11 files changed, 500 insertions(+), 68 deletions(-) create mode 100644 src/tcp-test3.conf create mode 100644 src/tcp-test4.conf diff --git a/src/OutputFileHandler.cc b/src/OutputFileHandler.cc index 9efbdb6a..dd58bb9a 100644 --- a/src/OutputFileHandler.cc +++ b/src/OutputFileHandler.cc @@ -117,7 +117,7 @@ std::string OutputFileHandler::format_filename(uint32_t run_number, uint32_t ind if (this->OutputFileHandler::getCMSSWHeaders() == true) { ofilename << "run" << std::setfill('0') << std::setw(6) << run_number << "_ls" << std::setfill('0') << std::setw(4) << ls << "_index" << std::setfill('0') - << std::setw(6) << index % max_index_per_ls_ << ".raw"; + << std::setw(6) << index % max_index_per_ls_ << ".raw_" << std::to_string(sourceID); } else { ofilename << filename_prefix_ << "_" << std::setfill('0') << std::setw(6) << run_number << "_" diff --git a/src/OutputFileHandler.h b/src/OutputFileHandler.h index 94ec76f1..1cff2787 100644 --- a/src/OutputFileHandler.h +++ b/src/OutputFileHandler.h @@ -27,7 +27,7 @@ class OutputFileHandler { cmsswHeaders(cmsswHeaders_), sourceID(sourceID_), t{}, - max_index_per_ls_(static_cast<int>(constants::N_orbits_per_lumisection / nOrbitsPerFile_)) { + max_index_per_ls_(static_cast<int>(constants::N_orbits_per_lumisection / nOrbitsPerFile_) - 1) { close_and_rename_.SetOutputFileHandlerObj(*this); create_output_directory_maybe(working_files_base_path_); t = std::thread(close_and_rename_); diff --git a/src/config.cc b/src/config.cc index 4d46e5fd..e2f8d113 100644 --- a/src/config.cc +++ b/src/config.cc @@ -64,22 +64,3 @@ void config::print() const { } } -uint32_t config::getSourceID() { - uint32_t source_id = 0; - if (getProcessorType() == StreamProcessor::ProcessorType::GMT) { - source_id = 1; - } else if (getProcessorType() == StreamProcessor::ProcessorType::CALO) { - source_id = 2; - } else { - if (getCMSSWHeaders() == true) { - LOG(ERROR) << "PROCESSOR_TYPE INCOMPATIBLE WITH CMSSW HEADER OUTPUT OPTION, PLEASE DISABLE " - "CMSSW HEADERS OR CHANGE PROCESSOR_TYPE, EXITING"; - throw std::invalid_argument( - "ERROR: PROCESSOR_TYPE INCOMPATIBLE WITH CMSSW HEADER OUTPUT OPTION, PLEASE DISABLE " - "CMSSW HEADERS OR CHANGE PROCESSOR_TYPE"); - } else { - LOG(WARNING) << "Undefined source ID has been requested: returning 0."; - } - } - return source_id; -} diff --git a/src/config.h b/src/config.h index eda78160..5f0846c6 100644 --- a/src/config.h +++ b/src/config.h @@ -116,6 +116,9 @@ class config { if (input == "CALO") { return StreamProcessor::ProcessorType::CALO; } + if (input == "BMTF") { + return StreamProcessor::ProcessorType::BMTF; + } if (input == "BRIL") { return StreamProcessor::ProcessorType::BRIL; } @@ -159,7 +162,11 @@ class config { bool getDoZS() const { return (vmap.at("doZS") == "yes"); } - uint32_t getSourceID(); + uint32_t getSourceID() const { + std::string v = vmap.at("sourceID"); + return boost::lexical_cast<uint32_t>(v.c_str()); + } + bool getVerbosity() const { std::string v = vmap.at("verbosity"); diff --git a/src/format.h b/src/format.h index fb366739..ed721f83 100644 --- a/src/format.h +++ b/src/format.h @@ -29,6 +29,10 @@ struct blockMuon { uint32_t mu2s[8]; }; +struct blockBmtf { + uint64_t stub[8]; +}; + struct brilFrame { uint32_t word; uint32_t counter; @@ -144,6 +148,30 @@ struct shiftsCaloESums { static constexpr uint32_t HTHFmissCENT = 28; }; +struct masksBmtfStubs { + static constexpr uint32_t valid = 0x0001; + static constexpr uint32_t phi = 0x0fff; + static constexpr uint32_t phiB = 0x03ff; + static constexpr uint32_t qual = 0x0007; + static constexpr uint32_t eta = 0x007f; + static constexpr uint32_t qeta = 0x007f; + static constexpr uint32_t station = 0x0003; + static constexpr uint32_t wheel = 0x0007; + static constexpr uint32_t reserved = 0x0007; +}; + +struct shiftsBmtfStubs { + static constexpr uint32_t valid = 0; + static constexpr uint32_t phi = 1; + static constexpr uint32_t phiB = 13; + static constexpr uint32_t qual = 23; + static constexpr uint32_t eta = 26; + static constexpr uint32_t qeta = 33; + static constexpr uint32_t station = 40; + static constexpr uint32_t wheel = 42; + static constexpr uint32_t reserved = 45; +}; + struct muon { uint32_t f; // first word uint32_t s; // second word @@ -252,3 +280,5 @@ struct constants { }; #endif + + diff --git a/src/processor.cc b/src/processor.cc index cb2c9dc2..23b2bcab 100644 --- a/src/processor.cc +++ b/src/processor.cc @@ -14,8 +14,9 @@ StreamProcessor::Statistics StreamProcessor::stats; StreamProcessor::StreamProcessor(size_t max_size_, const bool doZS_, ProcessorType processorType_, - const uint32_t nOrbitsPerPacket_, const uint32_t prescaleFactor_, - const bool cmsswHeaders_, const uint16_t sourceID_, ctrl &control_) + const uint32_t nOrbitsPerPacket_, + const uint32_t prescaleFactor_, const bool cmsswHeaders_, + const uint16_t sourceID_, ctrl &control_) : tbb::filter(parallel), max_size(max_size_), nbPackets(0), @@ -26,6 +27,29 @@ StreamProcessor::StreamProcessor(size_t max_size_, const bool doZS_, ProcessorTy cmsswHeaders(cmsswHeaders_), sourceID(sourceID_), control(control_) { + switch(processorType) { + case ProcessorType::PASS_THROUGH: + blockSize = 0; + headerSize = 0; + break; + case ProcessorType::GMT: + blockSize = sizeof(blockMuon); + headerSize = 32; + break; + case ProcessorType::CALO: + blockSize = sizeof(blockCalo); + headerSize = 32; + break; + case ProcessorType::BMTF: + blockSize = sizeof(blockBmtf); + headerSize = 64; + break; + case ProcessorType::BRIL: + blockSize = sizeof(brilFrame); + headerSize = 0; + break; + } + LOG(TRACE) << "Created transform filter at " << static_cast<void *>(this); } @@ -37,9 +61,9 @@ StreamProcessor::~StreamProcessor() {} // checks that the packet size is an integer multiple of the BX block size, // minus the header/trailers bool StreamProcessor::CheckFrameMultBlock(size_t inputSize) { - int bsize = sizeof(blockMuon); - if ((inputSize - nOrbitsPerPacket * constants::orbit_trailer_size - 32 * nOrbitsPerPacket - 32) % - bsize != + if ((inputSize - nOrbitsPerPacket * constants::orbit_trailer_size - 32 - headerSize * nOrbitsPerPacket - + 32) % + blockSize != 0) { stats.n_consistent_sized_packets = 0; stats.packet_skipped_inconsistent_size++; @@ -61,7 +85,7 @@ bool StreamProcessor::CheckFrameMultBlock(size_t inputSize) { LOG(WARNING) << "Frame size not a multiple of block size after orbit headers " "(32B*nOrbitsPerPacket), orbit trailers (544B*nOrbitsPerPacket), " "and packet trailer (32B) have been subtracted. \n Frame size = " - << inputSize << ", block size = " << bsize << ", packet will be skipped"; + << inputSize << ", block size = " << blockSize << ", packet will be skipped"; } return false; } else { @@ -77,13 +101,13 @@ bool StreamProcessor::CheckFrameMultBlock(size_t inputSize) { } bool StreamProcessor::GetTrailer(Slice &input, char *&rd_ptr) { - rd_ptr += 32; // +32 to account for orbit header + rd_ptr += headerSize + 32; // account for orbit header while (rd_ptr + sizeof(orbit_trailer) - 1 <= input.end()) { orbit_trailer *ot = reinterpret_cast<orbit_trailer *>(rd_ptr); if (ot->beefdead[0] == constants::beefdead) { // found orbit trailer return true; } - rd_ptr += sizeof(blockMuon); + rd_ptr += blockSize; } return false; } @@ -109,7 +133,7 @@ StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitCalo(orbit_trailer char *wr_end_ptr) { std::pair<uint32_t, bool> orbit_header = std::pair<uint32_t, bool>{ ProcessOrbitHeader(rd_ptr)}; //.second is the warning test enable bit - rd_ptr += 32; // +32 to account for orbit header + rd_ptr += headerSize; // account for orbit header if (cmsswHeaders == true) { wr_ptr += sizeof(FRDFileHeader_v2); } // reserving space for cmssw orbit header @@ -128,9 +152,9 @@ StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitCalo(orbit_trailer uint32_t bx = 3554; // We start at 3554 here, because we increment by 1 // immediately after starting the loops. size_t word = 111; - size_t bit = 1; // Will be incremented immediately after starting the loop + size_t bit = 1; // Will be incremented immediately after starting the loop for (size_t pseudo_bx = 0; pseudo_bx < 3564; - ++pseudo_bx) { // Looping over at most an entire orbit here. + ++pseudo_bx) { // Looping over at most an entire orbit here. if (word == 14 * 8 - 1 && bit == 11) { // Bit 11 in word 111 is the last valid BX (3564), so we // roll over afterwards. (== 11 because that's the one // we worked on in the previous loop iteration) @@ -195,7 +219,7 @@ size_t StreamProcessor::fillFRDEventHeader_V6(char *wr_ptr_FRDHead, uint32_t inp // the FRDEventHeader_V6 uint32_t eventSize = inputSize + static_cast<uint32_t>(sizeof(source_id)); - uint32_t lumisection = 1 + static_cast<uint32_t>(orbit / constants::N_orbits_per_lumisection); + uint32_t lumisection = static_cast<uint32_t>(orbit / pow(2, 18)); FRDEventHeader_V6 frdEventHeader_V6(header_version, flags, control.run_number, lumisection, orbit, eventSize, crc_dummy); memcpy(wr_ptr_FRDHead, (char *)&(frdEventHeader_V6), sizeof(frdEventHeader_V6)); @@ -207,8 +231,8 @@ size_t StreamProcessor::fillFRDEventHeader_V6(char *wr_ptr_FRDHead, uint32_t inp } uint32_t StreamProcessor::FillBril(char *rd_ptr, char *wr_ptr, char *end_ptr) { - static constexpr uint32_t NHistosPerPacket = 1; // set to 1 for minimum brildaq latency - + static constexpr uint32_t NHistosPerPacket = 20; // should not be changed, any more and SB852 + // crashes, would need to re-upload bitfile uint32_t histo_i = 0, histo_word_i = 0; std::array<std::array<uint32_t, constants::NBXPerOrbit + constants::NFramesInHistoHeader>, NHistosPerPacket> @@ -230,6 +254,11 @@ uint32_t StreamProcessor::FillBril(char *rd_ptr, char *wr_ptr, char *end_ptr) { continue; } + if (histo_i == 0) { + continue; + } // Currently appears to be a bug where first histogram of packet is + // truncated, need to understand and fix, for now skip + if (histo_word_i < constants::NFramesInHistoHeader) { histo_arr[histo_i][histo_word_i] = (fr->word >> 0) & 0xffffffff; } else { @@ -262,7 +291,7 @@ StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitMuon(orbit_trailer char *wr_end_ptr) { std::pair<uint32_t, bool> orbit_header = std::pair<uint32_t, bool>{ ProcessOrbitHeader(rd_ptr)}; //.second is the warning test enable bit - rd_ptr += 32; // +32 to account for orbit header + rd_ptr += headerSize; // to account for orbit header if (cmsswHeaders == true) { wr_ptr += 28; } // reserving space for cmssw orbit header @@ -281,9 +310,9 @@ StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitMuon(orbit_trailer uint32_t bx = 3554; // We start at 3554 here, because we increment by 1 // immediately after starting the loops. size_t word = 111; - size_t bit = 1; // Will be incremented immediately after starting the loop + size_t bit = 1; // Will be incremented immediately after starting the loop for (size_t pseudo_bx = 0; pseudo_bx < 3564; - ++pseudo_bx) { // Looping over at most an entire orbit here. + ++pseudo_bx) { // Looping over at most an entire orbit here. if (word == 14 * 8 - 1 && bit == 11) { // Bit 11 in word 111 is the last valid BX (3564), so we // roll over afterwards. (== 11 because that's the one // we worked on in the previous loop iteration) @@ -306,7 +335,7 @@ StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitMuon(orbit_trailer blockMuon *bl = reinterpret_cast<blockMuon *>(rd_ptr); if (bl->orbit[0] == constants::beefdead) { break; - } // orbit trailer has been reached, end of orbit data + } // orbit trailer has been reached, end of orbit data assert(wr_ptr + (3 + 2 * 8 * 3) * 4 - 1 <= wr_end_ptr); // Assuming the maximum size a decoded muon block can use. int mAcount = 0; @@ -386,6 +415,103 @@ StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitMuon(orbit_trailer return meta; } +// Goes through orbit worth of data and fills the output memory with the muon stubs +// corresponding to the non-empty bunchcrossings, as marked in bx_vect +StreamProcessor::fillOrbitMetadata StreamProcessor::FillOrbitBmtf(orbit_trailer *trailer, + char *rd_ptr, char *wr_ptr, + char *rd_end_ptr, + char *wr_end_ptr) { + rd_ptr += headerSize; // skip for now fragment header + std::pair<uint32_t, bool> orbit_header = std::pair<uint32_t, bool>{ + ProcessOrbitHeader(rd_ptr)}; //.second is the warning test enable bit + rd_ptr += 32; // +32 to account for orbit header + if (cmsswHeaders == true) { + wr_ptr += 28; + } // reserving space for cmssw orbit header + + uint32_t orbit = uint32_t{orbit_header.first} - + 1; // Starting with orbit number one lower than what is in the header + // because the "link orbit" contains a few BXs of the previous orbit + uint32_t counts = uint32_t{0}; + uint32_t filled_bxs = 0; + // We loop over the BX map from the orbit trailer and then match the filled + // BXs to the data we got. The logic below is annoyingly convoluted: The first + // BX we get in the data stream is from BX 3555, however the BX map starts at + // BX 1, we therefore need to start reading the BX map from the 3555th bit. + // 3555//32 = 111, so we start at the 111th word; 3555 mod 32 = 3, however we + // start counting at BX1, so the start bit is 2. + uint32_t bx = 3554; // We start at 3554 here, because we increment by 1 + // immediately after starting the loops. + size_t word = 111; + size_t bit = 1; // Will be incremented immediately after starting the loop + for (size_t pseudo_bx = 0; pseudo_bx < 3564; + ++pseudo_bx) { // Looping over at most an entire orbit here. + if (word == 14 * 8 - 1 && bit == 11) { // Bit 11 in word 111 is the last valid BX (3564), so we + // roll over afterwards. (== 11 because that's the one + // we worked on in the previous loop iteration) + word = 0; + bit = 0; + bx = 0; // Will be immediately incremented to 1. + ++orbit; + } else if (bit < 31) { + ++bit; + } else { + bit = 0; + ++word; + } + ++bx; + if ((trailer->bx_map[word] & (1 << bit)) == 0) { + continue; // If the bit is zero that BX was empty and we continue. + } + assert(rd_ptr + sizeof(blockBmtf) - 1 <= rd_end_ptr); + ++filled_bxs; + blockBmtf *bl = reinterpret_cast<blockBmtf *>(rd_ptr); + if ((bl->stub[0] & 0xffffffff) == constants::beefdead) { + break; + } // orbit trailer has been reached, end of orbit data + assert(wr_ptr + (2 + 8 * 2) * 4 - 1 <= + wr_end_ptr); // Assuming the maximum size a decoded muon block can use. + int sCount = 0; + bool sBlocksOn[8]; + + for (unsigned int i = 0; i < 8; i++) { + bool valid = (bl->stub[i] >> shiftsBmtfStubs::valid) & masksBmtfStubs::valid; + + sBlocksOn[i] = (valid==true); + if (valid==true) { + sCount++; + } + } + if (sCount == 0) { + rd_ptr += sizeof(blockBmtf); + LOG(WARNING) << '#' << nbPackets + << ": Detected a bx with zero stubs, this should not " + "happen. Bx is skipped."; + continue; + } + + // header word of packed muon data contains sCount (number of stubs in bx= + // as well as the warning test enaable flag. + uint32_t header = + uint32_t{(bx << 16) + ((static_cast<uint32_t>(orbit_header.second)) << 8) + sCount}; + + counts += sCount; + memcpy(wr_ptr, (char *)&header, 4); + wr_ptr += 4; + memcpy(wr_ptr, (char *)&orbit, 4); + wr_ptr += 4; + for (unsigned int i = 0; i < 8; i++) { + if (sBlocksOn[i]) { + memcpy(wr_ptr, (char *)&bl->stub[i], 8); + wr_ptr += 8; + } + } + rd_ptr += sizeof(blockBmtf); + } + StreamProcessor::fillOrbitMetadata meta = {counts, orbit, filled_bxs}; + return meta; +} + void StreamProcessor::process(Slice &input, Slice &out) { nbPackets++; stats.packet_count++; @@ -465,12 +591,26 @@ void StreamProcessor::process(Slice &input, Slice &out) { wr_ptr += (orbit_size_bytes + additional_header_size); + } else if (processorType == ProcessorType::BMTF) { + meta = FillOrbitBmtf(trailer, rd_ptr, wr_ptr, rd_end_ptr, wr_end_ptr); + orbitCount = meta.counts; + ++orbit_per_packet_count; + + // 8 bytes for each stub/count then 8 bytes for each bx header + int orbit_size_bytes = meta.counts * 8 + 8 * meta.filled_bxs; + + if (cmsswHeaders == true) { + additional_header_size = fillFRDEventHeader_V6(wr_ptr, orbit_size_bytes, meta.orbit); + } + + wr_ptr += (orbit_size_bytes + additional_header_size); + } else { LOG(ERROR) << "UNKNOWN PROCESSOR_TYPE, EXITING"; throw std::invalid_argument("ERROR: PROCESSOR_TYPE NOT RECOGNISED"); } - rd_ptr += 32 + meta.filled_bxs * sizeof(blockMuon) + - constants::orbit_trailer_size; // 32 for orbit header, + nBXs + + rd_ptr += headerSize + 32 + meta.filled_bxs * blockSize + + constants::orbit_trailer_size; // orbit header, + nBXs + // orbit trailer assert(wr_ptr <= wr_end_ptr); assert(rd_ptr <= rd_end_ptr); @@ -514,3 +654,5 @@ void *StreamProcessor::operator()(void *item) { return &out; } + + diff --git a/src/processor.h b/src/processor.h index 43fa69b9..629f1fc6 100644 --- a/src/processor.h +++ b/src/processor.h @@ -22,7 +22,7 @@ class StreamProcessor : public tbb::filter { std::array<uint32_t, constants::NBXPerOrbit + constants::NFramesInHistoHeader>> BrilQueue; - enum class ProcessorType { PASS_THROUGH, GMT, CALO, BRIL }; + enum class ProcessorType { PASS_THROUGH, GMT, CALO, BMTF, BRIL }; StreamProcessor(size_t max_size_, bool doZS_, ProcessorType processorType_, const uint32_t nOrbitsPerPacket_, const uint32_t prescaleFactor_, @@ -44,6 +44,8 @@ class StreamProcessor : public tbb::filter { char *rd_end_ptr, char *wr_end_ptr); fillOrbitMetadata FillOrbitCalo(orbit_trailer *trailer, char *rd_ptr, char *wr_ptr, char *rd_end_ptr, char *wr_end_ptr); + fillOrbitMetadata FillOrbitBmtf(orbit_trailer *trailer, char *rd_ptr, char *wr_ptr, + char *rd_end_ptr, char *wr_end_ptr); uint32_t FillBril(char *rd_ptr, char *wr_ptr, char *end_ptr); size_t max_size; uint64_t nbPackets; @@ -53,6 +55,8 @@ class StreamProcessor : public tbb::filter { const uint32_t prescaleFactor; const bool cmsswHeaders; const uint16_t sourceID; + size_t blockSize; + size_t headerSize; ctrl &control; size_t fillFRDEventHeader_V6(char *wr_ptr_FRDHead, uint32_t inputSize, uint32_t orbit); @@ -75,3 +79,4 @@ class StreamProcessor : public tbb::filter { }; #endif + diff --git a/src/tcp-test1.conf b/src/tcp-test1.conf index 0e6741e9..d4c69de2 100644 --- a/src/tcp-test1.conf +++ b/src/tcp-test1.conf @@ -25,7 +25,7 @@ dma_packet_buffer_size:1261568 dma_number_of_packet_buffers:1000 # Print report each N packets, use 0 to disable -packets_per_report:2000 +packets_per_report:100000 # number of orbits per packet, in decimal nOrbitsPerPacket:1 @@ -40,7 +40,13 @@ prescale_factor:1 input_file:./test/data/calo_testfile.dat ## Extra settings for "tcpip" input -tcpDestPort:10000 +log_min_severity:DEBUG +threads:4 +tcpDestPort:10080 +sourceID:18 +output_filename_prefix:scout_TCPIP08 +output_filename_base:/fff/scdaq/ +output_force_write:yes ################################################################################ @@ -58,7 +64,7 @@ enable_stream_processor:yes # Note: When changing the processing type, change also "output_filename_prefix" # in the file output section. # -processor_type:PASS_THROUGH +processor_type:BMTF # Enable software zero-supression doZS:yes @@ -69,14 +75,9 @@ doZS:yes ## ################################################################################ -output_filename_prefix:tcp-mp1-scouting_calo_1 - -output_filename_base:test/in_progress - max_file_size:8589934592 # Always write data to a file regardless of the run status, useful for debugging -output_force_write:no ################################################################################ @@ -113,10 +114,8 @@ dev_TCPAutoReconnectOnFailure:true # Log only severities at the same level or more severe than the log_min_severity # Use TRACE to log everything # -log_min_severity:TRACE # Pipeline settings -threads:8 # verbosity level, currently supports 0 and 1 verbosity:0 @@ -127,7 +126,7 @@ verbosity:0 nOrbitsPerFile:4096 # Headers for cmssw support -cmsswHeaders:no +cmsswHeaders:yes ## Information necessary to issue a reset request for the board scone_host:localhost diff --git a/src/tcp-test2.conf b/src/tcp-test2.conf index 270c2532..7273a9b0 100644 --- a/src/tcp-test2.conf +++ b/src/tcp-test2.conf @@ -25,7 +25,7 @@ dma_packet_buffer_size:1261568 dma_number_of_packet_buffers:1000 # Print report each N packets, use 0 to disable -packets_per_report:2000 +packets_per_report:100000 # number of orbits per packet, in decimal nOrbitsPerPacket:1 @@ -36,11 +36,17 @@ prescale_factor:1 ## Extra settings for "filedma" input #input_file:/dev/shm/testdata.bin -#input_file:/home/glazzari/repos/scdaq/test/data/passthrough_test2.dat -input_file:./test/data/gmt_testfile2.dat +#input_file:/home/glazzari/repos/scdaq/test/data/passthrough_test1.dat +input_file:./test/data/calo_testfile.dat ## Extra settings for "tcpip" input -tcpDestPort:10010 +log_min_severity:DEBUG +threads:4 +tcpDestPort:10090 +sourceID:19 +output_filename_prefix:scout_TCPIP09 +output_filename_base:/fff/scdaq/ +output_force_write:yes ################################################################################ @@ -58,8 +64,7 @@ enable_stream_processor:yes # Note: When changing the processing type, change also "output_filename_prefix" # in the file output section. # -processor_type:PASS_THROUGH -#GMT +processor_type:BMTF # Enable software zero-supression doZS:yes @@ -70,14 +75,9 @@ doZS:yes ## ################################################################################ -output_filename_prefix:tcp-mp2-scouting_gmt - -output_filename_base:test/in_progress - max_file_size:8589934592 # Always write data to a file regardless of the run status, useful for debugging -output_force_write:no ################################################################################ @@ -114,10 +114,8 @@ dev_TCPAutoReconnectOnFailure:true # Log only severities at the same level or more severe than the log_min_severity # Use TRACE to log everything # -log_min_severity:TRACE # Pipeline settings -threads:8 # verbosity level, currently supports 0 and 1 verbosity:0 @@ -128,7 +126,7 @@ verbosity:0 nOrbitsPerFile:4096 # Headers for cmssw support -cmsswHeaders:no +cmsswHeaders:yes ## Information necessary to issue a reset request for the board scone_host:localhost diff --git a/src/tcp-test3.conf b/src/tcp-test3.conf new file mode 100644 index 00000000..692701df --- /dev/null +++ b/src/tcp-test3.conf @@ -0,0 +1,135 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "dma" for XILINX DMA driver +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:tcpip + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:100000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:1 + +# prescale factor, used for *calo* data only +prescale_factor:1 + +## Extra settings for "filedma" input + +#input_file:/dev/shm/testdata.bin +#input_file:/home/glazzari/repos/scdaq/test/data/passthrough_test1.dat +input_file:./test/data/calo_testfile.dat + +## Extra settings for "tcpip" input +log_min_severity:DEBUG +threads:4 +tcpDestPort:10100 +sourceID:20 +output_filename_prefix:scout_TCPIP10 +output_filename_base:/fff/scdaq/ +output_force_write:yes + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:BMTF + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging + + +################################################################################ +## +## Elastics processor settings (obsolete) +## +################################################################################ + +enable_elastic_processor:no + +port:8000 +elastic_url:http://something.somewhere +pt_cut:7 +quality_cut:12 + + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:true + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# + +# Pipeline settings + +# verbosity level, currently supports 0 and 1 +verbosity:0 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:4096 + +# Headers for cmssw support +cmsswHeaders:yes + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:vcu128_bmtf_tcp diff --git a/src/tcp-test4.conf b/src/tcp-test4.conf new file mode 100644 index 00000000..623db67d --- /dev/null +++ b/src/tcp-test4.conf @@ -0,0 +1,135 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "dma" for XILINX DMA driver +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:tcpip + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:100000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:1 + +# prescale factor, used for *calo* data only +prescale_factor:1 + +## Extra settings for "filedma" input + +#input_file:/dev/shm/testdata.bin +#input_file:/home/glazzari/repos/scdaq/test/data/passthrough_test1.dat +input_file:./test/data/calo_testfile.dat + +## Extra settings for "tcpip" input +log_min_severity:DEBUG +threads:4 +tcpDestPort:10110 +sourceID:21 +output_filename_prefix:scout_TCPIP11 +output_filename_base:/fff/scdaq/ +output_force_write:yes + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:BMTF + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging + + +################################################################################ +## +## Elastics processor settings (obsolete) +## +################################################################################ + +enable_elastic_processor:no + +port:8000 +elastic_url:http://something.somewhere +pt_cut:7 +quality_cut:12 + + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:true + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# + +# Pipeline settings + +# verbosity level, currently supports 0 and 1 +verbosity:0 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:4096 + +# Headers for cmssw support +cmsswHeaders:yes + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:vcu128_bmtf_tcp -- GitLab