CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
FWViewType Class Reference

#include <Fireworks/Core/interface/FWViewType.h>

Classes

class  static_initializer
 

Public Types

enum  EBit {
  k3DBit = 1 << k3D, kRhoPhiBit = 1 << kRhoPhi, kRhoZBit = 1 << kRhoZ, kRhoPhiPFBit = 1 << kRhoPhiPF,
  kISpyBit = 1 << kISpy, kLegoBit = 1 << kLego, kLegoHFBit = 1 << kLegoHF, kLegoPFECALBit = 1 << kLegoPFECAL,
  kGlimpseBit = 1 << kGlimpse, kTableBit = 1 << kTable, kTableHLTBit = 1 << kTableHLT, kTableL1Bit = 1 << kTableL1,
  kGeometryBit = 1 << kGeometryTable, kOverlapBit = 1 << kOverlapTable
}
 
enum  EType {
  kRhoPhi, kRhoZ, k3D, kISpy,
  kLego, kLegoHF, kGlimpse, kTable,
  kTableL1, kTableHLT, kRhoPhiPF, kLegoPFECAL,
  kGeometryTable, kOverlapTable, kTypeSize
}
 

Public Member Functions

 FWViewType (EType)
 
EType id () const
 
const std::string & name () const
 
virtual ~FWViewType ()
 

Static Public Member Functions

static const std::string & checkNameWithViewVersion (const std::string &name, unsigned int viewVersion)
 
static const std::string & idToName (int)
 
static bool isLego (int)
 
static bool isProjected (int)
 

Static Public Attributes

static static_initializer init_statics
 
static const int kAll3DBits = kISpyBit | k3DBit
 
static const int kAllLegoBits = kLegoBit | kLegoHFBit | kLegoPFECALBit
 
static const int kAllRPZBits = kRhoPhiBit | kRhoZBit | kRhoPhiPFBit
 
static std::string sName [kTypeSize]
 

Private Attributes

const EType m_id
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 23 of file FWViewType.h.

Member Enumeration Documentation

Enumerator
k3DBit 
kRhoPhiBit 
kRhoZBit 
kRhoPhiPFBit 
kISpyBit 
kLegoBit 
kLegoHFBit 
kLegoPFECALBit 
kGlimpseBit 
kTableBit 
kTableHLTBit 
kTableL1Bit 
kGeometryBit 
kOverlapBit 

Definition at line 40 of file FWViewType.h.

41  {
42  k3DBit = 1 << k3D,
43  kRhoPhiBit = 1 << kRhoPhi,
44  kRhoZBit = 1 << kRhoZ,
45  kRhoPhiPFBit = 1 << kRhoPhiPF,
46  kISpyBit = 1 << kISpy,
47  kLegoBit = 1 << kLego,
48  kLegoHFBit = 1 << kLegoHF,
50  kGlimpseBit = 1 << kGlimpse,
51  kTableBit = 1 << kTable,
52  kTableHLTBit = 1 << kTableHLT,
53  kTableL1Bit = 1 << kTableL1,
56  };
Enumerator
kRhoPhi 
kRhoZ 
k3D 
kISpy 
kLego 
kLegoHF 
kGlimpse 
kTable 
kTableL1 
kTableHLT 
kRhoPhiPF 
kLegoPFECAL 
kGeometryTable 
kOverlapTable 
kTypeSize 

Definition at line 34 of file FWViewType.h.

Constructor & Destructor Documentation

FWViewType::FWViewType ( EType  t)

Definition at line 58 of file FWViewType.cc.

58  :
59  m_id(t)
60 {
61 }
const EType m_id
Definition: FWViewType.h:79
FWViewType::~FWViewType ( )
virtual

Definition at line 63 of file FWViewType.cc.

64 {
65 }

Member Function Documentation

const std::string & FWViewType::checkNameWithViewVersion ( const std::string &  name,
unsigned int  viewVersion 
)
static

Definition at line 103 of file FWViewType.cc.

References k3D, kISpy, kLego, kTableHLT, kTableL1, and switchName().

Referenced by FWGUIManager::setFrom().

104 {
105  // printf("version %d %s \n", version, refName.c_str());fflush(stdout);
106  if (version < 2)
107  {
108  if (refName == "TriggerTable")
109  return switchName(refName, FWViewType::kTableHLT);
110  else if (refName == "L1TriggerTable")
111  return switchName(refName, FWViewType::kTableL1);
112  }
113  if (version < 3)
114  {
115  if (refName == "3D Lego")
116  return switchName(refName, FWViewType::kLego);
117  }
118  if (version < 7)
119  {
120  if (refName == "iSpy")
121  return switchName(refName, FWViewType::kISpy);
122  if (refName == "3D")
123  return switchName(refName, FWViewType::k3D);
124  }
125  return refName;
126 }
const std::string & switchName(const std::string &old, FWViewType::EType id)
Definition: FWViewType.cc:96
FWViewType::EType FWViewType::id ( void  ) const

Definition at line 82 of file FWViewType.cc.

References m_id.

Referenced by idToName(), and FWViewBase::typeId().

83 {
84  return m_id;
85 }
const EType m_id
Definition: FWViewType.h:79
const std::string & FWViewType::idToName ( int  id)
static
bool FWViewType::isLego ( int  id)
static

Definition at line 136 of file FWViewType.cc.

References kLego, kLegoHF, and kLegoPFECAL.

Referenced by FWEveView::populateController(), and FWEveView::setupEnergyScale().

137 {
138  return (id == kLego || id == kLegoHF || id == kLegoPFECAL);
139 }
bool FWViewType::isProjected ( int  id)
static
const std::string & FWViewType::name ( void  ) const

Definition at line 75 of file FWViewType.cc.

References m_id, and sName.

Referenced by FWViewBase::typeName(), and Vispa.Views.PropertyView.Property::valueChanged().

76 {
77  return sName[m_id];
78 }
const EType m_id
Definition: FWViewType.h:79
static std::string sName[kTypeSize]
Definition: FWViewType.h:63

Member Data Documentation

static_initializer FWViewType::init_statics
static

Definition at line 32 of file FWViewType.h.

const int FWViewType::kAll3DBits = kISpyBit | k3DBit
static

Definition at line 60 of file FWViewType.h.

const int FWViewType::kAllLegoBits = kLegoBit | kLegoHFBit | kLegoPFECALBit
static

Definition at line 61 of file FWViewType.h.

const int FWViewType::kAllRPZBits = kRhoPhiBit | kRhoZBit | kRhoPhiPFBit
static

Definition at line 59 of file FWViewType.h.

const EType FWViewType::m_id
private

Definition at line 79 of file FWViewType.h.

Referenced by id(), and name().

std::string FWViewType::sName
static