Project

General

Profile

Feature #24810

Explicitly state Fragment Type in FragmentType.hh enum

Added by Eric Flumerfelt 3 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
08/17/2020
Due date:
% Done:

0%

Estimated time:
Duration:

Description

We should make sure that since Fragment Types should be set-in-stone for the lifetime of an experiment, that in FragmentType.hh/.cc, the enumeration values are set explicitly as offsets from FirstUserFragmentType and the names vector should be replaced with an unordered_map<type_t, std::string>.

Associated revisions

Revision 3d9e3ef5 (diff)
Added by Eric Flumerfelt 3 months ago

Issue #24810

Explicitly set the artdaq_demo Fragment Type IDs to offsets of
FirstUserFragmentType. This allows new Fragment Types to be inserted in
the list without disrupting access to previous data files (i.e. if we
wanted to add TOY3 type fragments, we can now add them after TOY2
instead of before INVALID). Update names to a map between Fragment Type
and std::string.

History

#1 Updated by Eric Flumerfelt 3 months ago

  • Assignee set to Eric Flumerfelt
  • Status changed from New to Resolved

Implemented in artdaq-core-demo:feature/24810_FragmentType_ExplicitlySetTypeCodes.

#2 Updated by Eric Flumerfelt 3 months ago

I have also tested that data files created using the changed version of artdaq_core_demo are compatible with older artdaq_core_demo and vice versa.

#3 Updated by Ron Rechenmacher 17 days ago

  • Status changed from Resolved to Reviewed

I ran the demo with and w/o branch code to produce 2 files. Then went back and ran rawEventDump 4 ways.

#4 Updated by Eric Flumerfelt 8 days ago

  • Target version set to artdaq_core_demo v1_07_01
  • Status changed from Reviewed to Closed

Also available in: Atom PDF