File indexing completed on 2025-12-16 10:12:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef DDEVE_DISPLAYCONFIGURATION_H
0015 #define DDEVE_DISPLAYCONFIGURATION_H
0016
0017
0018 #include "TClass.h"
0019
0020
0021 #include <string>
0022 #include <list>
0023 #include <map>
0024
0025
0026 namespace dd4hep {
0027
0028
0029 class Display;
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 class DisplayConfiguration {
0041 protected:
0042 Display* m_display;
0043 public:
0044
0045 enum { NO_DATA = 0,
0046 CALODATA = 1<<1,
0047 DETELEMENT = 1<<2,
0048 VIEW = 1<<3,
0049 PANEL = 1<<4,
0050 COLLECTION = 1<<5
0051 };
0052
0053
0054 struct Defaults {
0055 char load_geo;
0056 char show_evt;
0057 short default_pad;
0058 int color;
0059 float alpha;
0060 };
0061
0062
0063 struct Calo3D : public Defaults {
0064 float rmin, dz, threshold, towerH, emax;
0065 };
0066
0067
0068 struct Calodata : public Defaults {
0069 float rmin, dz, threshold, towerH, emax;
0070 float eta_min, eta_max;
0071 float phi_min, phi_max;
0072 short n_eta;
0073 short n_phi;
0074 int spare;
0075 };
0076
0077
0078 struct Panel : public Defaults {
0079 };
0080
0081
0082 struct Hits : public Defaults {
0083 float size;
0084 float width;
0085 float threshold;
0086 float towerH;
0087 float emax;
0088 int type;
0089 };
0090
0091
0092 class Config {
0093 public:
0094
0095 union Values {
0096 double vals[20];
0097 Defaults defaults;
0098 Calo3D calo3d;
0099 Calodata calodata;
0100 Panel pane;
0101 Hits hits;
0102 } data;
0103 std::string name;
0104 std::string hits;
0105 std::string use;
0106 int type;
0107
0108 Config();
0109
0110 Config(const Config& c);
0111
0112 ~Config();
0113
0114 Config& operator=(const Config& c);
0115 };
0116 typedef std::vector<Config> Configurations;
0117
0118
0119 class ViewConfig : public Config {
0120 public:
0121 std::string type;
0122 Configurations subdetectors;
0123 bool show_sensitive;
0124 bool show_structure;
0125
0126 ViewConfig();
0127
0128 ViewConfig(const ViewConfig& c);
0129
0130 virtual ~ViewConfig();
0131
0132 ViewConfig& operator=(const ViewConfig& c);
0133 };
0134 typedef std::list<ViewConfig> ViewConfigurations;
0135
0136
0137 ViewConfigurations views;
0138
0139 Configurations calodata;
0140
0141 Configurations collections;
0142 public:
0143
0144 DisplayConfiguration(Display* eve);
0145
0146 virtual ~DisplayConfiguration();
0147
0148 ClassDef(DisplayConfiguration,0);
0149 };
0150 }
0151 #endif
0152