DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DisplayConfiguration.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 // Original Author: Matevz Tadel 2009 (MultiView.C)
12 //
13 //==========================================================================
14 #ifndef DDEVE_DISPLAYCONFIGURATION_H
15 #define DDEVE_DISPLAYCONFIGURATION_H
16 
17 // Framework include files
18 #include "TClass.h"
19 
20 // C/C++ include files
21 #include <string>
22 #include <list>
23 #include <map>
24 
26 namespace dd4hep {
27 
28  // Forward declarations
29  class Display;
30 
32  /*
33  * The data content is filled from the XML configuration file
34  * and then used when building the application interface
35  *
36  * \author M.Frank
37  * \version 1.0
38  * \ingroup DD4HEP_EVE
39  */
41  protected:
43  public:
44 
45  enum { NO_DATA = 0,
46  CALODATA = 1<<1,
47  DETELEMENT = 1<<2,
48  VIEW = 1<<3,
49  PANEL = 1<<4,
50  COLLECTION = 1<<5
51  };
52 
54  struct Defaults {
55  char load_geo;
56  char show_evt;
57  short default_pad;
58  int color;
59  float alpha;
60  };
61 
63  struct Calo3D : public Defaults {
65  };
66 
68  struct Calodata : public Defaults {
70  float eta_min, eta_max;
71  float phi_min, phi_max;
72  short n_eta;
73  short n_phi;
74  int spare;
75  };
76 
78  struct Panel : public Defaults {
79  };
80 
82  struct Hits : public Defaults {
83  float size; // Marker size
84  float width;
85  float threshold;
86  float towerH;
87  float emax; // Max energy deposit displayed
88  int type; // Marker type
89  };
90 
92  class Config {
93  public:
95  union Values {
96  double vals[20];
102  } data;
103  std::string name;
104  std::string hits;
105  std::string use;
106  int type;
108  Config();
110  Config(const Config& c);
112  ~Config();
114  Config& operator=(const Config& c);
115  };
116  typedef std::vector<Config> Configurations;
117 
119  class ViewConfig : public Config {
120  public:
121  std::string type;
126  ViewConfig();
128  ViewConfig(const ViewConfig& c);
130  virtual ~ViewConfig();
132  ViewConfig& operator=(const ViewConfig& c);
133  };
134  typedef std::list<ViewConfig> ViewConfigurations;
135 
142  public:
146  virtual ~DisplayConfiguration();
149  };
150 } /* End namespace dd4hep */
151 #endif // DDEVE_DISPLAYCONFIGURATION_H
152 
dd4hep::Display
The main class of the DDEve display.
Definition: Display.h:56
dd4hep::DisplayConfiguration::Calo3D::rmin
float rmin
Definition: DisplayConfiguration.h:64
dd4hep::DisplayConfiguration::Config::Values::vals
double vals[20]
Definition: DisplayConfiguration.h:96
dd4hep::DisplayConfiguration::Config::Values::calodata
Calodata calodata
Definition: DisplayConfiguration.h:99
dd4hep::DisplayConfiguration::Panel
Generic panel configuration.
Definition: DisplayConfiguration.h:78
dd4hep::DisplayConfiguration::Config::Values::hits
Hits hits
Definition: DisplayConfiguration.h:101
dd4hep::DisplayConfiguration::Calodata::rmin
float rmin
Definition: DisplayConfiguration.h:69
dd4hep::DisplayConfiguration::COLLECTION
@ COLLECTION
Definition: DisplayConfiguration.h:50
dd4hep::DisplayConfiguration::DisplayConfiguration
DisplayConfiguration(Display *eve)
Initializing constructor.
dd4hep::DisplayConfiguration::Config::data
union dd4hep::DisplayConfiguration::Config::Values data
dd4hep::DisplayConfiguration::ClassDef
ClassDef(DisplayConfiguration, 0)
Root implementation macro.
dd4hep::DisplayConfiguration::Calodata::eta_max
float eta_max
Definition: DisplayConfiguration.h:70
dd4hep::DisplayConfiguration::Calo3D
Configuration class for 3D calorimeter display.
Definition: DisplayConfiguration.h:63
dd4hep::DisplayConfiguration::ViewConfig::subdetectors
Configurations subdetectors
Definition: DisplayConfiguration.h:122
dd4hep::DisplayConfiguration::Defaults::default_pad
short default_pad
Definition: DisplayConfiguration.h:57
dd4hep::DisplayConfiguration::Defaults::load_geo
char load_geo
Definition: DisplayConfiguration.h:55
dd4hep::DisplayConfiguration::ViewConfig::show_structure
bool show_structure
Definition: DisplayConfiguration.h:124
dd4hep::DisplayConfiguration::VIEW
@ VIEW
Definition: DisplayConfiguration.h:48
dd4hep::DisplayConfiguration::Defaults::color
int color
Definition: DisplayConfiguration.h:58
dd4hep::DisplayConfiguration::NO_DATA
@ NO_DATA
Definition: DisplayConfiguration.h:45
dd4hep::DisplayConfiguration::ViewConfig::show_sensitive
bool show_sensitive
Definition: DisplayConfiguration.h:123
dd4hep::DisplayConfiguration::Config::Values::pane
Panel pane
Definition: DisplayConfiguration.h:100
dd4hep::DisplayConfiguration::Hits::towerH
float towerH
Definition: DisplayConfiguration.h:86
dd4hep::DisplayConfiguration::ViewConfig::~ViewConfig
virtual ~ViewConfig()
Default destructor.
Definition: DisplayConfiguration.cpp:49
dd4hep::DisplayConfiguration::Defaults
Default base class for all configurations.
Definition: DisplayConfiguration.h:54
dd4hep::DisplayConfiguration::Calodata::towerH
float towerH
Definition: DisplayConfiguration.h:69
dd4hep::DisplayConfiguration::Calodata::phi_min
float phi_min
Definition: DisplayConfiguration.h:71
dd4hep::DisplayConfiguration::views
ViewConfigurations views
Container with view configurations.
Definition: DisplayConfiguration.h:137
dd4hep::DisplayConfiguration::ViewConfig::operator=
ViewConfig & operator=(const ViewConfig &c)
Assignment operator.
Definition: DisplayConfiguration.cpp:53
dd4hep::DisplayConfiguration::ViewConfig::ViewConfig
ViewConfig()
Default constructor.
Definition: DisplayConfiguration.cpp:35
dd4hep::DisplayConfiguration::Calo3D::threshold
float threshold
Definition: DisplayConfiguration.h:64
dd4hep::DisplayConfiguration::Config::Values::defaults
Defaults defaults
Definition: DisplayConfiguration.h:97
dd4hep::DisplayConfiguration::Defaults::show_evt
char show_evt
Definition: DisplayConfiguration.h:56
dd4hep::DisplayConfiguration::Hits::width
float width
Definition: DisplayConfiguration.h:84
dd4hep::DisplayConfiguration::Hits::type
int type
Definition: DisplayConfiguration.h:88
dd4hep::DisplayConfiguration::Calo3D::dz
float dz
Definition: DisplayConfiguration.h:64
dd4hep::DisplayConfiguration::Calodata::eta_min
float eta_min
Definition: DisplayConfiguration.h:70
dd4hep::DisplayConfiguration::Calodata::spare
int spare
Definition: DisplayConfiguration.h:74
dd4hep::DisplayConfiguration::~DisplayConfiguration
virtual ~DisplayConfiguration()
Default destructor.
Definition: DisplayConfiguration.cpp:31
dd4hep::DisplayConfiguration::Calodata::n_eta
short n_eta
Definition: DisplayConfiguration.h:72
dd4hep::DisplayConfiguration::Hits::threshold
float threshold
Definition: DisplayConfiguration.h:85
dd4hep::DisplayConfiguration::Calodata::n_phi
short n_phi
Definition: DisplayConfiguration.h:73
dd4hep::DisplayConfiguration::Config
Container with full display configuration.
Definition: DisplayConfiguration.h:92
dd4hep::DisplayConfiguration::CALODATA
@ CALODATA
Definition: DisplayConfiguration.h:46
dd4hep::DisplayConfiguration::ViewConfig::type
std::string type
Definition: DisplayConfiguration.h:121
dd4hep::DisplayConfiguration::PANEL
@ PANEL
Definition: DisplayConfiguration.h:49
dd4hep::DisplayConfiguration::Config::Values::calo3d
Calo3D calo3d
Definition: DisplayConfiguration.h:98
dd4hep::DisplayConfiguration::ViewConfigurations
std::list< ViewConfig > ViewConfigurations
Definition: DisplayConfiguration.h:134
dd4hep::DisplayConfiguration::DETELEMENT
@ DETELEMENT
Definition: DisplayConfiguration.h:47
dd4hep::DisplayConfiguration::Config::name
std::string name
Definition: DisplayConfiguration.h:103
dd4hep::DisplayConfiguration::ViewConfig
View configuration.
Definition: DisplayConfiguration.h:119
dd4hep::DisplayConfiguration::Hits::size
float size
Definition: DisplayConfiguration.h:83
dd4hep::DisplayConfiguration::m_display
Display * m_display
Definition: DisplayConfiguration.h:42
dd4hep::DisplayConfiguration::Calodata::threshold
float threshold
Definition: DisplayConfiguration.h:69
dd4hep::DisplayConfiguration::Hits::emax
float emax
Definition: DisplayConfiguration.h:87
dd4hep::DisplayConfiguration::Calodata
Configuration class for 3D calorimeter data display.
Definition: DisplayConfiguration.h:68
dd4hep::DisplayConfiguration::Calodata::emax
float emax
Definition: DisplayConfiguration.h:69
dd4hep::DisplayConfiguration
Generic display configuration structure for DDEve.
Definition: DisplayConfiguration.h:40
dd4hep::DisplayConfiguration::Config::~Config
~Config()
Default destructor.
Definition: DisplayConfiguration.cpp:82
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::DisplayConfiguration::Calo3D::emax
float emax
Definition: DisplayConfiguration.h:64
dd4hep::DisplayConfiguration::Calodata::dz
float dz
Definition: DisplayConfiguration.h:69
dd4hep::DisplayConfiguration::Config::hits
std::string hits
Definition: DisplayConfiguration.h:104
dd4hep::DisplayConfiguration::Hits
Configuration class for hit data display.
Definition: DisplayConfiguration.h:82
dd4hep::DisplayConfiguration::Config::operator=
Config & operator=(const Config &c)
Assignment operator.
Definition: DisplayConfiguration.cpp:86
dd4hep::DisplayConfiguration::calodata
Configurations calodata
Container with calorimeter data configurations.
Definition: DisplayConfiguration.h:139
dd4hep::DisplayConfiguration::Calo3D::towerH
float towerH
Definition: DisplayConfiguration.h:64
dd4hep::DisplayConfiguration::Defaults::alpha
float alpha
Definition: DisplayConfiguration.h:59
dd4hep::DisplayConfiguration::Config::Values
Union to store specific data. Discriminator is Config::type.
Definition: DisplayConfiguration.h:95
dd4hep::DisplayConfiguration::Configurations
std::vector< Config > Configurations
Definition: DisplayConfiguration.h:116
dd4hep::DisplayConfiguration::Config::use
std::string use
Definition: DisplayConfiguration.h:105
dd4hep::DisplayConfiguration::Calodata::phi_max
float phi_max
Definition: DisplayConfiguration.h:71
dd4hep::DisplayConfiguration::collections
Configurations collections
Container for data collection configurations.
Definition: DisplayConfiguration.h:141
dd4hep::DisplayConfiguration::Config::Config
Config()
Default constructor.
Definition: DisplayConfiguration.cpp:64
dd4hep::DisplayConfiguration::Config::type
int type
Definition: DisplayConfiguration.h:106