CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/OnlineDB/EcalCondDB/interface/EcalLogicID.h

Go to the documentation of this file.
00001 // $Id: EcalLogicID.h,v 1.3 2009/11/23 10:27:34 fra Exp $
00002 
00003 #ifndef ECALLOGICID_HH
00004 #define ECALLOGICID_HH
00005 
00006 #include <string>
00007 // Defines an object to contain the DB logic ID for conditions
00008 class EcalLogicID {
00009   
00010  public:
00011 
00012   // Default constructor
00013   EcalLogicID();
00014 
00015   // Initializing constructor
00016   EcalLogicID( std::string name,
00017                int logicID,
00018                int id1 = NULLID,
00019                int id2 = NULLID,
00020                int id3 = NULLID,
00021                std::string mapsTo = "" );
00022 
00023   // Destructor
00024   virtual ~EcalLogicID();
00025 
00026   // Getters
00027   std::string getName() const;
00028 
00029   int getLogicID() const;
00030 
00031   int getID1() const;
00032   int getID2() const;
00033   int getID3() const;
00034 
00035   inline void setID1(int x) { id1 = x; }
00036   inline void setID2(int x) { id2 = x; }
00037   inline void setID3(int x) { id3 = x; }
00038 
00039 
00040   std::string getMapsTo() const;
00041 
00042   // Constants
00043   static const int NULLID = -100;
00044 
00045   // Operators
00046   friend inline bool operator<(EcalLogicID lhs, EcalLogicID rhs) { return (lhs.logicID < rhs.logicID); }
00047   
00048  private:
00049   std::string name;
00050   int logicID;
00051   int id1;
00052   int id2;
00053   int id3;
00054   std::string mapsTo;    
00055 
00056 };
00057 
00058 #endif