GfxDigitListCfg Class Reference

#include <GfxDigitListCfg.h>

Inheritance diagram for GfxDigitListCfg:
GfxCfg GfxCfg CfgConfigurable CfgConfigurable CfgConfigurable CfgConfigurable

List of all members.

Public Types

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

Public Member Functions

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

Detailed Description

Id
GfxDigitListCfg.h,v 1.1 2003/05/21 20:59:53 musser Exp
Id
GfxDigitListCfg.h,v 1.5 2002/12/31 20:03:13 bv Exp

Definition at line 23 of file EventDisplay/HEAD/GfxDigitListCfg.h.


Member Enumeration Documentation

Enumerator:
kFull 
kHalf 
kBit 
kBowTie 
kFull 
kHalf 
kBit 
kBowTie 

Definition at line 36 of file Midad/HEAD/MultiPage/GfxDigitListCfg.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     } DigitEnd_t;

Enumerator:
kFull 
kHalf 
kBit 
kBowTie 
kFull 
kHalf 
kBit 
kBowTie 

Definition at line 36 of file EventDisplay/HEAD/GfxDigitListCfg.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     } DigitEnd_t;

Enumerator:
kTime 
kCharge 
kTime 
kCharge 

Definition at line 45 of file Midad/HEAD/MultiPage/GfxDigitListCfg.h.

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

Enumerator:
kTime 
kCharge 
kTime 
kCharge 

Definition at line 45 of file EventDisplay/HEAD/GfxDigitListCfg.h.

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

Enumerator:
kAbsolute 
kRelative 
kAbsolute 
kRelative 

Definition at line 52 of file Midad/HEAD/MultiPage/GfxDigitListCfg.h.

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

Enumerator:
kAbsolute 
kRelative 
kAbsolute 
kRelative 

Definition at line 52 of file EventDisplay/HEAD/GfxDigitListCfg.h.

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

Enumerator:
kRectangle 
kEllipse 
kRectangle 
kEllipse 

Definition at line 68 of file Midad/HEAD/MultiPage/GfxDigitListCfg.h.

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

Enumerator:
kRectangle 
kEllipse 
kRectangle 
kEllipse 

Definition at line 68 of file EventDisplay/HEAD/GfxDigitListCfg.h.

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

Enumerator:
kArea 
kFixed 
kLinear 
kLogLinear 
kLogArea 
kArea 
kFixed 
kLinear 
kLogLinear 
kLogArea 

Definition at line 58 of file Midad/HEAD/MultiPage/GfxDigitListCfg.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;

Enumerator:
kArea 
kFixed 
kLinear 
kLogLinear 
kLogArea 
kArea 
kFixed 
kLinear 
kLogLinear 
kLogArea 

Definition at line 58 of file EventDisplay/HEAD/GfxDigitListCfg.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;


Constructor & Destructor Documentation

GfxDigitListCfg::GfxDigitListCfg ( Registry initial_config = 0  ) 

Definition at line 7 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

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

00008 {
00009 //    cerr << "GfxDigitListCfg(" << 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("DigitEndStyle","BowTie");
00017         r.Set("SizeBy","Area");
00018         r.Set("ShapeIs","Rectangle");
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("Digit 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("DigitEndStyle",sestyle_reg);
00058     possibles.Set("SizeBy",sizeby_reg);
00059     possibles.Set("ShapeIs",shape_reg);
00060 
00061     this->SetPossibles(possibles);
00062 }

GfxDigitListCfg::~GfxDigitListCfg (  ) 

Definition at line 64 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

00065 {
00066 
00067 }

GfxDigitListCfg::GfxDigitListCfg ( Registry initial_config = 0  ) 
GfxDigitListCfg::~GfxDigitListCfg (  ) 

Member Function Documentation

ScaleIs_t GfxDigitListCfg::GetScaleIs (  ) 
GfxDigitListCfg::ScaleIs_t GfxDigitListCfg::GetScaleIs (  ) 

Definition at line 102 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

References CfgConfigurable::GetConfig(), kAbsolute, and kRelative.

Referenced by GfxDigit::Configure(), and GfxDigit::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 GfxDigitListCfg::GetShapeIs (  ) 
GfxDigitListCfg::ShapeIs_t GfxDigitListCfg::GetShapeIs (  ) 

Definition at line 121 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

References CfgConfigurable::GetConfig(), kEllipse, and kRectangle.

Referenced by GfxDigit::Configure(), and GfxDigit::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 GfxDigitListCfg::GetSizeBy (  ) 
GfxDigitListCfg::SizeBy_t GfxDigitListCfg::GetSizeBy (  ) 

Definition at line 110 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

References CfgConfigurable::GetConfig(), kArea, kFixed, kLinear, kLogArea, and kLogLinear.

Referenced by GfxDigit::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 GfxDigitListCfg::GetSizeFactor (  ) 
double GfxDigitListCfg::GetSizeFactor (  ) 

Definition at line 69 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

References CfgConfigurable::GetConfig().

Referenced by GfxDigit::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 GfxDigitListCfg::GetSizeIs (  ) 
GfxDigitListCfg::MeasureScale_t GfxDigitListCfg::GetSizeIs (  ) 

Definition at line 94 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

References CfgConfigurable::GetConfig(), kCharge, and kTime.

Referenced by GfxDigit::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 }

DigitEnd_t GfxDigitListCfg::GetStripEnd (  ) 
GfxDigitListCfg::DigitEnd_t GfxDigitListCfg::GetStripEnd (  ) 

Definition at line 84 of file EventDisplay/HEAD/GfxDigitListCfg.cxx.

References CfgConfigurable::GetConfig(), kBit, kBowTie, kFull, and kHalf.

Referenced by GfxDigit::ModifyCoords().

00085 {
00086     const char* value;
00087     if (! this->GetConfig().Get("DigitEndStyle",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 2 Nov 2017 for loon by  doxygen 1.6.1