Skip to content

Commit 00cf7ce

Browse files
committed
Add DemoDataProduct to subrun_example, update bookkeeping
1 parent 0438eff commit 00cf7ce

File tree

4 files changed

+38
-39
lines changed

4 files changed

+38
-39
lines changed

rc/control/bookkeeping.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,15 +1188,13 @@ def art_analyzer_count(procinfo):
11881188
for subsystem_id, subsystem in self.subsystems.items():
11891189

11901190
init_fragment_counts = {}
1191-
broadcast_fragment_counts = {}
11921191

11931192
for procinfo in [pi for pi in self.procinfos if pi.subsystem == subsystem_id]:
11941193

11951194
if procinfo.name not in init_fragment_counts:
11961195

11971196
possible_event_senders = []
11981197
init_fragment_count = 0
1199-
broadcast_fragment_count = 0
12001198

12011199
if procinfo.name == "EventBuilder":
12021200
for ss_source in subsystem.sources:
@@ -1208,8 +1206,7 @@ def art_analyzer_count(procinfo):
12081206
if sends_to_via_RootNetOutput(
12091207
possible_sender_procinfo, procinfo
12101208
):
1211-
init_fragment_count += 1
1212-
broadcast_fragment_count += art_analyzer_count(possible_sender_procinfo)
1209+
init_fragment_count += art_analyzer_count(possible_sender_procinfo)
12131210
elif procinfo.name == "DataLogger":
12141211
for possible_sender_procinfo in [
12151212
pi
@@ -1220,8 +1217,7 @@ def art_analyzer_count(procinfo):
12201217
if sends_to_via_RootNetOutput(
12211218
possible_sender_procinfo, procinfo
12221219
):
1223-
init_fragment_count += 1
1224-
broadcast_fragment_count += art_analyzer_count(possible_sender_procinfo)
1220+
init_fragment_count += art_analyzer_count(possible_sender_procinfo)
12251221
elif procinfo.name == "Dispatcher":
12261222
for possible_sender_procinfo in [
12271223
pi
@@ -1232,8 +1228,7 @@ def art_analyzer_count(procinfo):
12321228
if sends_to_via_RootNetOutput(
12331229
possible_sender_procinfo, procinfo
12341230
):
1235-
init_fragment_count += 1
1236-
broadcast_fragment_count += art_analyzer_count(possible_sender_procinfo)
1231+
init_fragment_count += art_analyzer_count(possible_sender_procinfo)
12371232
if (
12381233
init_fragment_count == 0
12391234
): # Dispatcher will _always_ receive init Fragments, this probably means we're running without DataLoggers
@@ -1246,24 +1241,16 @@ def art_analyzer_count(procinfo):
12461241
if sends_to_via_RootNetOutput(
12471242
possible_sender_procinfo, procinfo
12481243
):
1249-
init_fragment_count += 1
1250-
broadcast_fragment_count += art_analyzer_count(possible_sender_procinfo)
1244+
init_fragment_count += art_analyzer_count(possible_sender_procinfo)
12511245

12521246
init_fragment_counts[procinfo.name] = init_fragment_count
1253-
broadcast_fragment_counts[procinfo.name] = broadcast_fragment_count
12541247

12551248
procinfo.fhicl_used = re.sub(
12561249
"init_fragment_count\s*:\s*\S+",
12571250
"init_fragment_count: %d" % init_fragment_counts[procinfo.name],
12581251
procinfo.fhicl_used,
12591252
)
12601253

1261-
procinfo.fhicl_used = re.sub(
1262-
"broadcast_fragment_count\s*:\s*\S+",
1263-
"broadcast_fragment_count: %d" % broadcast_fragment_counts[procinfo.name],
1264-
procinfo.fhicl_used,
1265-
)
1266-
12671254

12681255
def bookkeeping_for_fhicl_documents_artdaq_v4_base(self):
12691256
pass

simple_test_config/subrun_example/EventBuilder1.fcl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ daq: {
66
event_builder: {
77
expected_fragments_per_event: 0 # Will be set by DAQInterface
88
use_art: true
9+
art_analyzer_count: 5
910
buffer_count: 20
1011
max_incomplete_events: 75 # Same as boardreader sync interval
1112
verbose: true
@@ -45,7 +46,11 @@ art: {
4546
}
4647
}
4748

48-
producers: { }
49+
producers: {
50+
demoProd: {
51+
module_type: DemoDataProducer
52+
}
53+
}
4954

5055
filters: {
5156
prescaleMod2: {
@@ -60,8 +65,9 @@ art: {
6065

6166
pmod2: [ prescaleMod2 ]
6267
pmod3: [ prescaleMod3 ]
63-
68+
6469
a1: [ toy1Integ, toy2Integ ]
70+
p1: [ demoProd ]
6571
my_output_modules: [ rootNetOutput ]
6672
}
6773

simple_test_config/subrun_example/EventBuilder2.fcl

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ daq: {
66
event_builder: {
77
expected_fragments_per_event: 0 # Will be set by DAQInterface
88
use_art: true
9+
art_analyzer_count: 5
910
buffer_count: 20
1011
max_incomplete_events: 75 # Same as boardreader sync interval
1112
verbose: true
@@ -43,24 +44,29 @@ physics: {
4344
frag_type: "TOY2"
4445
}
4546
}
46-
47-
producers: { }
48-
49-
filters: {
50-
prescaleMod2: {
51-
module_type: NthEvent
52-
nth: 2
47+
48+
producers: {
49+
demoProd: {
50+
module_type: DemoDataProducer
51+
}
5352
}
54-
prescaleMod3: {
55-
module_type: NthEvent
56-
nth: 3
53+
54+
filters: {
55+
prescaleMod2: {
56+
module_type: NthEvent
57+
nth: 2
58+
}
59+
prescaleMod3: {
60+
module_type: NthEvent
61+
nth: 3
62+
}
5763
}
58-
}
5964

60-
pmod2: [ prescaleMod2 ]
61-
pmod3: [ prescaleMod3 ]
65+
pmod2: [ prescaleMod2 ]
66+
pmod3: [ prescaleMod3 ]
6267

63-
a1: [ toy1Integ, toy2Integ ]
68+
a1: [ toy1Integ, toy2Integ ]
69+
p1: [ demoProd ]
6470
my_output_modules: [ rootNetOutput ]
6571
}
6672

simple_test_config/subrun_example/boot.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ EventBuilder label: EventBuilder2
1515
DataLogger host: localhost
1616
DataLogger label: DataLogger1
1717

18-
DataLogger host: localhost
19-
DataLogger label: DataLogger2
18+
# DataLogger host: localhost
19+
# DataLogger label: DataLogger2
2020

21-
DataLogger host: localhost
22-
DataLogger label: DataLogger3
21+
# DataLogger host: localhost
22+
# DataLogger label: DataLogger3
2323

24-
DataLogger host: localhost
25-
DataLogger label: DataLogger4
24+
# DataLogger host: localhost
25+
# DataLogger label: DataLogger4
2626

2727
Dispatcher host: localhost
2828
Dispatcher label: Dispatcher1

0 commit comments

Comments
 (0)