Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GfxStripListCfg Class Reference

Configurable for a GfxStripList. More...

#include <GfxStripListCfg.h>

Inheritance diagram for GfxStripListCfg:

GfxCfg GfxCfg CfgConfigurable CfgConfigurable CfgConfigurable CfgConfigurable List of all members.

Public Types

enum  StripEnd_t { kFull = 0, kHalf, kBit, kBowTie }
enum  MeasureScale_t { kTime = 0, kCharge }
enum  ScaleIs_t { kAbsolute, kRelative }
enum  SizeBy_t {
  kArea = 0, kFixed, kLinear, kLogLinear,
  kLogArea
}
enum  ShapeIs_t { kRectangle, kEllipse }
enum  StripEnd_t { kFull = 0, kHalf, kBit, kBowTie }
enum  MeasureScale_t { kTime = 0, kCharge }
enum  ScaleIs_t { kAbsolute, kRelative }
enum  SizeBy_t {
  kArea = 0, kFixed, kLinear, kLogLinear,
  kLogArea
}
enum  ShapeIs_t { kRectangle, kEllipse }

Public Member Functions

double GetSizeFactor ()
StripEnd_t GetStripEnd ()
MeasureScale_t GetSizeIs ()
ScaleIs_t GetScaleIs ()
SizeBy_t GetSizeBy ()
ShapeIs_t GetShapeIs ()
 GfxStripListCfg (Registry *initial_config=0)
 ~GfxStripListCfg ()
double GetSizeFactor ()
StripEnd_t GetStripEnd ()
MeasureScale_t GetSizeIs ()
ScaleIs_t GetScaleIs ()
SizeBy_t GetSizeBy ()
ShapeIs_t GetShapeIs ()
 GfxStripListCfg (Registry *initial_config=0)
 ~GfxStripListCfg ()

Detailed Description

Configurable for a GfxStripList.

Id
GfxStripListCfg.h,v 1.1 2003/05/21 20:59:54 musser Exp

EVD

Contact: bv@bnl.gov

Created on: Fri Aug 23 14:58:57 2002

Definition at line 23 of file EventDisplay/GfxStripListCfg.h.


Member Enumeration Documentation

enum GfxStripListCfg::MeasureScale_t
 

Enumeration values:
kTime 
kCharge 

Definition at line 45 of file Midad/MultiPage/GfxStripListCfg.h.

00045                  {
00046         kTime=0,                // Measure represents time 
00047         kCharge                 // Measure represents charge
00048     } MeasureScale_t;

enum GfxStripListCfg::MeasureScale_t
 

Enumeration values:
kTime 
kCharge 

Definition at line 45 of file EventDisplay/GfxStripListCfg.h.

Referenced by GetSizeIs().

00045                  {
00046         kTime=0,                // Measure represents time 
00047         kCharge                 // Measure represents charge
00048     } MeasureScale_t;

enum GfxStripListCfg::ScaleIs_t
 

Enumeration values:
kAbsolute 
kRelative 

Definition at line 52 of file Midad/MultiPage/GfxStripListCfg.h.

00052                  {
00053         kAbsolute,              // scale hits in pixels or
00054         kRelative               // in relative units
00055     } ScaleIs_t;

enum GfxStripListCfg::ScaleIs_t
 

Enumeration values:
kAbsolute 
kRelative 

Definition at line 52 of file EventDisplay/GfxStripListCfg.h.

Referenced by GetScaleIs().

00052                  {
00053         kAbsolute,              // scale hits in pixels or
00054         kRelative               // in relative units
00055     } ScaleIs_t;

enum GfxStripListCfg::ShapeIs_t
 

Enumeration values:
kRectangle 
kEllipse 

Definition at line 68 of file Midad/MultiPage/GfxStripListCfg.h.

00068                  {
00069         kRectangle,             // use rectable for strip shape
00070         kEllipse                // use ellipse for strip shape
00071     } ShapeIs_t;

enum GfxStripListCfg::ShapeIs_t
 

Enumeration values:
kRectangle 
kEllipse 

Definition at line 68 of file EventDisplay/GfxStripListCfg.h.

Referenced by GetShapeIs().

00068                  {
00069         kRectangle,             // use rectable for strip shape
00070         kEllipse                // use ellipse for strip shape
00071     } ShapeIs_t;

enum GfxStripListCfg::SizeBy_t
 

Enumeration values:
kArea 
kFixed 
kLinear 
kLogLinear 
kLogArea 

Definition at line 58 of file Midad/MultiPage/GfxStripListCfg.h.

00058                  {              // How to size the strips
00059         kArea=0,                // width*height propto charge
00060         kFixed,                 // fixed, physical size (-epsilon)
00061         kLinear,                // width/height propto charge
00062         kLogLinear,             // log of above
00063         kLogArea                // log of above
00064     } SizeBy_t;

enum GfxStripListCfg::SizeBy_t
 

Enumeration values:
kArea 
kFixed 
kLinear 
kLogLinear 
kLogArea 

Definition at line 58 of file EventDisplay/GfxStripListCfg.h.

Referenced by GetSizeBy().

00058                  {              // How to size the strips
00059         kArea=0,                // width*height propto charge
00060         kFixed,                 // fixed, physical size (-epsilon)
00061         kLinear,                // width/height propto charge
00062         kLogLinear,             // log of above
00063         kLogArea                // log of above
00064     } SizeBy_t;

enum GfxStripListCfg::StripEnd_t
 

Enumeration values:
kFull 
kHalf 
kBit 
kBowTie 

Definition at line 36 of file Midad/MultiPage/GfxStripListCfg.h.

00036                  {
00037         kFull=0,                // draw full extent of strip
00038         kHalf,                  // +/- ends above/below
00039         kBit,                   // +end + -end >= 1 ? ON : OFF
00040         kBowTie                // +/- ends diagonally opposed
00041     } StripEnd_t;

enum GfxStripListCfg::StripEnd_t
 

Enumeration values:
kFull 
kHalf 
kBit 
kBowTie 

Definition at line 36 of file EventDisplay/GfxStripListCfg.h.

Referenced by GetStripEnd().

00036                  {
00037         kFull=0,                // draw full extent of strip
00038         kHalf,                  // +/- ends above/below
00039         kBit,                   // +end + -end >= 1 ? ON : OFF
00040         kBowTie                // +/- ends diagonally opposed
00041     } StripEnd_t;


Constructor & Destructor Documentation

GfxStripListCfg::GfxStripListCfg Registry initial_config = 0  ) 
 

Definition at line 7 of file EventDisplay/GfxStripListCfg.cxx.

References CfgConfigurable::CommitDefaultConfig(), CfgConfigurable::GetConfig(), Registry::Set(), and GfxCfg::SetPossibles().

00008 {
00009 //    cerr << "GfxStripListCfg(" << init_config << ")\n";
00010 
00011     if (init_config) this->CommitDefaultConfig(*init_config);
00012     else {
00013         Registry r(false);
00014         r.Set("SizeIs","Charge");
00015         r.Set("ScaleIs","Relative");
00016         r.Set("StripEndStyle","Full");
00017         r.Set("SizeBy","Area");
00018         r.Set("ShapeIs","Ellipse");
00019         r.Set("SizeFactor",5.0);
00020         this->CommitDefaultConfig(r);
00021         this->GetConfig() = r;
00022     }
00023 
00024     Registry size_reg;
00025     size_reg.SetName("Size Is");
00026     size_reg.Set("Time","Time");
00027     size_reg.Set("Charge","Charge");
00028     
00029     Registry scale_reg;
00030     scale_reg.SetName("Scale Is");
00031     scale_reg.Set("Absolute","Absolute");
00032     scale_reg.Set("Relative","Relative");
00033 
00034     Registry sestyle_reg;
00035     sestyle_reg.SetName("Strip End Style");
00036     sestyle_reg.Set("Half","Half");
00037     sestyle_reg.Set("Full","Full");
00038     sestyle_reg.Set("BowTie","BowTie");
00039     sestyle_reg.Set("Bit","Bit");
00040     
00041     Registry sizeby_reg;
00042     sizeby_reg.SetName("Size by");
00043     sizeby_reg.Set("Area","Area");
00044     sizeby_reg.Set("Fixed","Fixed");
00045     sizeby_reg.Set("Linear","Linear");
00046     sizeby_reg.Set("LogLinear","LogLinear");
00047     sizeby_reg.Set("LogArea","LogArea");
00048 
00049     Registry shape_reg;
00050     shape_reg.SetName("Shape type");
00051     shape_reg.Set("Rectangle","Rectangle");
00052     shape_reg.Set("Ellipse","Ellipse");
00053 
00054     Registry possibles;
00055     possibles.Set("SizeIs",size_reg);
00056     possibles.Set("ScaleIs",scale_reg);
00057     possibles.Set("StripEndStyle",sestyle_reg);
00058     possibles.Set("SizeBy",sizeby_reg);
00059     possibles.Set("ShapeIs",shape_reg);
00060 
00061     this->SetPossibles(possibles);
00062 }

GfxStripListCfg::~GfxStripListCfg  ) 
 

Definition at line 64 of file EventDisplay/GfxStripListCfg.cxx.

00065 {
00066 
00067 }

GfxStripListCfg::GfxStripListCfg Registry initial_config = 0  ) 
 

GfxStripListCfg::~GfxStripListCfg  ) 
 


Member Function Documentation

ScaleIs_t GfxStripListCfg::GetScaleIs  ) 
 

GfxStripListCfg::ScaleIs_t GfxStripListCfg::GetScaleIs  ) 
 

Definition at line 102 of file EventDisplay/GfxStripListCfg.cxx.

References Registry::Get(), CfgConfigurable::GetConfig(), and ScaleIs_t.

Referenced by GfxStrip::Configure(), and GfxStrip::Paint().

00103 {
00104     const char* value;
00105     if (! this->GetConfig().Get("ScaleIs",value)) return kAbsolute;
00106     std::string vstr = value;
00107     if (vstr == "Relative") return kRelative;
00108     return kAbsolute;
00109 }

ShapeIs_t GfxStripListCfg::GetShapeIs  ) 
 

GfxStripListCfg::ShapeIs_t GfxStripListCfg::GetShapeIs  ) 
 

Definition at line 121 of file EventDisplay/GfxStripListCfg.cxx.

References Registry::Get(), CfgConfigurable::GetConfig(), and ShapeIs_t.

Referenced by GfxStrip::Configure(), and GfxStrip::Paint().

00122 {
00123     const char* value;
00124     if (!this->GetConfig().Get("ShapeIs",value)) return kRectangle;
00125     std::string vstr = value;
00126     if (vstr == "Ellipse") return kEllipse;
00127     return kRectangle;
00128 }

SizeBy_t GfxStripListCfg::GetSizeBy  ) 
 

GfxStripListCfg::SizeBy_t GfxStripListCfg::GetSizeBy  ) 
 

Definition at line 110 of file EventDisplay/GfxStripListCfg.cxx.

References Registry::Get(), CfgConfigurable::GetConfig(), and SizeBy_t.

Referenced by GfxStrip::ModifyCoords().

00111 {
00112     const char* value;
00113     if (! this->GetConfig().Get("SizeBy",value)) return kArea;
00114     std::string vstr = value;
00115     if (vstr == "Fixed") return kFixed;
00116     if (vstr == "Linear") return kLinear;
00117     if (vstr == "LogLinear") return kLogLinear;
00118     if (vstr == "LogArea") return kLogArea;
00119     return kArea;
00120 }

double GfxStripListCfg::GetSizeFactor  ) 
 

double GfxStripListCfg::GetSizeFactor  ) 
 

Definition at line 69 of file EventDisplay/GfxStripListCfg.cxx.

References Registry::Get(), and CfgConfigurable::GetConfig().

Referenced by GfxStrip::ModifyCoords().

00070 {
00071 //    cerr << this->GetConfig() << endl;
00072 
00073     double sf = 1.0;
00074     if (! this->GetConfig().Get("SizeFactor",sf)) {
00075 //        cerr << "Failed to get SizeFactor\n";
00076         return 1.0;
00077     }
00078     return sf;
00079 }

MeasureScale_t GfxStripListCfg::GetSizeIs  ) 
 

GfxStripListCfg::MeasureScale_t GfxStripListCfg::GetSizeIs  ) 
 

Definition at line 94 of file EventDisplay/GfxStripListCfg.cxx.

References Registry::Get(), CfgConfigurable::GetConfig(), and MeasureScale_t.

Referenced by GfxStrip::ModifyCoords().

00095 {
00096     const char* value;
00097     if (! this->GetConfig().Get("SizeIs",value)) return kTime;
00098     std::string vstr = value;
00099     if (vstr == "Charge") return kCharge;
00100     return kTime;
00101 }

StripEnd_t GfxStripListCfg::GetStripEnd  ) 
 

GfxStripListCfg::StripEnd_t GfxStripListCfg::GetStripEnd  ) 
 

Definition at line 84 of file EventDisplay/GfxStripListCfg.cxx.

References Registry::Get(), CfgConfigurable::GetConfig(), and StripEnd_t.

Referenced by GfxStrip::ModifyCoords().

00085 {
00086     const char* value;
00087     if (! this->GetConfig().Get("StripEnd",value)) return kFull;
00088     std::string vstr = value;
00089     if (vstr == "Half") return kHalf;
00090     if (vstr == "Bit") return kBit;
00091     if (vstr == "BowTie") return kBowTie;
00092     return kFull;
00093 }


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:15 2010 for loon by  doxygen 1.3.9.1