CMS 3D CMS Logo

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 22 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 39 of file FWViewType.h.

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

Definition at line 33 of file FWViewType.h.

Constructor & Destructor Documentation

FWViewType::FWViewType ( EType  t)

Definition at line 57 of file FWViewType.cc.

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

Definition at line 62 of file FWViewType.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

63 {
64 }

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().

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

Definition at line 81 of file FWViewType.cc.

References m_id, and AlCaHLTBitMon_QueryRunRegistry::string.

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

82 {
83  return m_id;
84 }
const EType m_id
Definition: FWViewType.h:78
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().

136 {
137  return (id == kLego || id == kLegoHF || id == kLegoPFECAL);
138 }
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 config.CFG::__str__(), validation.Sample::digest(), VIDSelectorBase.VIDSelectorBase::initialize(), FWViewBase::typeName(), and Vispa.Views.PropertyView.Property::valueChanged().

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

Member Data Documentation

static_initializer FWViewType::init_statics
static

Definition at line 31 of file FWViewType.h.

const int FWViewType::kAll3DBits = kISpyBit | k3DBit
static

Definition at line 59 of file FWViewType.h.

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

Definition at line 60 of file FWViewType.h.

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

Definition at line 58 of file FWViewType.h.

const EType FWViewType::m_id
private

Definition at line 78 of file FWViewType.h.

Referenced by id(), and name().

std::string FWViewType::sName
static