Migrating to artdaq v3 08 00 - art-daq/artdaq GitHub Wiki
{{toc}}
Migrating to artdaq v3_08_00
artdaq v3_08_00 no longer uses SharedMemoryReader, and therefore experiment-specific input sources will no longer compile. The replacement functionality is the ArtdaqFragmentNamingServiceInterface. Simple input source implementations (i.e. those that do not map Fragments to specific art branches) can migrate using artdaq-demo:source:artdaq-demo/ArtModules/ArtdaqDemoFragmentNamingService_service.cc as a template.
Once the new FragmentNamingService implementation is created, for
example “YourExperimentFragmentNamingService”, then you should add
art.services.ArtdaqFragmentNamingServiceInterface: { service_provider: YourExperimentFragmentNamingService }
to your FHiCL configuration documents.
Example Configurations (BEFORE DAQInterface bookkeeping)
BoardReader
Note that this configuration is unchanged from v3_07_02
daq: {
fragment_receiver: {
# CommandableFragmentGenerator Configuration:
fragment_ids: []
fragment_id: -99 # Please define only one of these
sleep_on_stop_us: 0
# Possible values are: Ignored, Single, Buffer, Window
request_mode: "Ignored"
data_buffer_depth_fragments: 1000
data_buffer_depth_mb: 1000
request_port: 3001
request_address: "227.128.12.26" # Multicast request address
# Request message contains tzero. Window will be from tzero -
# offset to tzero + width
request_window_offset: 0
request_window_width: 0
# How long to wait before discarding request messages that are
# outside the available data
stale_request_timeout: "0xFFFFFFFF"
# If request windows are unique, avoids a copy operation, but
# the same data point cannot be used for two requests. If this
# is not anticipated, leave set to "true"
request_windows_are_unique: true
# separate_data_thread MUST be true for requests to be
# applied! If requests are not desired, but a separate readout
# thread is, set this to true and request_mode to ignored.
separate_data_thread: false
# Whether a thread should be started which periodically calls
# checkHWStatus_, a user-defined function which should be used
# to check hardware status registers and report to MetricMan:
separate_monitoring_thread: false
# How often, in microseconds, checkHWStatus_() should be
# called. 0 to disable:
hardware_poll_interval_us: 0
generator: ToySimulator
fragment_type: TOY1
fragment_id: 0
board_id: 0
starting_fragment_id: 0
random_seed: 8250
sleep_on_stop_us: 500000
nADCcounts: 40
max_fragment_size_bytes: 200
throttle_usecs: 100000
distribution_type: 2
timestamp_scale_factor: 1
destinations: { }
routing_table_config: {
use_routing_master: false
}
}
metrics: {
brFile: {
metricPluginType: "file"
level: 4
fileName: "boardreader/br_%UID%_metrics.log"
absolute_file_path: false
uniquify: true
}
}
}
EventBuilder
daq: {
event_builder: {
expected_fragments_per_event: 0 # Will be set by DAQInterface
use_art: true
print_event_store_stats: true
buffer_count: 20
max_incomplete_events: 75 # Same as boardreader sync interval
verbose: true
send_requests: false
routing_token_config: {
use_routing_master: false
}
sources: { }
}
metrics: {
evbFile: {
metricPluginType: "file"
level: 4
fileName: "eventbuilder/evb_%UID%_metrics.log"
absolute_file_path: false
uniquify: true
}
}
}
art: {
services: {
ArtdaqSharedMemoryServiceInterface: {
service_provider: ArtdaqSharedMemoryService
waiting_time: 2500000
resume_after_timeout: true
}
ArtdaqFragmentNamingServiceInterface: { service_provider: ArtdaqDemoFragmentNamingService }
}
outputs: {
rootNetOutput: {
module_type: RootNetOutput
#SelectEvents: { SelectEvents: [ pmod2,pmod3 ] }
#broadcast_sends: true
destinations: { }
routing_table_config: {
use_routing_master: false
}
}
#normalOutput: {
# module_type: RootDAQOut
# fileName: "/tmp/artdaqdemo_eb00_r%06r_sr%02s_%to_%#.root"
# #SelectEvents: { SelectEvents: [ pmod2,pmod3 ] }
# fileProperties: { maxSubRuns: 1 maxRuns: 1 }
# compressionLevel: 3
# fastCloning: false
#}
}
physics: {
analyzers: {
toy1Integ: {
module_type: CheckIntegrity
raw_data_label: "daq"
frag_type: "TOY1"
}
toy2Integ: {
module_type: CheckIntegrity
raw_data_label: "daq"
frag_type: "TOY2"
}
}
producers: {
}
filters: {
prescaleMod2: {
module_type: NthEvent
nth: 2
}
prescaleMod3: {
module_type: NthEvent
nth: 3
}
}
pmod2: [ prescaleMod2 ]
pmod3: [ prescaleMod3 ]
a1: [ toy1Integ, toy2Integ ]
my_output_modules: [ rootNetOutput ]
#my_output_modules: [ normalOutput ]
}
source: {
module_type: ArtdaqInput
}
process_name: DAQ
}
DataLogger
daq: {
aggregator: {
expected_events_per_bunch: 1
print_event_store_stats: true
event_queue_depth: 40
event_queue_wait_time: 5
buffer_count: 40
onmon_event_prescale: 1
is_data_logger: true
auto_suppression_enabled: false
routing_token_config: {
use_routing_master: false
}
sources: { }
}
metrics: {
aggFile: {
metricPluginType: "file"
level: 4
fileName: "aggregator/agg_%UID%_metrics.log"
absolute_file_path: false
uniquify: true
}
#ganglia: {
# metricPluginType: "ganglia"
# level: 4
# reporting_interval: 15.0
# configFile: "/etc/ganglia/gmond.conf"
# group: "ARTDAQ"
#}
}
}
art: {
services: {
ArtdaqSharedMemoryServiceInterface: {
service_provider: ArtdaqSharedMemoryService
}
}
source: {
module_type: ArtdaqInput
register_fragment_types: false
}
outputs: {
normalOutput: {
module_type: RootDAQOut
fileName: "/tmp/artdaqdemo_r%06r_sr%02s_%to_%#.root"
fileProperties: { maxSubRuns: 1 maxRuns: 1 }
fastCloning: false
compressionLevel: 3
}
rootNetOutput: {
module_type: RootNetOutput
#SelectEvents: { SelectEvents: [ pmod2,pmod3 ] }
broadcast_sends: true
nonblocking_sends: true
destinations: { }
}
}
physics: {
analyzers: {
checkintegrity: {
module_type: CheckIntegrity
raw_data_label: daq
frag_type: TOY1
}
checkintegrity2: {
module_type: CheckIntegrity
raw_data_label: daq
frag_type: TOY2
}
}
producers: {
BuildInfo:
{
module_type: ArtdaqDemoBuildInfo
instance_name: ArtdaqDemo
}
}
p2: [ BuildInfo ]
a1: [ checkintegrity, checkintegrity2 ]
my_output_modules: [ normalOutput ]
my_mpi_output_modules: [rootNetOutput]
}
process_name: DAQDL
}