ServiceTable.h
Go to the documentation of this file.
1 ///
2 /// \file EventDisplayBase/ServiceTable.h
3 /// \brief Interface to services and their configurations
4 /// \author messier@indiana.edu
5 ///
6 #ifndef EVDB_SERVICETABLE_H
7 #define EVDB_SERVICETABLE_H
8 #include "cetlib/exempt_ptr.h"
11 
12 #include <vector>
13 #include <map>
14 #include <string>
15 #include <tuple>
16 
17 namespace evdb {
18 
19  static constexpr int kDRAWING_SERVICE = 1;
20  static constexpr int kEXPERIMENT_SERVICE = 2;
21 
22  ///
23  /// \brief Information about a service required by the event display
24  ///
29  int fCategory;
31  };
32 
33  ///
34  /// \brief Collection of Services used in the event display
35  ///
36  class ServiceTable {
37  public:
38  static ServiceTable& Instance();
39 
40  void RegisterService(fhicl::ParameterSet const& ps, cet::exempt_ptr<Reconfigurable> s);
41  static bool IsDrawingService(std::string const& s);
42 
43  void Edit(unsigned int i);
44  void ApplyEdits();
45 
46  static void OverrideCategory(std::string const& s, int cat);
47  fhicl::ParameterSet const& GetParameterSet(unsigned int i) const;
48 
49  public:
50  std::vector<ServiceTableEntry> fServices;
51 
52  private:
53  static std::map<std::string, int> fgCategoryOverrides;
54  ServiceTable();
55  };
56 }
57 
58 #endif
59 ////////////////////////////////////////////////////////////////////////
static constexpr int kDRAWING_SERVICE
Definition: ServiceTable.h:19
Collection of Services used in the event display.
Definition: ServiceTable.h:36
cet::exempt_ptr< Reconfigurable > fService
Definition: ServiceTable.h:30
static std::map< std::string, int > fgCategoryOverrides
Definition: ServiceTable.h:53
Manage all things related to colors for the event display.
Definition: Display3DPad.h:11
const XML_Char * s
Definition: expat.h:262
static constexpr int kEXPERIMENT_SERVICE
Definition: ServiceTable.h:20
Interface class to services that are intended to be reconfigurable through the event display...
std::vector< ServiceTableEntry > fServices
Definition: ServiceTable.h:50
fhicl::ParameterSet fCurrentParamSet
Definition: ServiceTable.h:27
Information about a service required by the event display.
Definition: ServiceTable.h:25
enum BeamMode string