Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • yheitz/swrod
  • rowang/swrod
  • tuna/swrod
  • atlas-tdaq-software/swrod
4 results
Show changes
Commits on Source (23)
Showing
with 1044 additions and 142 deletions
......@@ -202,6 +202,10 @@ tdaq_add_executable(unit_test_hltServing
LINK_LIBRARIES swrod_core_impl Boost::unit_test_framework ROSasyncmsg
)
tdaq_add_executable(swrod_dummy_trigger
test/ctp_emulator/ctp_emulator.cxx
LINK_LIBRARIES rc_ItemCtrl rc_CmdLine trgCommander tdaq-common::ers Boost::program_options)
add_test(NAME swrod:fileWriting_check COMMAND unit_test_fileWriting)
add_test(NAME swrod:hltServing_check COMMAND unit_test_hltServing)
add_test(NAME swrod:fragment_building_check COMMAND unit_test_fragment_building --log_level=message)
......@@ -217,7 +221,7 @@ tdaq_add_scripts(python/swrod_file_checker.py)
#################################################################################
# Netio test applications
#################################################################################
option(BUILD_NETIO_TESTS "Build test applications that use Netio directly" OFF)
option(BUILD_NETIO_TESTS "Build test applications that use Netio directly" ON)
if (BUILD_NETIO_TESTS)
set(FELIX_INST_DIR /det/tdaq/felix/felix-04-02-10-rm4-stand-alone/${BINARY_TAG})
......
......@@ -214,8 +214,36 @@ EffectiveTimeout(seconds) = min(DataReceivingTimeout / 1000, BufferSize / InputR
The following attribute of the base **SwRodFragmentBuilder** class has specific meaning for this algorithm:
* **MaxMessageSize** - The maximum size in bytes of a single data packet that may arrive from an individual input link. A data packet with the size exceeding this value will be discarded. The algorithm also uses this value to calculate the size of the memory blocks that will be used for ROB fragments. This size will be equal to the maximum of the **MaxMessageSize** value and the **PageSize** value of the **MemoryPool** object that is associated with the given **SwRodRob** instance. If the **SwRodRob**'s _MemoryConfiguration_ relationship is empty, then the **MemoryPool** object associated with the **SwRodApplication** object will be used.
#### Memory Management Configuration
Here is an example demonstrating how to choose the optimal values of the **SwRodGBTModeBuilder::MaxMessageSize** and **MemoryPool::PageSize** parameters to assure the best performance and minimize memory footprint of GBT mode algorithm.
##### SwRodGBTModeBuilder::MaxMessageSize
As it was explained in the previous paragraph the main aim of this parameter is to define the maximum size of an individual data packet (a packet that comes from a single E-Link) that will be accepted by the algorithm. For example if one knows the maximum number of hits a single data packet may contain and the hit size, one can easily calculate the value for this parameter by just multiplying these two values and adding the size of the fixed portion of data packet format (e.g. L1ID, BCID, etc).
For example if the maximum number of hits a single data packet may contain is 500, the hit size is 3 bytes and the size of the size of the fixed portion of a data packet is 20 bytes then one should set this parameter to:
~~~math
500*3 + 20 = 1520
~~~
##### MemoryPool::PageSize
This parameter is used to minimize the memory footprint of the SW ROD. The best way to calculate the optimal value of this parameter is to multiply the following three values:
* the size of a single hit
* the maximum number of hits in the bulk of the data packets
* the number of input E-Links for the current ROB
For example if one knows that 99,9% of data packets have not more than 5 hits and the number of E-Links used to provide data for the current ROB is 150 then one should set the **PageSize** parameter to the following value:
~~~math
(5 * 3 + 20) * 150 = 5250
~~~
Here 20 bytes is the size of the fixed portion of a data packets. With such a configuration the bulk of the ROB fragments produced by the current algorithm will fit into one memory block. Rare fragments, which contains unusually large data packets will be automatically split into multiple data blocks.
Note that if the **MaxMessageSize** value exceeds the **PageSize** then the former value will override the latter. This is done to avoid a situation when it would be necessary to split a single data packet into multiple memory pages. With the current approach this will never happen as any data packet whose size exceeds the **PageSize** value will be discarded because its size will exceed the **MaxMessageSize** value as well.
#### Error Handling
The default GBT event aggregation algorithm implements error handling as described by the [SW ROD Error Use Cases](https://twiki.cern.ch/twiki/bin/viewauth/Atlas/SWRodInputErrors) wiki page. The algorithm may produce incomplete ROB fragments, i.e. fragments that miss data chunks from one or several E-Links. This may happen if data from these E-Links did not arrive within the timeout, which is defined by the algorithm configuration.
The default GBT event aggregation algorithm implements error handling as described by the [SW ROD Error Use Cases](https://twiki.cern.ch/twiki/bin/viewauth/Atlas/SWRodInputErrors) wiki page. The algorithm may produce incomplete ROB fragments, i.e. fragments that miss data chunks from one or several E-Links. This may happen if data from these E-Links did not arrive within the timeout, which is defined by the algorithm configuration or they have not been present in the data streams of the corresponding E-Links.
### FULL Mode Fragment Building Algorithm
This algorithm receives data packets from the given set of E-Links defined by the corresponding SW ROD configuration. It assumes that each data packet contains fully built **ROD data** that may optionally include **ROD header** and **ROD trailer** elements. The latter is controlled by the **RODHeaderPresent** attribute of the **SwRodFullModeBuilder** configuration object. The algorithm combines these data packets with the corresponding TTC information into objects of the **swrod::ROBFragment** class. The following attributes of the base **SwRodFragmentBuilder** class have specific meaning for this algorithm:
......@@ -225,6 +253,35 @@ This algorithm receives data packets from the given set of E-Links defined by th
#### SwRodFullModeBuilder configuration class
This OKS configuration class inherits from the **SwRodFragmentBuilder** and adds the **RODHeaderPresent** parameter. If this parameter is set to **1** then the algorithm assumes that each incoming data packet already contains **ROD header** and **ROD trailer** parts and therefore will not add them. Otherwise, the algorithm will generate both the **ROD header** and the **ROD trailer** by itself.
#### Memory Management Configuration
Here is an example demonstrating how to choose the optimal values for **SwRodGBTModeBuilder::MaxMessageSize** and **MemoryPool::PageSize** parameters to assure the best performance and the minimal memory footprint of the FULL mode algorithm.
##### SwRodFullModeBuilder::MaxMessageSize
Unlike the GBT mode algorithm the FULL mode algorithm never discards incoming data packets, but may truncate them if they are unreasonably large. This is what the **MaxMessageSize** parameter is used for. It defines the maximum size of individual data packet that will be accepted by the algorithm without truncation. If the size of a data packet exceeds the value of the **MaxMessageSize** parameter then the algorithm will truncate this data packet to the **MaxMessageSize** bytes.
If one knows the maximum number of hits a single data packet may contain and the hit size, one can easily calculate the value for this parameter by just multiplying these two values and adding the size of the fixed portion of the data packet format (e.g. ROD header).
For example, if the maximum number of hits is 500 and the hit size is 3 bytes then one should set this parameter to the following value:
~~~math
500*3 + 100 = 1600
~~~
Here it is assumed that the size of the fixed portion of a data packets is equal to 100 bytes.
##### MemoryPool::PageSize
This parameter is used to minimize the memory footprint of the SW ROD. The best way to calculate the value of this parameter is to multiply a single hit size by the maximum number of hits, which the bulk of the data packets may contain and add the size of the fixed portion of the data packet format.
For example if one knows that 99,9% of data packets have not more than 100 hits and the size of the fixed portion of a data packet is 100 bytes then this parameter should be set to:
~~~math
100 * 5 + 100 = 600
~~~
The idea is that the bulk of the ROB fragments produced by the algorithm will fit into one memory block. Rare data packets which are larger than the **PageSize** will be automatically split into multiple data blocks.
Note that one can always set the **PageSize** value to be equal to the **MaxMessageSize**, in which case it will be guaranteed that every fragment will always fit into a single memory block.
## Configuring a SW ROD Application
A SW ROD application must be configured using OKS configuration service. For convenience all OKS classes that can be used for this purpose have their names started with **SwRod** prefix. These classes are defined in the **daq/schema/swrod.schema.xml** OKS schema file that must be included by any SW ROD OKS configuration file. A fully functional example of a SW ROD configuration can be found in the
[data/SwRodSegment.data.xml](data/SwRodSegment.data.xml) file located in the **swrod** package.
......
<?xml version="1.0" encoding="ASCII"?>
<!-- oks-data version 2.0 -->
<!-- oks-data version 2.2 -->
<!DOCTYPE oks-data [
<!ELEMENT oks-data (info, (include)?, (comments)?, (obj)+)>
<!ELEMENT info EMPTY>
<!ATTLIST info
name CDATA #REQUIRED
type CDATA #REQUIRED
name CDATA #IMPLIED
type CDATA #IMPLIED
num-of-items CDATA #REQUIRED
oks-format CDATA #FIXED "data"
oks-version CDATA #REQUIRED
created-by CDATA #REQUIRED
created-on CDATA #REQUIRED
creation-time CDATA #REQUIRED
last-modified-by CDATA #REQUIRED
last-modified-on CDATA #REQUIRED
last-modification-time CDATA #REQUIRED
created-by CDATA #IMPLIED
created-on CDATA #IMPLIED
creation-time CDATA #IMPLIED
last-modified-by CDATA #IMPLIED
last-modified-on CDATA #IMPLIED
last-modification-time CDATA #IMPLIED
>
<!ELEMENT include (file)*>
<!ELEMENT file EMPTY>
......@@ -63,13 +63,14 @@
<oks-data>
<info name="" type="" num-of-items="50" oks-format="data" oks-version="oks-07-00-08 built &quot;Mar 30 2020&quot;" created-by="dliko" created-on="pcatd84" creation-time="20030414T160243" last-modified-by="kolos" last-modified-on="pc-tbed-pub-24.cern.ch" last-modification-time="20200330T145951"/>
<info name="" type="" num-of-items="3" oks-format="data" oks-version="oks-08-04-00-2-g4949f80 built &quot;Dec 6 2023&quot;" created-by="dliko" created-on="pcatd84" creation-time="20030414T160243" last-modified-by="kolos" last-modified-on="pc-tbed-swrod-01.cern.ch" last-modification-time="20240111T093545"/>
<include>
<file path="daq/schema/swrod.schema.xml"/>
<file path="InputLinks.data.xml"/>
</include>
<obj class="SwRodCustomProcessingLib" id="DET-ID_CustomPlugin">
<attr name="LibraryName" type="string" val="libswrod_test_plugin.so"/>
<attr name="TrigInfoExtractor" type="string" val="testTriggerInfoExtractor"/>
......@@ -79,6 +80,8 @@
<obj class="SwRodDataChannel" id="DET-ID_DataChannel-1">
<attr name="State" type="bool" val="1"/>
<attr name="TTCControllerName" type="string" val=""/>
<attr name="UpdateECRCounter" type="bool" val="1"/>
<rel name="Contains">
<ref class="SwRodInputLink" id="ELink-101"/>
<ref class="SwRodInputLink" id="ELink-102"/>
......@@ -102,6 +105,8 @@
<obj class="SwRodDataChannel" id="DET-ID_DataChannel-2">
<attr name="State" type="bool" val="1"/>
<attr name="TTCControllerName" type="string" val=""/>
<attr name="UpdateECRCounter" type="bool" val="1"/>
<rel name="Contains">
<ref class="SwRodInputLink" id="ELink-201"/>
<ref class="SwRodInputLink" id="ELink-202"/>
......@@ -123,4 +128,54 @@
<rel name="CustomLib" class="SwRodCustomProcessingLib" id="DET-ID_CustomPlugin"/>
</obj>
<obj class="SwRodDataChannel" id="DET-ID_DataChannel-3">
<attr name="State" type="bool" val="1"/>
<attr name="TTCControllerName" type="string" val=""/>
<attr name="UpdateECRCounter" type="bool" val="1"/>
<rel name="Contains">
<ref class="SwRodInputLink" id="ELink-301"/>
<ref class="SwRodInputLink" id="ELink-302"/>
<ref class="SwRodInputLink" id="ELink-303"/>
<ref class="SwRodInputLink" id="ELink-304"/>
<ref class="SwRodInputLink" id="ELink-305"/>
<ref class="SwRodInputLink" id="ELink-306"/>
<ref class="SwRodInputLink" id="ELink-307"/>
<ref class="SwRodInputLink" id="ELink-308"/>
<ref class="SwRodInputLink" id="ELink-309"/>
<ref class="SwRodInputLink" id="ELink-310"/>
<ref class="SwRodInputLink" id="ELink-311"/>
<ref class="SwRodInputLink" id="ELink-312"/>
<ref class="SwRodInputLink" id="ELink-313"/>
<ref class="SwRodInputLink" id="ELink-314"/>
<ref class="SwRodInputLink" id="ELink-315"/>
<ref class="SwRodInputLink" id="ELink-316"/>
</rel>
<rel name="CustomLib" class="SwRodCustomProcessingLib" id="DET-ID_CustomPlugin"/>
</obj>
<obj class="SwRodDataChannel" id="DET-ID_DataChannel-4">
<attr name="State" type="bool" val="1"/>
<attr name="TTCControllerName" type="string" val=""/>
<attr name="UpdateECRCounter" type="bool" val="1"/>
<rel name="Contains">
<ref class="SwRodInputLink" id="ELink-401"/>
<ref class="SwRodInputLink" id="ELink-402"/>
<ref class="SwRodInputLink" id="ELink-403"/>
<ref class="SwRodInputLink" id="ELink-404"/>
<ref class="SwRodInputLink" id="ELink-405"/>
<ref class="SwRodInputLink" id="ELink-406"/>
<ref class="SwRodInputLink" id="ELink-407"/>
<ref class="SwRodInputLink" id="ELink-408"/>
<ref class="SwRodInputLink" id="ELink-409"/>
<ref class="SwRodInputLink" id="ELink-410"/>
<ref class="SwRodInputLink" id="ELink-411"/>
<ref class="SwRodInputLink" id="ELink-412"/>
<ref class="SwRodInputLink" id="ELink-413"/>
<ref class="SwRodInputLink" id="ELink-414"/>
<ref class="SwRodInputLink" id="ELink-415"/>
<ref class="SwRodInputLink" id="ELink-416"/>
</rel>
<rel name="CustomLib" class="SwRodCustomProcessingLib" id="DET-ID_CustomPlugin"/>
</obj>
</oks-data>
......@@ -70,13 +70,14 @@
<file path="daq/sw/common-templates.data.xml"/>
<file path="daq/sw/tags.data.xml"/>
<file path="hosts.data.xml"/>
<file path="SwRodSegment.data.xml"/>
<file path="Modules.data.xml"/>
</include>
<obj class="Segment" id="DET-ID_Felix_Emulator_Segment">
<rel name="Resources">
<ref class="SwRodApplication" id="DET-ID_Felix_Emulator"/>
<ref class="SwRodApplication" id="DET-ID_Felix_Emulator2"/>
</rel>
<rel name="IsControlledBy" class="RunControlTemplateApplication" id="DefRC"/>
</obj>
......@@ -100,15 +101,57 @@
<ref class="SW_Repository" id="swrod-felix-repository"/>
</rel>
<rel name="ProcessEnvironment">
<ref class="Variable" id="DET-ID_Felix_Emulator_FelixGroupName"/>
<ref class="Variable" id="DET-ID_Felix_Emulator_FelixBusDir"/>
<ref class="Variable" id="DET-ID_Felix_Emulator_Port"/>
<ref class="Variable" id="DET-ID_Felix_Emulator_Interface"/>
<ref class="Variable" id="FI_VERBS_RX_SIZE"/>
<ref class="Variable" id="FI_VERBS_TX_SIZE"/>
</rel>
<rel name="RunsOn" class="Computer" id="pc-tbed-swrod-01.cern.ch"/>
<rel name="RunsOn" class="Computer" id="pc-tbed-felix-06.cern.ch"/>
<rel name="Contains">
<ref class="SwRodModule" id="DET-ID_Module"/>
<ref class="SwRodModule" id="DET-ID_Module-1"/>
<ref class="SwRodModule" id="DET-ID_Module-2"/>
<ref class="SwRodModule" id="DET-ID_Module-3"/>
<ref class="SwRodModule" id="DET-ID_Module-4"/>
</rel>
<rel name="MemoryConfiguration" class="MemoryPool" id="SwRodMemoryPool"/>
<rel name="Detector" class="Detector" id="DET-ID"/>
<rel name="Configuration" class="SwRodConfiguration" id="DET-ID_Felix_Emulator_Configuration"/>
</obj>
<obj class="SwRodApplication" id="DET-ID_Felix_Emulator2">
<attr name="InterfaceName" type="string" val="rc/commander"/>
<attr name="ActionTimeout" type="s32" val="10"/>
<attr name="ProbeInterval" type="s32" val="1"/>
<attr name="FullStatisticsInterval" type="s32" val="63"/>
<attr name="ControlsTTCPartitions" type="bool" val="0"/>
<attr name="Logging" type="bool" val="1"/>
<attr name="InitTimeout" type="u32" val="10"/>
<attr name="ExitTimeout" type="u32" val="5"/>
<attr name="RestartableDuringRun" type="bool" val="1"/>
<attr name="IfExitsUnexpectedly" type="enum" val="Error"/>
<attr name="IfFailsToStart" type="enum" val="Error"/>
<attr name="DataRequestDestination" type="enum" val="PC"/>
<attr name="CPU" type="string" val="0-15"/>
<rel name="Program" class="Binary" id="swrod_application"/>
<rel name="Uses">
<ref class="SW_Repository" id="swrod-felix-repository"/>
</rel>
<rel name="ProcessEnvironment">
<ref class="Variable" id="DET-ID_Felix_Emulator_FelixGroupName2"/>
<ref class="Variable" id="DET-ID_Felix_Emulator_FelixBusDir"/>
<ref class="Variable" id="DET-ID_Felix_Emulator_Port"/>
<ref class="Variable" id="DET-ID_Felix_Emulator_Interface"/>
<ref class="Variable" id="FI_VERBS_RX_SIZE"/>
<ref class="Variable" id="FI_VERBS_TX_SIZE"/>
</rel>
<rel name="RunsOn" class="Computer" id="pc-tbed-felix-07.cern.ch"/>
<rel name="Contains">
<ref class="SwRodModule" id="DET-ID_Module-1"/>
<ref class="SwRodModule" id="DET-ID_Module-2"/>
<ref class="SwRodModule" id="DET-ID_Module-3"/>
<ref class="SwRodModule" id="DET-ID_Module-4"/>
</rel>
<rel name="MemoryConfiguration" class="MemoryPool" id="SwRodMemoryPool"/>
<rel name="Detector" class="Detector" id="DET-ID"/>
......@@ -133,6 +176,18 @@
<rel name="InputMethod" class="SwRodInternalDataGenerator" id="InternalL1A"/>
</obj>
<obj class="Variable" id="DET-ID_Felix_Emulator_FelixGroupName">
<attr name="Description" type="string" val="FELIXBUS group name"/>
<attr name="Name" type="string" val="SWROD_FELIX_EMULATOR_GROUP_NAME"/>
<attr name="Value" type="string" val="FELIX"/>
</obj>
<obj class="Variable" id="DET-ID_Felix_Emulator_FelixGroupName2">
<attr name="Description" type="string" val="FELIXBUS group name"/>
<attr name="Name" type="string" val="SWROD_FELIX_EMULATOR_GROUP_NAME"/>
<attr name="Value" type="string" val="FELIX2"/>
</obj>
<obj class="Variable" id="DET-ID_Felix_Emulator_FelixBusDir">
<attr name="Description" type="string" val="Network Interface to connect to FELIXBUS"/>
<attr name="Name" type="string" val="SWROD_FELIX_EMULATOR_BUS_DIR"/>
......
......@@ -260,4 +260,195 @@
<attr name="DetectorResourceName" type="string" val="ELink-216"/>
</obj>
<obj class="SwRodInputLink" id="ELink-301">
<attr name="FelixId" type="u64" val="0x301"/>
<attr name="DetectorResourceId" type="u32" val="0xff301"/>
<attr name="DetectorResourceName" type="string" val="ELink-301"/>
</obj>
<obj class="SwRodInputLink" id="ELink-302">
<attr name="FelixId" type="u64" val="0x302"/>
<attr name="DetectorResourceId" type="u32" val="0xff302"/>
<attr name="DetectorResourceName" type="string" val="ELink-302"/>
</obj>
<obj class="SwRodInputLink" id="ELink-303">
<attr name="FelixId" type="u64" val="0x303"/>
<attr name="DetectorResourceId" type="u32" val="0xff303"/>
<attr name="DetectorResourceName" type="string" val="ELink-303"/>
</obj>
<obj class="SwRodInputLink" id="ELink-304">
<attr name="FelixId" type="u64" val="0x304"/>
<attr name="DetectorResourceId" type="u32" val="0xff304"/>
<attr name="DetectorResourceName" type="string" val="ELink-304"/>
</obj>
<obj class="SwRodInputLink" id="ELink-305">
<attr name="FelixId" type="u64" val="0x305"/>
<attr name="DetectorResourceId" type="u32" val="0xff305"/>
<attr name="DetectorResourceName" type="string" val="ELink-305"/>
</obj>
<obj class="SwRodInputLink" id="ELink-306">
<attr name="FelixId" type="u64" val="0x306"/>
<attr name="DetectorResourceId" type="u32" val="0xff306"/>
<attr name="DetectorResourceName" type="string" val="ELink-306"/>
</obj>
<obj class="SwRodInputLink" id="ELink-307">
<attr name="FelixId" type="u64" val="0x307"/>
<attr name="DetectorResourceId" type="u32" val="0xff307"/>
<attr name="DetectorResourceName" type="string" val="ELink-307"/>
</obj>
<obj class="SwRodInputLink" id="ELink-308">
<attr name="FelixId" type="u64" val="0x308"/>
<attr name="DetectorResourceId" type="u32" val="0xff308"/>
<attr name="DetectorResourceName" type="string" val="ELink-308"/>
</obj>
<obj class="SwRodInputLink" id="ELink-309">
<attr name="FelixId" type="u64" val="0x309"/>
<attr name="DetectorResourceId" type="u32" val="0xff309"/>
<attr name="DetectorResourceName" type="string" val="ELink-309"/>
</obj>
<obj class="SwRodInputLink" id="ELink-310">
<attr name="FelixId" type="u64" val="0x310"/>
<attr name="DetectorResourceId" type="u32" val="0xff310"/>
<attr name="DetectorResourceName" type="string" val="ELink-310"/>
</obj>
<obj class="SwRodInputLink" id="ELink-311">
<attr name="FelixId" type="u64" val="0x311"/>
<attr name="DetectorResourceId" type="u32" val="0xff311"/>
<attr name="DetectorResourceName" type="string" val="ELink-311"/>
</obj>
<obj class="SwRodInputLink" id="ELink-312">
<attr name="FelixId" type="u64" val="0x312"/>
<attr name="DetectorResourceId" type="u32" val="0xff312"/>
<attr name="DetectorResourceName" type="string" val="ELink-312"/>
</obj>
<obj class="SwRodInputLink" id="ELink-313">
<attr name="FelixId" type="u64" val="0x313"/>
<attr name="DetectorResourceId" type="u32" val="0xff313"/>
<attr name="DetectorResourceName" type="string" val="ELink-313"/>
</obj>
<obj class="SwRodInputLink" id="ELink-314">
<attr name="FelixId" type="u64" val="0x314"/>
<attr name="DetectorResourceId" type="u32" val="0xff314"/>
<attr name="DetectorResourceName" type="string" val="ELink-314"/>
</obj>
<obj class="SwRodInputLink" id="ELink-315">
<attr name="FelixId" type="u64" val="0x315"/>
<attr name="DetectorResourceId" type="u32" val="0xff315"/>
<attr name="DetectorResourceName" type="string" val="ELink-315"/>
</obj>
<obj class="SwRodInputLink" id="ELink-316">
<attr name="FelixId" type="u64" val="0x316"/>
<attr name="DetectorResourceId" type="u32" val="0xff316"/>
<attr name="DetectorResourceName" type="string" val="ELink-316"/>
</obj>
<obj class="SwRodInputLink" id="ELink-401">
<attr name="FelixId" type="u64" val="0x401"/>
<attr name="DetectorResourceId" type="u32" val="0xff401"/>
<attr name="DetectorResourceName" type="string" val="ELink-401"/>
</obj>
<obj class="SwRodInputLink" id="ELink-402">
<attr name="FelixId" type="u64" val="0x402"/>
<attr name="DetectorResourceId" type="u32" val="0xff402"/>
<attr name="DetectorResourceName" type="string" val="ELink-402"/>
</obj>
<obj class="SwRodInputLink" id="ELink-403">
<attr name="FelixId" type="u64" val="0x403"/>
<attr name="DetectorResourceId" type="u32" val="0xff403"/>
<attr name="DetectorResourceName" type="string" val="ELink-403"/>
</obj>
<obj class="SwRodInputLink" id="ELink-404">
<attr name="FelixId" type="u64" val="0x404"/>
<attr name="DetectorResourceId" type="u32" val="0xff404"/>
<attr name="DetectorResourceName" type="string" val="ELink-404"/>
</obj>
<obj class="SwRodInputLink" id="ELink-405">
<attr name="FelixId" type="u64" val="0x405"/>
<attr name="DetectorResourceId" type="u32" val="0xff405"/>
<attr name="DetectorResourceName" type="string" val="ELink-405"/>
</obj>
<obj class="SwRodInputLink" id="ELink-406">
<attr name="FelixId" type="u64" val="0x406"/>
<attr name="DetectorResourceId" type="u32" val="0xff406"/>
<attr name="DetectorResourceName" type="string" val="ELink-406"/>
</obj>
<obj class="SwRodInputLink" id="ELink-407">
<attr name="FelixId" type="u64" val="0x407"/>
<attr name="DetectorResourceId" type="u32" val="0xff407"/>
<attr name="DetectorResourceName" type="string" val="ELink-407"/>
</obj>
<obj class="SwRodInputLink" id="ELink-408">
<attr name="FelixId" type="u64" val="0x408"/>
<attr name="DetectorResourceId" type="u32" val="0xff408"/>
<attr name="DetectorResourceName" type="string" val="ELink-408"/>
</obj>
<obj class="SwRodInputLink" id="ELink-409">
<attr name="FelixId" type="u64" val="0x409"/>
<attr name="DetectorResourceId" type="u32" val="0xff409"/>
<attr name="DetectorResourceName" type="string" val="ELink-409"/>
</obj>
<obj class="SwRodInputLink" id="ELink-410">
<attr name="FelixId" type="u64" val="0x410"/>
<attr name="DetectorResourceId" type="u32" val="0xff410"/>
<attr name="DetectorResourceName" type="string" val="ELink-410"/>
</obj>
<obj class="SwRodInputLink" id="ELink-411">
<attr name="FelixId" type="u64" val="0x411"/>
<attr name="DetectorResourceId" type="u32" val="0xff411"/>
<attr name="DetectorResourceName" type="string" val="ELink-411"/>
</obj>
<obj class="SwRodInputLink" id="ELink-412">
<attr name="FelixId" type="u64" val="0x412"/>
<attr name="DetectorResourceId" type="u32" val="0xff412"/>
<attr name="DetectorResourceName" type="string" val="ELink-412"/>
</obj>
<obj class="SwRodInputLink" id="ELink-413">
<attr name="FelixId" type="u64" val="0x413"/>
<attr name="DetectorResourceId" type="u32" val="0xff413"/>
<attr name="DetectorResourceName" type="string" val="ELink-413"/>
</obj>
<obj class="SwRodInputLink" id="ELink-414">
<attr name="FelixId" type="u64" val="0x414"/>
<attr name="DetectorResourceId" type="u32" val="0xff414"/>
<attr name="DetectorResourceName" type="string" val="ELink-414"/>
</obj>
<obj class="SwRodInputLink" id="ELink-415">
<attr name="FelixId" type="u64" val="0x415"/>
<attr name="DetectorResourceId" type="u32" val="0xff415"/>
<attr name="DetectorResourceName" type="string" val="ELink-415"/>
</obj>
<obj class="SwRodInputLink" id="ELink-416">
<attr name="FelixId" type="u64" val="0x416"/>
<attr name="DetectorResourceId" type="u32" val="0xff416"/>
<attr name="DetectorResourceName" type="string" val="ELink-416"/>
</obj>
</oks-data>
<?xml version="1.0" encoding="ASCII"?>
<!-- oks-data version 2.0 -->
<!DOCTYPE oks-data [
<!ELEMENT oks-data (info, (include)?, (comments)?, (obj)+)>
<!ELEMENT info EMPTY>
<!ATTLIST info
name CDATA #REQUIRED
type CDATA #REQUIRED
num-of-items CDATA #REQUIRED
oks-format CDATA #FIXED "data"
oks-version CDATA #REQUIRED
created-by CDATA #REQUIRED
created-on CDATA #REQUIRED
creation-time CDATA #REQUIRED
last-modified-by CDATA #REQUIRED
last-modified-on CDATA #REQUIRED
last-modification-time CDATA #REQUIRED
>
<!ELEMENT include (file)*>
<!ELEMENT file EMPTY>
<!ATTLIST file
path CDATA #REQUIRED
>
<!ELEMENT comments (comment)*>
<!ELEMENT comment EMPTY>
<!ATTLIST comment
creation-time CDATA #REQUIRED
created-by CDATA #REQUIRED
created-on CDATA #REQUIRED
author CDATA #REQUIRED
text CDATA #REQUIRED
>
<!ELEMENT obj (attr | rel)*>
<!ATTLIST obj
class CDATA #REQUIRED
id CDATA #REQUIRED
>
<!ELEMENT attr (data)*>
<!ATTLIST attr
name CDATA #REQUIRED
type (bool|s8|u8|s16|u16|s32|u32|s64|u64|float|double|date|time|string|uid|enum|class|-) "-"
val CDATA ""
>
<!ELEMENT data EMPTY>
<!ATTLIST data
val CDATA #REQUIRED
>
<!ELEMENT rel (ref)*>
<!ATTLIST rel
name CDATA #REQUIRED
class CDATA ""
id CDATA ""
>
<!ELEMENT ref EMPTY>
<!ATTLIST ref
class CDATA #REQUIRED
id CDATA #REQUIRED
>
]>
<oks-data>
<info name="" type="" num-of-items="50" oks-format="data" oks-version="oks-07-00-08 built &quot;Mar 30 2020&quot;" created-by="dliko" created-on="pcatd84" creation-time="20030414T160243" last-modified-by="kolos" last-modified-on="pc-tbed-pub-24.cern.ch" last-modification-time="20200330T145951"/>
<include>
<file path="daq/schema/swrod.schema.xml"/>
<file path="swrod-common.data.xml"/>
<file path="DataChannels.data.xml"/>
</include>
<obj class="SwRodRob" id="DET-ID_ROB-1">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x1"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-1"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-2">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x2"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-2"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-3">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x3"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-3"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-4">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x4"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-4"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-1">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-1"/>
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-2">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-2"/>
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-3">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-3"/>
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-4">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-4"/>
</rel>
</obj>
</oks-data>
<?xml version="1.0" encoding="ASCII"?>
<!-- oks-data version 2.0 -->
<!DOCTYPE oks-data [
<!ELEMENT oks-data (info, (include)?, (comments)?, (obj)+)>
<!ELEMENT info EMPTY>
<!ATTLIST info
name CDATA #REQUIRED
type CDATA #REQUIRED
num-of-items CDATA #REQUIRED
oks-format CDATA #FIXED "data"
oks-version CDATA #REQUIRED
created-by CDATA #REQUIRED
created-on CDATA #REQUIRED
creation-time CDATA #REQUIRED
last-modified-by CDATA #REQUIRED
last-modified-on CDATA #REQUIRED
last-modification-time CDATA #REQUIRED
>
<!ELEMENT include (file)*>
<!ELEMENT file EMPTY>
<!ATTLIST file
path CDATA #REQUIRED
>
<!ELEMENT comments (comment)*>
<!ELEMENT comment EMPTY>
<!ATTLIST comment
creation-time CDATA #REQUIRED
created-by CDATA #REQUIRED
created-on CDATA #REQUIRED
author CDATA #REQUIRED
text CDATA #REQUIRED
>
<!ELEMENT obj (attr | rel)*>
<!ATTLIST obj
class CDATA #REQUIRED
id CDATA #REQUIRED
>
<!ELEMENT attr (data)*>
<!ATTLIST attr
name CDATA #REQUIRED
type (bool|s8|u8|s16|u16|s32|u32|s64|u64|float|double|date|time|string|uid|enum|class|-) "-"
val CDATA ""
>
<!ELEMENT data EMPTY>
<!ATTLIST data
val CDATA #REQUIRED
>
<!ELEMENT rel (ref)*>
<!ATTLIST rel
name CDATA #REQUIRED
class CDATA ""
id CDATA ""
>
<!ELEMENT ref EMPTY>
<!ATTLIST ref
class CDATA #REQUIRED
id CDATA #REQUIRED
>
]>
<oks-data>
<info name="" type="" num-of-items="50" oks-format="data" oks-version="oks-07-00-08 built &quot;Mar 30 2020&quot;" created-by="dliko" created-on="pcatd84" creation-time="20030414T160243" last-modified-by="kolos" last-modified-on="pc-tbed-pub-24.cern.ch" last-modification-time="20200330T145951"/>
<include>
<file path="daq/schema/swrod.schema.xml"/>
<file path="swrod-common.data.xml"/>
<file path="DataChannels.data.xml"/>
</include>
<obj class="SwRodRob" id="DET-ID_ROB-1">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x1"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-1"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-2">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x2"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-2"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-3">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x3"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-3"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-4">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x4"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-4"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-1">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-1"/>
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-2">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-2"/>
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-3">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-3"/>
</rel>
</obj>
<obj class="SwRodModule" id="DET-ID_Module-4">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-4"/>
</rel>
</obj>
</oks-data>
......@@ -70,24 +70,20 @@
<file path="daq/schema/swrod_test.schema.xml"/>
<file path="daq/sw/common-templates.data.xml"/>
<file path="daq/sw/tags.data.xml"/>
<file path="daq/sw/swrod-common.data.xml"/>
<file path="swrod-common.data.xml"/>
<file path="hosts.data.xml"/>
<file path="DataChannels.data.xml"/>
<file path="Modules.data.xml"/>
</include>
<obj class="Detector" id="DET-ID">
<attr name="LogicalId" type="u8" val="1"/>
</obj>
<obj class="EventStorage" id="DET-ID_EventStorage">
<attr name="DirectoryToWrite" type="string" val="/scratch/data"/>
<attr name="MaxMegaBytesPerFile" type="u32" val="1024"/>
</obj>
<obj class="Segment" id="DET-ID_SWROD_Segment">
<rel name="Resources">
<ref class="SwRodApplication" id="DET-ID_SWROD"/>
<ref class="SwRodApplication" id="DET-ID_SWROD2"/>
</rel>
<rel name="IsControlledBy" class="RunControlTemplateApplication" id="DefRC"/>
</obj>
......@@ -113,7 +109,10 @@
</rel>
<rel name="RunsOn" class="Computer" id="pc-tbed-swrod-01.cern.ch"/>
<rel name="Contains">
<ref class="SwRodModule" id="DET-ID_Module"/>
<ref class="SwRodModule" id="DET-ID_Module-1"/>
<ref class="SwRodModule" id="DET-ID_Module-2"/>
<ref class="SwRodModule" id="DET-ID_Module-3"/>
<ref class="SwRodModule" id="DET-ID_Module-4"/>
</rel>
<rel name="Uses">
<ref class="SW_Repository" id="swrod-felix-repository"/>
......@@ -123,63 +122,70 @@
<rel name="Configuration" class="SwRodConfiguration" id="DET-ID_Configuration"/>
</obj>
<obj class="SwRodDefaultL1AHandler" id="TestL1AHandler">
<attr name="Type" type="string" val="L1AInputHandler"/>
<attr name="Link" type="u64" val="0x8033b0000"/>
<attr name="ResynchTimeout" type="u32" val="1000"/>
<rel name="InputMethod" class="SwRodFelixInput" id="FelixInput"/>
</obj>
<obj class="SwRodConfiguration" id="DET-ID_Configuration">
<attr name="ISServerName" type="string" val="DF"/>
<rel name="Plugins">
<ref class="SwRodPluginLib" id="DefaultCoreImplementation"/>
<ref class="SwRodPluginLib" id="TestCoreImplementation"/>
</rel>
<rel name="L1AHandler" class="SwRodDefaultL1AHandler" id="TestL1AHandler"/>
<rel name="L1AHandler" class="SwRodDefaultL1AHandler" id="L1AHandler"/>
<rel name="Consumers">
<ref class="SwRodEventSampler" id="EventSampler"/>
<ref class="SwRodFileWriter" id="DET-ID_FileWriter"/>
</rel>
<rel name="InputMethod" class="SwRodFelixInput" id="FelixInput"/>
</obj>
<obj class="SwRodFileWriter" id="DET-ID_FileWriter">
<attr name="WorkersNumber" type="u32" val="1"/>
<attr name="Type" type="string" val="FileWriter"/>
<attr name="QueueSize" type="u32" val="1024"/>
<rel name="EventStorage" class="EventStorage" id="DET-ID_EventStorage"/>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-1">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x1"/>
<obj class="SwRodApplication" id="DET-ID_SWROD2">
<attr name="InterfaceName" type="string" val="rc/commander"/>
<attr name="ActionTimeout" type="s32" val="10"/>
<attr name="ProbeInterval" type="s32" val="1"/>
<attr name="FullStatisticsInterval" type="s32" val="63"/>
<attr name="ControlsTTCPartitions" type="bool" val="0"/>
<attr name="Logging" type="bool" val="1"/>
<attr name="InitTimeout" type="u32" val="10"/>
<attr name="ExitTimeout" type="u32" val="5"/>
<attr name="RestartableDuringRun" type="bool" val="0"/>
<attr name="IfExitsUnexpectedly" type="enum" val="Error"/>
<attr name="IfFailsToStart" type="enum" val="Error"/>
<attr name="DataRequestDestination" type="enum" val="PC"/>
<attr name="CPU" type="string" val="0-15"/>
<rel name="Program" class="Binary" id="swrod_application"/>
<rel name="ProcessEnvironment">
<ref class="Variable" id="FI_VERBS_RX_SIZE"/>
<ref class="Variable" id="FI_VERBS_TX_SIZE"/>
</rel>
<rel name="RunsOn" class="Computer" id="pc-tbed-swrod-01.cern.ch"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-1"/>
<ref class="SwRodModule" id="DET-ID_Module-1"/>
<ref class="SwRodModule" id="DET-ID_Module-2"/>
<ref class="SwRodModule" id="DET-ID_Module-3"/>
<ref class="SwRodModule" id="DET-ID_Module-4"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="Consumers">
<ref class="SwRodCustomProcessor" id="CustomProcessor"/>
<rel name="Uses">
<ref class="SW_Repository" id="swrod-felix-repository"/>
</rel>
<rel name="MemoryConfiguration" class="MemoryPool" id="SwRodMemoryPool"/>
<rel name="Detector" class="Detector" id="DET-ID"/>
<rel name="Configuration" class="SwRodConfiguration" id="DET-ID_Configuration2"/>
</obj>
<obj class="SwRodRob" id="DET-ID_ROB-2">
<attr name="State" type="bool" val="1"/>
<attr name="Id" type="u32" val="0x2"/>
<rel name="Contains">
<ref class="SwRodDataChannel" id="DET-ID_DataChannel-2"/>
<obj class="SwRodConfiguration" id="DET-ID_Configuration2">
<attr name="ISServerName" type="string" val="DF"/>
<rel name="Plugins">
<ref class="SwRodPluginLib" id="DefaultCoreImplementation"/>
<ref class="SwRodPluginLib" id="TestCoreImplementation"/>
</rel>
<rel name="FragmentBuilder" class="SwRodGBTModeBuilder" id="GBTFragmentBuilder"/>
<rel name="L1AHandler" class="SwRodDefaultL1AHandler" id="L1AHandler"/>
<rel name="Consumers">
<ref class="SwRodCustomProcessor" id="CustomProcessor"/>
</rel>
<rel name="InputMethod" class="SwRodFelixInput" id="FelixInput2"/>
</obj>
<obj class="SwRodModule" id="DET-ID_Module">
<rel name="Contains">
<ref class="SwRodRob" id="DET-ID_ROB-1"/>
<ref class="SwRodRob" id="DET-ID_ROB-2"/>
</rel>
<obj class="SwRodFelixInput" id="FelixInput2">
<attr name="Type" type="string" val="FelixInput"/>
<attr name="DataNetwork" type="string" val="vlan109"/>
<attr name="FelixBusDirectory" type="string" val="/det/tdaq/felix-operation/bus"/>
<attr name="FelixBusGroupName" type="string" val="FELIX2"/>
<attr name="FelixBusTimeout" type="u32" val="10000"/>
</obj>
</oks-data>
......@@ -74,6 +74,23 @@
<file path="FelixEmulatorSegment.data.xml"/>
</include>
<obj class="Binary" id="swrod_dummy_trigger">
<attr name="BinaryName" type="string" val="swrod_dummy_trigger"/>
<attr name="Description" type="string" val="SW ROD dummy trigger binary"/>
<attr name="HelpURL" type="string" val=""/>
<rel name="BelongsTo" class="SW_Repository" id="swrod-patch-repository"/>
</obj>
<obj class="SW_Repository" id="swrod-patch-repository">
<attr name="Name" type="string" val="swrod-patch-repository"/>
<attr name="InstallationPath" type="string" val="/afs/cern.ch/user/k/kolos/public/installed/"/>
<rel name="Uses">
<ref class="SW_Repository" id="Online"/>
</rel>
<rel name="Tags">
<ref class="Tag" id="x86_64-el9-gcc13-opt"/>
</rel>
</obj>
<obj class="DFParameters" id="DET-ID_DataFlowParameters">
<attr name="BasePortEFD_SFI" type="u16" val="10000"/>
......@@ -98,8 +115,30 @@
<rel name="Recording" class="IS_EventsAndRates" id="SwRodRecordingISInfo"/>
</obj>
<obj class="MasterTrigger" id="SWROD_TestMasterTrigger">
<rel name="Controller" class="SwRodApplication" id="DET-ID_Felix_Emulator"/>
<obj class="RunControlApplication" id="MasterTrigger">
<attr name="InterfaceName" type="string" val="rc/commander"/>
<attr name="ActionTimeout" type="s32" val="10"/>
<attr name="ProbeInterval" type="s32" val="1"/>
<attr name="FullStatisticsInterval" type="s32" val="63"/>
<attr name="ControlsTTCPartitions" type="bool" val="0"/>
<attr name="Logging" type="bool" val="1"/>
<attr name="InitTimeout" type="u32" val="10"/>
<attr name="ExitTimeout" type="u32" val="5"/>
<attr name="RestartableDuringRun" type="bool" val="0"/>
<attr name="IfExitsUnexpectedly" type="enum" val="Error"/>
<attr name="IfFailsToStart" type="enum" val="Error"/>
<rel name="Program" class="Binary" id="swrod_dummy_trigger"/>
</obj>
<obj class="MasterTrigger" id="SWROD_MasterTrigger">
<rel name="Controller" class="RunControlApplication" id="MasterTrigger"/>
</obj>
<obj class="Segment" id="Trigger">
<rel name="Applications">
<ref class="RunControlApplication" id="MasterTrigger"/>
</rel>
<rel name="IsControlledBy" class="RunControlTemplateApplication" id="DefRC"/>
</obj>
<obj class="Partition" id="SwRodTest">
......@@ -116,6 +155,7 @@
<data val="cosmics"/>
</attr>
<rel name="Segments">
<ref class="Segment" id="Trigger"/>
<ref class="Segment" id="DET-ID_SWROD_Segment"/>
<ref class="Segment" id="DET-ID_Felix_Emulator_Segment"/>
</rel>
......@@ -136,7 +176,7 @@
<rel name="DataFlowParameters" class="DFParameters" id="DET-ID_DataFlowParameters"/>
<rel name="IS_InformationSource" class="IS_InformationSources" id="SwRodISMonitoring"/>
<rel name="RunTagList" class="RunTagList" id="ExampleUserTags"/>
<rel name="MasterTrigger" class="MasterTrigger" id="SWROD_TestMasterTrigger"/>
<rel name="MasterTrigger" class="MasterTrigger" id="SWROD_MasterTrigger"/>
</obj>
<obj class="RunTagList" id="ExampleUserTags">
......
......@@ -84,6 +84,19 @@
</rel>
</obj>
<obj class="Computer" id="pc-tbed-felix-07.cern.ch">
<attr name="HW_Tag" type="enum" val="x86_64-el9"/>
<attr name="Type" type="string" val="Intel(R) Xeon(R) CPU E5-1660 v4 @ 3.20GHz"/>
<attr name="State" type="bool" val="1"/>
<attr name="Memory" type="u32" val="32661"/>
<attr name="CPU" type="u16" val="32000"/>
<attr name="NumberOfCores" type="u16" val="8"/>
<attr name="RLogin" type="string" val="ssh"/>
<rel name="Interfaces">
<ref class="NetworkInterface" id="pc-tbed-felix-07-eth0"/>
</rel>
</obj>
<obj class="Computer" id="pc-tbed-swrod-01.cern.ch">
<attr name="HW_Tag" type="enum" val="x86_64-el9"/>
<attr name="Type" type="string" val="Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz"/>
......@@ -103,6 +116,12 @@
<attr name="InterfaceName" type="string" val="eth-100-0"/>
</obj>
<obj class="NetworkInterface" id="pc-tbed-felix-07-eth0">
<attr name="State" type="bool" val="1"/>
<attr name="IPAddress" type="string" val="10.193.16.113"/>
<attr name="InterfaceName" type="string" val="eth-100-0"/>
</obj>
<obj class="NetworkInterface" id="pc-tbed-swrod-01-eth0">
<attr name="State" type="bool" val="1"/>
<attr name="IPAddress" type="string" val="10.193.38.77"/>
......
......@@ -63,34 +63,32 @@
<oks-data>
<info name="" type="" num-of-items="17" oks-format="data" oks-version="138ccef built &quot;Dec 1 2023&quot;" created-by="dliko" created-on="pcatd84" creation-time="20030414T160243" last-modified-by="kolos" last-modified-on="pc-tbed-swrod-01.cern.ch" last-modification-time="20231201T100549"/>
<info name="" type="" num-of-items="14" oks-format="data" oks-version="oks-08-03-04-1-gf920aa4 built &quot;May 12 2022&quot;" created-by="dliko" created-on="pcatd84" creation-time="20030414T160243" last-modified-by="kolos" last-modified-on="pc-tbed-swrod-01.cern.ch" last-modification-time="20221017T093745"/>
<include>
<file path="daq/schema/swrod.schema.xml"/>
<file path="daq/sw/tags.data.xml"/>
</include>
<obj class="SW_Repository" id="swrod-felix-repository">
<attr name="Name" type="string" val="swrod-felix-repository"/>
<attr name="InstallationPath" type="string" val="/det/tdaq/felix/felix-04-02-10-rm4-stand-alone"/>
<rel name="Tags">
<ref class="Tag" id="x86_64-el9-gcc13-opt"/>
</rel>
</obj>
<obj class="MemoryPool" id="SwRodMemoryPool">
<attr name="Type" type="enum" val="MALLOC"/>
<attr name="NumberOfPages" type="u32" val="100000"/>
<attr name="PageSize" type="u32" val="4096"/>
<attr name="PageSize" type="u32" val="20000"/>
<attr name="NumberOfPages" type="u32" val="10000"/>
</obj>
<obj class="MemoryPool" id="SwRodStub">
<attr name="Type" type="enum" val="MALLOC"/>
<attr name="NumberOfPages" type="u32" val="100000"/>
<attr name="PageSize" type="u32" val="4096"/>
</obj>
<obj class="SW_Repository" id="swrod-felix-repository">
<attr name="Name" type="string" val="swrod-felix-repository"/>
<attr name="InstallationPath" type="string" val="/det/tdaq/felix/felix-04-02-10-rm4-stand-alone"/>
<rel name="Tags">
<ref class="Tag" id="x86_64-el9-gcc13-opt"/>
</rel>
</obj>
<obj class="SwRodCustomProcessor" id="CustomProcessor">
<attr name="FlushBufferAtStop" type="bool" val="1"/>
<attr name="QueueSize" type="u32" val="100000"/>
......@@ -104,7 +102,6 @@
<attr name="Type" type="string" val="L1AInputHandler"/>
<attr name="Link" type="u64" val="0x8033b0000"/>
<attr name="ResynchTimeout" type="u32" val="1000"/>
<rel name="InputMethod" class="SwRodFelixInput" id="FelixInput"/>
</obj>
<obj class="SwRodEventSampler" id="EventSampler">
......@@ -123,46 +120,41 @@
<attr name="DataNetwork" type="string" val="vlan109"/>
<attr name="FelixBusDirectory" type="string" val="/det/tdaq/felix-operation/bus"/>
<attr name="FelixBusGroupName" type="string" val="FELIX"/>
<attr name="FelixBusInterface" type="string" val="ZSYS_INTERFACE"/>
<attr name="FelixBusTimeout" type="u32" val="1000"/>
<attr name="FelixBusTimeout" type="u32" val="10000"/>
</obj>
<obj class="SwRodFullModeBuilder" id="FullFragmentBuilder">
<attr name="BuildersNumber" type="u32" val="1"/>
<attr name="DropCorruptedPackets" type="bool" val="0"/>
<attr name="UnsubscribeDisabledLinks" type="bool" val="1"/>
<attr name="FlushBufferAtStop" type="bool" val="1"/>
<attr name="L1AWaitTimeout" type="u32" val="5"/>
<attr name="MaxMessageSize" type="u32" val="100"/>
<attr name="ReadyQueueSize" type="u32" val="100000"/>
<attr name="ResynchTimeout" type="u32" val="4000"/>
<attr name="PacketDumpPath" type="string" val="/tmp"/>
<attr name="LinkLoggingLimit" type="u32" val="1000"/>
<attr name="AssemblyBufferSize" type="u32" val="100000"/>
<attr name="Type" type="string" val="FullModeBuilder"/>
<attr name="AddPacketHeader" type="bool" val="0"/>
<attr name="RODHeaderPresent" type="bool" val="0"/>
<attr name="MaxMessageSize" type="u32" val="100"/>
</obj>
<obj class="SwRodGBTModeBuilder" id="GBTFragmentBuilder">
<attr name="BuildersNumber" type="u32" val="1"/>
<attr name="DropCorruptedPackets" type="bool" val="0"/>
<attr name="UnsubscribeDisabledLinks" type="bool" val="1"/>
<attr name="FlushBufferAtStop" type="bool" val="1"/>
<attr name="L1AWaitTimeout" type="u32" val="5"/>
<attr name="L1AWaitTimeout" type="u32" val="50"/>
<attr name="MaxMessageSize" type="u32" val="3000"/>
<attr name="ReadyQueueSize" type="u32" val="100000"/>
<attr name="ResynchTimeout" type="u32" val="4000"/>
<attr name="PacketDumpPath" type="string" val="/tmp"/>
<attr name="LinkLoggingLimit" type="u32" val="1000"/>
<attr name="AssemblyBufferSize" type="u32" val="100000"/>
<attr name="AddPacketHeader" type="bool" val="1"/>
<attr name="Type" type="string" val="GBTModeBuilder"/>
<attr name="BufferSize" type="u32" val="100000"/>
<attr name="MinimumBufferSize" type="u32" val="64"/>
<attr name="RecoveryDepth" type="u32" val="10"/>
<attr name="DataReceivingTimeout" type="u32" val="20"/>
<attr name="DataReceivingTimeout" type="u32" val="0"/>
<attr name="L1AInitiatesTimeout" type="bool" val="1"/>
<attr name="MaxMessageSize" type="u32" val="100"/>
</obj>
<obj class="SwRodHLTRequestHandler" id="HLTHandler">
......@@ -176,17 +168,15 @@
<attr name="ClearTimeout" type="u32" val="2000"/>
<attr name="IgnoreClearXId" type="bool" val="0"/>
<attr name="MaxIndex" type="u32" val="200000"/>
<attr name="MaxReorder" type="u32" val="100"/>
<attr name="MaxClearAge" type="u32" val="600"/>
</obj>
<obj class="SwRodInternalDataGenerator" id="InternalData">
<attr name="Type" type="string" val="InternalData"/>
<attr name="PacketSize" type="u32" val="40"/>
<attr name="Pileup" type="u32" val="1"/>
<attr name="EcrInterval" type="u32" val="50000"/>
<attr name="SyncInterval" type="u32" val="10000"/>
<attr name="TTCQueueSize" type="u32" val="100000"/>
<attr name="PacketSize" type="u32" val="3000"/>
<attr name="Pileup" type="u32" val="10"/>
<attr name="EcrInterval" type="u32" val="500000"/>
<attr name="SyncInterval" type="u32" val="100"/>
<attr name="TTCQueueSize" type="u32" val="100"/>
<attr name="L1idBitMask" type="u32" val="0xffffffff"/>
<attr name="IsFullMode" type="bool" val="0"/>
<attr name="IsSingleton" type="bool" val="1"/>
......@@ -196,10 +186,10 @@
<attr name="Type" type="string" val="InternalL1A"/>
<attr name="Pileup" type="u32" val="1"/>
<attr name="EcrInterval" type="u32" val="500000"/>
<attr name="SyncInterval" type="u32" val="10000"/>
<attr name="TTCQueueSize" type="u32" val="100000"/>
<attr name="SyncInterval" type="u32" val="100"/>
<attr name="TTCQueueSize" type="u32" val="100"/>
<attr name="L1idBitMask" type="u32" val="0xffffffff"/>
<attr name="IsFullMode" type="bool" val="1"/>
<attr name="IsFullMode" type="bool" val="0"/>
<attr name="IsSingleton" type="bool" val="1"/>
</obj>
......@@ -216,11 +206,13 @@
</obj>
<obj class="Variable" id="FI_VERBS_RX_SIZE">
<attr name="Description" type="string" val=""/>
<attr name="Name" type="string" val="FI_VERBS_RX_SIZE"/>
<attr name="Value" type="string" val="1024"/>
</obj>
<obj class="Variable" id="FI_VERBS_TX_SIZE">
<attr name="Description" type="string" val=""/>
<attr name="Name" type="string" val="FI_VERBS_TX_SIZE"/>
<attr name="Value" type="string" val="1024"/>
</obj>
......
No preview for this file type
......@@ -200,6 +200,7 @@ void ROBFragmentBuilderBase::fragmentReady(FragmentAssembler::const_accessor & a
if (m_ready.try_push(a->first)) {
break;
}
usleep(5);
}
} else {
submitFragment(a->second);
......@@ -217,6 +218,7 @@ void ROBFragmentBuilderBase::submitFragment(const detail::DataHolder & dh) {
dh.m_l1id, m_l1a_wait_timeout_us/1000));
if (dh.m_l1id == uint32_t(-1)) {
m_statistics.droppedFragments++;
SWROD_THROTTLED_LOG(10000, "Fragment #" << dh.m_index << " for ROB 0x" << std::hex << m_ROB_id
<< " is dropped as its L1ID is unknown, total number of dropped fragments is "
<< std::dec << m_statistics.droppedFragments);
......
......@@ -42,8 +42,10 @@ namespace swrod {
&FullModeWorker<ReceiveTTC>::dataReceived>(*this)),
m_builder(builder),
m_memory_pool(
PTREE_GET_VALUE(robConfig, uint32_t, "MemoryConfiguration.PageSize"),
PTREE_GET_VALUE(robConfig, uint32_t, "MemoryConfiguration.NumberOfPages"))
PTREE_GET_VALUE(robConfig, uint32_t,
"MemoryConfiguration.PageSize"),
PTREE_GET_VALUE(robConfig, uint32_t,
"MemoryConfiguration.NumberOfPages"))
{ }
private:
......@@ -72,11 +74,11 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
<< " packet counter = " << link.m_packets_received);
if (not m_running) {
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
link.m_packets_dropped++;
ers::error(DroppedPacketException(ERS_HERE, link.m_fid,
link.m_packets_received, link.m_packets_dropped,
SpuriousPacketException(ERS_HERE, link.m_fid)));
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
return;
}
......@@ -88,6 +90,8 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
<< " BCID = 0x" << bcid << " L1ID bit mask = 0x" << l1id_mask);
if (link.m_last_l1id == l1id) {
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
link.m_packets_corrupted++;
link.m_packets_dropped++;
SWROD_THROTTLED_ERROR(1000,
DroppedPacketException(ERS_HERE, link.m_fid,
......@@ -100,10 +104,13 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
link.m_last_l1id = l1id;
uint32_t words_number = packet_size>>2;
bool packet_corrupted = false;
if (m_builder.isRODHeaderPresent()) {
if (words_number) {
uint32_t tag = *(uint32_t*)data;
if (tag != RODHeaderMarker_LE and tag != RODHeaderMarker_BE) {
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
packet_corrupted = true;
if (m_drop_corrupted) {
throw Exception(ERS_HERE, "Incorrect ROD header marker: "
+ (boost::format("0x%x") % tag).str());
......@@ -115,8 +122,10 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
}
if (words_number < swrod::RODHeaderTrailerSize) {
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
packet_corrupted = true;
if (m_drop_corrupted) {
throw Exception(ERS_HERE, "ROD fragment size is too small: "
throw Exception(ERS_HERE, "ROD fragment size is too short: "
+ (boost::format("%d words") % words_number).str());
}
rob_status |= ROBStatus::Specific::ShortFragment;
......@@ -127,6 +136,13 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
+ *((uint32_t*)data + words_number - 3) // the number of status words from the trailer
+ swrod::RODHeaderTrailerSize;
if (words_number != size) {
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
packet_corrupted = true;
if (m_drop_corrupted) {
throw Exception(ERS_HERE, "ROD fragment is truncated, expected size "
+ (boost::format("%d words") % size).str()
+ (boost::format(", fragment size %d words") % words_number).str());
}
rob_status |= ROBStatus::Specific::TxError;
rob_status |= ROBStatus::Specific::Format::FragmentSizeError;
rob_status |= ROBStatus::Generic::CorruptData;
......@@ -137,6 +153,12 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
uint32_t tag = *((uint32_t*)data + 2);
if ((tag & 0xffff0000) != RODMajorVersion_LE
and (tag & 0x0000ffff) != RODMajorVersion_BE) {
dumpPacket<uint8_t>(link, data, packet_size, felix_status);
packet_corrupted = true;
if (m_drop_corrupted) {
throw Exception(ERS_HERE, "ROD fragment format version is wrong: "
+ (boost::format("%d") % tag).str());
}
rob_status |= ROBStatus::Specific::Format::MajorVersionError;
rob_status |= ROBStatus::Specific::TxError;
rob_status |= ROBStatus::Generic::CorruptData;
......@@ -144,14 +166,22 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
}
}
link.m_packets_corrupted += packet_corrupted;
if (packet_size > m_max_message_size) {
link.m_packets_corrupted++;
rob_status |= ROBStatus::Specific::Truncated;
rob_status |= ROBStatus::Generic::BufferOverflow;
packet_size = m_max_message_size;
}
ROBFragment::Chunk chunk([this]{return m_memory_pool.alloc();});
ROBFragment::Chunk chunk([this]{
return ROBFragment::DataBlock((uint32_t*) m_memory_pool.allocate(),
m_memory_pool.blockSize() >> 2, 0,
[this](void *p) {
m_memory_pool.release(p);
});
});
if (m_add_packet_header and not m_builder.isRODHeaderPresent()) {
GBTChunk::Header header{
static_cast<uint16_t>((packet_size + 3 + sizeof(GBTChunk::Header))>>2),
......@@ -164,13 +194,13 @@ void swrod::FullModeWorker<ReceiveTTC>::dataReceived(Link &link,
}
catch (Exception &ex) {
link.m_packets_corrupted++;
dumpPacket<uint32_t>(link, data, packet_size, felix_status);
link.m_packets_dropped++;
SWROD_THROTTLED_ERROR(1000,
DroppedPacketException(
ERS_HERE, link.m_fid, link.m_packets_received, link.m_packets_dropped,
DataCorruptionException(
ERS_HERE, link.m_fid, link.m_packets_received, link.m_packets_corrupted, felix_status, ex)));
ERS_HERE, link.m_fid, link.m_packets_received, link.m_packets_corrupted,
felix_status, ex)));
}
}
......
......@@ -55,7 +55,15 @@ GBTModeWorker::GBTModeWorker(uint32_t index,
calculateMemoryPageSize(robConfig),
PTREE_GET_VALUE(robConfig, uint32_t, "MemoryConfiguration.NumberOfPages")),
m_buffer(m_maximum_buffer_size, m_initial_buffer_size,
[this]{return GBTBuilderBase::DataSlice([this]{return m_memory_pool.alloc();});},
[this]{
return GBTBuilderBase::DataSlice([this]{
return ROBFragment::DataBlock((uint32_t*) m_memory_pool.allocate(),
m_memory_pool.blockSize() >> 2, 0,
[this](void *p) {
m_memory_pool.release(p);
});
});
},
[this]{handleBufferOverflow();},
[](GBTBuilderBase::DataSlice & s){s.initTimer();}),
m_timeout_watcher([this]{handleTimer();}, 1,
......
......@@ -28,14 +28,11 @@ namespace {
NetioNextInput::NetioNextInput(const boost::property_tree::ptree& config)
try : m_timeout_ms(PTREE_GET_VALUE(config, int32_t, "FelixBusTimeout")),
m_interface(PTREE_GET_VALUE(config, std::string, "DataNetwork")),
m_felix_bus(PTREE_GET_VALUE(config, std::string, "FelixBusGroupName"),
PTREE_GET_VALUE(config, std::string, "FelixBusInterface")),
m_thread([this](const bool & a){run(a);},
"NetioNextInput", PTREE_GET_VALUE(config, std::string, "CPU"))
{
m_felix_bus.connect();
m_felix_bus.subscribe("FELIX", &m_felix_table);
m_felix_bus.subscribe("ELINKS", &m_elink_table);
m_felix_bus.set_path(PTREE_GET_VALUE(config, std::string, "FelixBusDirectory"));
m_felix_bus.set_groupname("FELIX");
netio_init(&m_context);
m_context.evloop.cb_init = nullptr;
......@@ -65,40 +62,36 @@ void NetioNextInput::actionsPending() {
}
void NetioNextInput::subscribeToFelix(const InputLinkId& link) {
std::string uuid = m_elink_table.getFelixId(link, m_timeout_ms);
std::string address = m_felix_table.getAddress(uuid);
std::error_code ec;
felixbus::FelixBusInfo info = m_felix_bus.get_info(link, ec);
std::regex regex("tcp://([^:]+):([0-9]+)");
std::smatch match_result;
if (!std::regex_match(address, match_result, regex) || match_result.size() != 3) {
throw BadAddressException(ERS_HERE, address, link, uuid);
if (ec) {
throw BadAddressException(ERS_HERE, "", link, "");
}
std::string host = match_result[1].str();
uint32_t port = std::stoi(match_result[2].str());
std::string address = info.ip + ":" + std::to_string(info.port);
auto it = m_sockets.find(address);
if (it == m_sockets.end()) {
struct netio_buffered_socket_attr attr;
attr.num_pages = m_felix_table.getNetioPages(uuid);
attr.pagesize = m_felix_table.getNetioPageSize(uuid);
attr.num_pages = info.netio_pages;
attr.pagesize = info.netio_pagesize;
attr.watermark = attr.pagesize * 0.9;
it = m_sockets.insert(std::make_pair(address, netio_subscribe_socket())).first;
netio_subscribe_socket_init(&it->second, &m_context, &attr, m_interface.c_str(), host.c_str(), port);
netio_subscribe_socket_init(&it->second, &m_context, &attr, m_interface.c_str(),
info.ip.c_str(), info.port);
it->second.usr = this;
it->second.recv_socket.cb_connection_established = nullptr;
it->second.cb_msg_received = &NetioNextInput::netioMessageReceived;
}
ERS_DEBUG(1, "Subscribing to '" << address << "' for link = " << link << " uuid = '" << uuid << "'\n\n");
ERS_DEBUG(1, "Subscribing to '" << address << "' for link = " << link << "'\n");
netio_subscribe_socket* socket = &it->second;
executeSynchronousAction([socket, link](){netio_subscribe(socket, link);});
ERS_DEBUG(1, "Subscribed to '" << address << "' for link = " << link << " uuid = '" << uuid << "'\n\n");
ERS_DEBUG(1, "Subscribed to '" << address << "' for link = " << link << "'\n");
}
void NetioNextInput::unsubscribeFromFelix(const InputLinkId& link) {
......
......@@ -12,10 +12,8 @@
#include <boost/property_tree/ptree.hpp>
#include <felixbus/bus.hpp>
#include <felixbus/elinktable.hpp>
#include <felixbus/felixtable.hpp>
#include <felix/felix_client_status.h>
#include <felixbus/felixbus.hpp>
#include <netio/netio.h>
......@@ -56,9 +54,7 @@ namespace swrod {
const uint32_t m_timeout_ms;
const std::string m_interface;
felix::bus::Bus m_felix_bus;
felix::bus::FelixTable m_felix_table;
felix::bus::ElinkTable m_elink_table;
felixbus::FelixBus m_felix_bus;
netio_context m_context;
netio_signal m_signal;
SocketMap m_sockets;
......
......@@ -10,11 +10,10 @@
#include <stdlib.h>
#include <cassert>
#include <cstdlib>
#include <vector>
#include <ers/ers.h>
#include <swrod/ROBFragment.h>
#include <tbb/spin_mutex.h>
namespace swrod {
......@@ -28,7 +27,7 @@ namespace detail {
m_max_blocks_per_page(max_blocks_per_page),
m_blocks_per_page(blocks_per_first_page)
{
ERS_ASSERT(m_block_size);
assert(m_block_size);
m_pages.reserve(1024);
......@@ -61,13 +60,6 @@ namespace detail {
return m_block_size;
}
ROBFragment::DataBlock alloc() {
return ROBFragment::DataBlock((uint32_t*) allocate(), m_block_size >> 2,
0, [this](void *p) {
release(p);
});
}
void * allocate() {
tbb::spin_mutex::scoped_lock lock(m_mutex);
if (m_free_block) {
......@@ -100,7 +92,7 @@ namespace detail {
m_current_block = reinterpret_cast<char*>(
std::aligned_alloc(k_mem_alignment, m_blocks_per_page * m_block_size));
ERS_ASSERT_MSG(m_current_block, "no memory left on this computer."
assert(m_current_block and "no memory left on this computer."
" Adjust configuration parameters to decrease memory usage.");
m_page_end = m_current_block + m_blocks_per_page * m_block_size;
......
......@@ -30,7 +30,7 @@ namespace swrod {
return 0;
}
for (auto passed = passed_since(since_us); passed < wait_time_us;
for (auto passed = passed_since(since_us); passed >= 0 and passed < wait_time_us;
passed = passed_since(since_us)) {
if (condition()) {
return passed;
......
#include "TriggerCommander/Exceptions.h"
#include "TriggerCommander/CommandedTrigger.h"
#include "TriggerCommander/MasterTrigger.h"
#include "TriggerCommander/HoldTriggerInfo.h"
#include <iostream>
#include <limits>
#include <boost/program_options.hpp>
#include <ipc/partition.h>
#include <ers/ers.h>
#include <system/User.h>
#include <system/Host.h>
#include <daq_tokens/common.h>
#include <daq_tokens/acquire.h>
#include <daq_tokens/issues.h>
#include <RunControl/Common/Controllable.h>
#include <RunControl/Common/CmdLineParser.h>
#include <RunControl/ItemCtrl/ItemCtrl.h>
namespace po = boost::program_options;
namespace daq { namespace trigger {
class MyMasterTrigger: public daq::trigger::MasterTrigger,
public daq::rc::Controllable {
IPCPartition m_partition;
std::string m_name;
std::string m_username;
std::string m_hostname;
TRIGGER::SenderContext ctx;
public:
MyMasterTrigger(const IPCPartition & p, const std::string & n) :
daq::trigger::MasterTrigger(),
m_partition(p),
m_name(n),
m_username(System::User().name_safe()),
m_hostname(System::LocalHost().full_name())
{
ERS_LOG("Instantiation of the implementation of the Master Trigger interface.");
ctx.userName = CORBA::string_dup(userCredentials().c_str());
ctx.hostName = CORBA::string_dup(m_hostname.c_str());
}
std::string userCredentials() const {
static const bool IS_TOKEN_ENABLED = daq::tokens::enabled();
return (IS_TOKEN_ENABLED == false)
? m_username : daq::tokens::acquire(daq::tokens::Mode::Reuse);
}
virtual HoldTriggerInfo hold(const std::string& s) override {
ERS_LOG("Putting trigger on hold and retrieving last valid ECR");
std::map<std::string, TRIGGER::commander_var> objects;
m_partition.getObjects<TRIGGER::commander>(objects);
TRIGGER::HoldTriggerInfo trgInfo;
for (auto it = objects.begin(); it != objects.end(); it++ )
{
if (m_name == it->first) {
continue;
}
try {
it->second->hold(ctx, s.c_str(), trgInfo);
}
catch(...) { }
}
return {trgInfo.ecrCounter, trgInfo.lastValidEL1ID};
}
virtual void resume(const std::string& s) override {
ERS_LOG("Resuming trigger");
std::map<std::string, TRIGGER::commander_var> objects;
m_partition.getObjects<TRIGGER::commander>(objects);
for (auto it = objects.begin(); it != objects.end(); it++ )
{
if (m_name == it->first) {
continue;
}
try {
it->second->resume(ctx, s.c_str());
}
catch(...) { }
}
}
virtual void setPrescales(uint32_t l1p, uint32_t hltp) override {
ERS_LOG("Setting L1 and HLT prescale keys to " << l1p << " and " << hltp);
}
virtual void setL1Prescales(uint32_t l1p) override {
ERS_LOG("Setting L1 prescales key to " << l1p);
}
virtual void setHLTPrescales(uint32_t hltp) override {
ERS_LOG("Switching to HLT prescales key " << hltp);
}
virtual void setLumiBlockInterval(uint32_t seconds) override {
ERS_LOG("Setting the luminosity block interval to " << seconds << " seconds");
}
virtual void setMinLumiBlockLength(uint32_t seconds) override {
ERS_LOG("Setting the minimum luminosity block length to " << seconds << " seconds");
}
virtual void increaseLumiBlock(uint32_t runno) override {
ERS_LOG("Increasing the luminosity block number");
}
virtual void setBunchGroup(uint32_t bg) override {
ERS_LOG("Setting bunch group key to " << bg);
}
virtual void setConditionsUpdate(uint32_t folderIndex, uint32_t lb) override {
ERS_LOG("Setting conditions at folder index " << folderIndex << " from luminosity block " << lb);
}
virtual void setPrescalesAndBunchgroup(uint32_t l1p, uint32_t hltp, uint32_t bg) override {
ERS_LOG("Setting prescale keys and bunch group to " << l1p << ", " << hltp << " and " << bg);
}
};
} }
int main(int argc, char **argv) {
// Initialize IPC
try {
IPCCore::init(argc, argv);
}
catch(daq::ipc::CannotInitialize& e) {
ers::fatal(e);
abort();
}
catch(daq::ipc::AlreadyInitialized& e) {
ers::warning(e);
}
// Command line parsing
try {
po::options_description desc("This program is a example data taking application.");
po::variables_map vm;
po::store(po::command_line_parser(argc, argv).options(desc).allow_unregistered().run(), vm);
po::notify(vm);
daq::rc::CmdLineParser cmdParser(argc, argv, true);
IPCPartition partition(cmdParser.partitionName());
std::shared_ptr<daq::rc::Controllable> ctrl(
new daq::trigger::MyMasterTrigger(partition, cmdParser.applicationName()));
daq::trigger::CommandedTrigger *commandReceiver =
new daq::trigger::CommandedTrigger(partition, cmdParser.applicationName(),
(daq::trigger::MyMasterTrigger*)ctrl.get());
daq::rc::ItemCtrl item(cmdParser, ctrl);
item.init();
ERS_LOG( "Dummy master trigger '" << cmdParser.applicationName()
<< "' has been started in the '" << partition.name() << "' partition." );
item.run();
commandReceiver->_destroy();
}
catch(std::exception& ex) {
ers::error(daq::trigger::CmdlParsing(ERS_HERE, "", ex));
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}