| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン |
| softwares:nestdaq:memo [2023/07/22 00:29] – kobayash | softwares:nestdaq:memo [2024/12/13 14:50] (現在) – kobayash |
|---|
| V V V | V V V |
| endpoint Scaler out type push method connect | endpoint Scaler out type push method connect |
| | </code> |
| | |
| | * 2024/07/11 GR honor seminar exp. |
| | 以下のようになっていると、SubTimeFrameBuilder でデータがこない。 |
| | {{:softwares:nestdaq:screen_shot_2024-07-11_at_20.38.43.png?400|}} |
| | <code> |
| | #!/bin/bash |
| | |
| | redis_server=`cat redis-server.txt|sed 's/[[:blank:]]//g'` |
| | server=redis://$redis_server/0 |
| | |
| | #function config_endpoint () { |
| | function endpoint () { |
| | # Usage: |
| | # config_endpoint "service" "channel" "parameters" |
| | |
| | echo redis-cli -u $server hset daq_service:topology:endpoint:$1:$2 ${@:3} |
| | redis-cli -u $server hset daq_service:topology:endpoint:$1:$2 ${@:3} |
| | } |
| | |
| | #function config_link () { |
| | function link () { |
| | # config_link "service1" "channel" "service2" "channel" "parameters" |
| | |
| | echo redis-cli -u $server set daq_service:topology:link:$1:$2,$3:$4 non |
| | redis-cli -u $server set daq_service:topology:link:$1:$2,$3:$4 none |
| | } |
| | |
| | echo "Clear DAQ service keys" |
| | redis-cli -u $server keys 'daq_service:*' | xargs redis-cli -u $server del |
| | |
| | echo "---------------------------------------------------------------------" |
| | echo " config endpoint (socket)" |
| | echo "---------------------------------------------------------------------" |
| | #------------------------------------------------------------------------------------ |
| | # service channel options |
| | #------------------------------------------------------------------------------------ |
| | |
| | # Sampler |
| | endpoint AmQStrTdcSampler out type push method bind |
| | |
| | # subtime frame builder |
| | endpoint STFBuilder in type pull method connect |
| | endpoint STFBuilder out type push method connect autoSubChannel true |
| | endpoint STFBuilder dqm type push method bind |
| | |
| | #Scaler |
| | #endpoint Scaler in type pull method connect |
| | #endpoint Scaler out type push method connect |
| | |
| | # tf |
| | endpoint TimeFrameBuilder in type pull method bind |
| | endpoint TimeFrameBuilder out type push method connect # autoSubChannel true |
| | #endpoint TimeFrameBuilder decimator type push method connect |
| | |
| | # Sink |
| | endpoint FileSink in type pull method bind |
| | #endpoint DecSink in type pull method bind |
| | |
| | echo "---------------------------------------------------------------------" |
| | echo " config link" |
| | echo "---------------------------------------------------------------------" |
| | #------------------------------------------------------------------------------------ |
| | # service1 channel1 service2 channel2 |
| | #------------------------------------------------------------------------------------ |
| | |
| | link AmQStrTdcSampler out STFBuilder in |
| | link STFBuilder out TimeFrameBuilder in |
| | #link STFBuilder dqm Scaler in |
| | #link Scaler out ScrSink in |
| | link TimeFrameBuilder out FileSink in |
| | #link TimeFrameBuilder decimator DecSink in |
| | </code> |
| | |
| | === Redis のキーがない時のエラー === |
| | |
| | <code> |
| | [14:36:52][DEBUG] registryUri: tcp://192.168.2.82:6379/0 |
| | [14:36:52][DEBUG] Exception caught in ProcessWork(), going to Error state |
| | [14:36:52][INFO] daq::service::Plugin state : ERROR |
| | [14:36:52][DEBUG] daq::service::Plugin run number (from redis) = 1033 |
| | [14:36:52][DEBUG] daq::service::MetricsPlugin state change: ERROR |
| | [14:36:52][DEBUG] Shutting down Plugin Manager |
| | [14:36:52][DEBUG] daq::service::ParameterConfigPlugin bye |
| | [14:36:52][DEBUG] Unloaded plugin: 'parameter_config', version '0.0.0', maintainer 'ParameterConfig <maintainer@daq.service.net>', homepage 'https://github.com/spadi-alliance/nestdaq' |
| | [14:36:52][DEBUG] daq::service::MetricsPluginUnsubscribeFromDeviceStateChange() |
| | [14:36:52][DEBUG] ~daq::service::MetricsPlugin() bye |
| | [14:36:52][DEBUG] Unloaded plugin: 'metrics', version '0.0.0', maintainer 'Metrics <maintainer@daq.service.net>', homepage 'https://github.com/spadi-alliance/nestdaq' |
| | [14:36:52][WARN] daq::service::Plugin UnsubscribeFromDeviceStateChange() |
| | [14:36:52][DEBUG] daq::service::TopologyConfig Reset |
| | [14:36:52][DEBUG] daq::service::TopologyConfig Unregister n deleted = 3 |
| | [14:36:52][DEBUG] daq::service::Plugin Unregister |
| | [14:36:52][DEBUG] redis : 4 deleted |
| | [14:36:52][DEBUG] delete redis hash. key = daq_service:service-instance-index:FileSink, field = 0 |
| | [14:36:52][DEBUG] ~daq::service::Plugin() bye |
| | [14:36:52][DEBUG] Unloaded plugin: 'daq_service', version '0.0.0', maintainer 'DAQService <maintainer@daq.service.net>', homepage 'https://github.com/spadi-alliance/nestdaq' |
| | [14:36:52][DEBUG] Unloaded plugin: 'control', version '1.4.56', maintainer 'FairRootGroup <fairroot@gsi.de>', homepage 'https://github.com/FairRootGroup/FairMQ' |
| | [14:36:52][DEBUG] Unloaded plugin: 'config', version '1.4.56', maintainer 'FairRootGroup <fairroot@gsi.de>', homepage 'https://github.com/FairRootGroup/FairMQ' |
| | [14:36:52][DEBUG] Shutting down Plugin Services |
| | [14:36:52][DEBUG] Shutting down device FileSink-0 |
| | [14:36:52][STATE] Exiting FairMQ state machine |
| | [14:36:52][DEBUG] Destroying ZeroMQ transport... |
| | [14:36:52][ERROR] Uncaught exception reached the top of main: std::bad_alloc |
| | </code> |
| | |
| | <code> |
| | [13:59:51][STATE] READY ---> RUNNING |
| | [13:59:51][INFO] daq::service::Plugin state : RUNNING |
| | [13:59:51][DEBUG] daq::service::Plugin run number (from redis) = 1029 |
| | [13:59:51][DEBUG] daq::service::MetricsPlugin state change: RUNNING |
| | [13:59:51][INFO] fair::mq::Device running... |
| | [13:59:51][INFO] 370:PreRun |
| | [13:59:51][DEBUG] Run number: 1029 |
| | [13:59:51][DEBUG] registryUri: tcp://192.168.2.82:6379/0 |
| | run comment here 1 : |
| | run comment here 2: |
| | ./start_device.sh: 54 行: 377055 Segmentation fault (コアダンプ) /home/spadi/nestdaq/bin/FileSink -S '</home/spadi/nestdaq/lib64' -P daq_service -P metrics -P parameter_config --registry-uri tcp://192.168.2.82:6379/0 --metrics-uri tcp://192.168.2.82:6379/1 --parameter-config-uri tcp://192.168.2.82:6379/2 --scaler-uri tcp://192.168.2.82:6379/3 --severity debug4 |
| | </code> |
| | |
| | <code> |
| | if (fConfig->Count("registry-uri")) { |
| | std::string registryUri = fConfig->GetProperty<std::string>("registry-uri"); |
| | LOG(debug) << "registryUri: " << registryUri; |
| | if (!registryUri.empty()) { |
| | fClient = std::make_shared<sw::redis::Redis>(registryUri); |
| | std::string key; |
| | fClient->keys("run_info:run_comment", &key); |
| | if (key.length()>0) { |
| | auto run_comment_ptr = fClient->get("run_info:run_comment"); |
| | run_comment = *run_comment_ptr; |
| | LOG(debug) << "run comment: " << run_comment; |
| | }else{ |
| | LOG(debug) << "There is no key run_info:run_comment"; |
| | } |
| | } |
| | } |
| </code> | </code> |
| |