FragmentType.hh
Go to the documentation of this file.
1 #ifndef dune_artdaq_Overlays_FragmentType_hh
2 #define dune_artdaq_Overlays_FragmentType_hh
3 #include "artdaq-core/Data/Fragment.hh"
4 
5 namespace dune {
6 
7  static std::vector<std::string> const
8  names { "MISSED",
9  "TPC",
10  "PHOTON",
11  "TRIGGER",
12  "TIMING",
13  "TOY1",
14  "TOY2",
15  "FELIX",
16  "CRT",
17  "CTB",
18  "CPUHITS",
19  "DEVBOARDHITS",
20  "FRAME14",
21  "UNKNOWN" };
22 
23  namespace detail {
24  enum FragmentType : artdaq::Fragment::type_t
25  { MISSED = artdaq::Fragment::FirstUserFragmentType,
26  TPC,
33  CRT,
34  CTB,
38  INVALID // Should always be last.
39  };
40 
41  // Safety check.
42  static_assert(artdaq::Fragment::isUserFragmentType(FragmentType::INVALID - 1),
43  "Too many user-defined fragments!");
44  }
45 
47 
50 
51  std::map<artdaq::Fragment::type_t, std::string> makeFragmentTypeMap();
52 }
53 #endif /* dune_artdaq_Overlays_FragmentType_hh */
std::string string
Definition: nybbler.cc:12
FragmentType toFragmentType(std::string t_string)
Definition: FragmentType.cc:10
std::string fragmentTypeToString(FragmentType val)
Definition: FragmentType.cc:24
std::map< artdaq::Fragment::type_t, std::string > makeFragmentTypeMap()
Definition: FragmentType.cc:35
static std::vector< std::string > const names
Definition: FragmentType.hh:8