Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:04

0001 #ifndef Fireworks_Core_FWViewType_h
0002 #define Fireworks_Core_FWViewType_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWViewType
0007 //
0008 /**\class FWViewType FWViewType.h Fireworks/Core/interface/FWViewType.h
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Alja Mrak-Tadel
0018 //         Created:  Mon Mar 22 12:08:40 CET 2010
0019 //
0020 #include <string>
0021 
0022 class FWViewType {
0023 public:
0024   class static_initializer {
0025   public:
0026     static_initializer();
0027   };
0028 
0029   static static_initializer init_statics;
0030 
0031   enum EType {
0032     kRhoPhi,
0033     kRhoZ,
0034     k3D,
0035     kISpy,
0036     kLego,
0037     kLegoHF,
0038     kGlimpse,
0039     kTable,
0040     kTableL1,
0041     kTableHLT,
0042     kRhoPhiPF,
0043     kLegoPFECAL,
0044     kGeometryTable,
0045     kOverlapTable,
0046     kTypeSize
0047   };
0048 
0049   enum EBit {
0050     k3DBit = 1 << k3D,
0051     kRhoPhiBit = 1 << kRhoPhi,
0052     kRhoZBit = 1 << kRhoZ,
0053     kRhoPhiPFBit = 1 << kRhoPhiPF,
0054     kISpyBit = 1 << kISpy,
0055     kLegoBit = 1 << kLego,
0056     kLegoHFBit = 1 << kLegoHF,
0057     kLegoPFECALBit = 1 << kLegoPFECAL,
0058     kGlimpseBit = 1 << kGlimpse,
0059     kTableBit = 1 << kTable,
0060     kTableHLTBit = 1 << kTableHLT,
0061     kTableL1Bit = 1 << kTableL1,
0062     kGeometryBit = 1 << kGeometryTable,
0063     kOverlapBit = 1 << kOverlapTable
0064   };
0065 
0066   // shortcuts
0067   static const int kAllRPZBits;
0068   static const int kAll3DBits;
0069   static const int kAllLegoBits;
0070 
0071   static std::string sName[kTypeSize];
0072 
0073   static const std::string& idToName(int);
0074   static bool isProjected(int);
0075   static bool isLego(int);
0076 
0077   static const std::string& checkNameWithViewVersion(const std::string& name, unsigned int viewVersion);
0078 
0079   FWViewType(EType);
0080   virtual ~FWViewType();
0081 
0082   const std::string& name() const;
0083   EType id() const;
0084 
0085 private:
0086   const EType m_id;
0087 };
0088 
0089 #endif