CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes

FWViewType Class Reference

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

List of all members.

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
}
enum  EType {
  kRhoPhi, kRhoZ, k3D, kISpy,
  kLego, kLegoHF, kGlimpse, kTable,
  kTableL1, kTableHLT, kRhoPhiPF, kLegoPFECAL,
  kGeometryTable, 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 

Definition at line 40 of file FWViewType.h.

Enumerator:
kRhoPhi 
kRhoZ 
k3D 
kISpy 
kLego 
kLegoHF 
kGlimpse 
kTable 
kTableL1 
kTableHLT 
kRhoPhiPF 
kLegoPFECAL 
kGeometryTable 
kTypeSize 

Definition at line 34 of file FWViewType.h.


Constructor & Destructor Documentation

FWViewType::FWViewType ( EType  t)

Definition at line 57 of file FWViewType.cc.

                             :
   m_id(t)
{
}
FWViewType::~FWViewType ( ) [virtual]

Definition at line 62 of file FWViewType.cc.

{
}

Member Function Documentation

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

Definition at line 102 of file FWViewType.cc.

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

Referenced by FWGUIManager::setFrom().

{
   // printf("version %d %s \n", version, refName.c_str());fflush(stdout);
   if (version < 2)
   {
      if (refName == "TriggerTable") 
         return switchName(refName, FWViewType::kTableHLT);
      else if (refName == "L1TriggerTable")
         return switchName(refName, FWViewType::kTableL1);
   }
   if (version < 3)
   {
      if (refName == "3D Lego") 
         return switchName(refName, FWViewType::kLego);
   }
   if (version < 7)
   {
      if (refName == "iSpy") 
         return switchName(refName, FWViewType::kISpy);
      if (refName == "3D") 
         return switchName(refName, FWViewType::k3D);
   }
   return refName;
}
FWViewType::EType FWViewType::id ( void  ) const

Definition at line 81 of file FWViewType.cc.

References m_id.

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

{
   return m_id;
}
const std::string & FWViewType::idToName ( int  id) [static]
bool FWViewType::isLego ( int  id) [static]

Definition at line 135 of file FWViewType.cc.

References kLego, kLegoHF, and kLegoPFECAL.

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

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

Definition at line 74 of file FWViewType.cc.

References m_id, and sName.

Referenced by FWViewBase::typeName().

{
  return sName[m_id];
}

Member Data Documentation

Definition at line 32 of file FWViewType.h.

const int FWViewType::kAll3DBits = kISpyBit | k3DBit [static]
const int FWViewType::kAllLegoBits = kLegoBit | kLegoHFBit | kLegoPFECALBit [static]

Definition at line 60 of file FWViewType.h.

const int FWViewType::kAllRPZBits = kRhoPhiBit | kRhoZBit | kRhoPhiPFBit [static]
const EType FWViewType::m_id [private]

Definition at line 78 of file FWViewType.h.

Referenced by id(), and name().

std::string FWViewType::sName [static]