Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:52

0001 #ifndef DCUTAG_H
0002 #define DCUTAG_H
0003 
0004 #include <string>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/ITag.h"
0008 #include "OnlineDB/EcalCondDB/interface/LocationDef.h"
0009 #include "OnlineDB/EcalCondDB/interface/RunTypeDef.h"
0010 /**
0011  *   Tag for Run information
0012  */
0013 class DCUTag : public ITag {
0014 public:
0015   friend class DCUIOV;  // needs permission to write
0016   friend class EcalCondDBInterface;
0017 
0018   DCUTag();
0019   ~DCUTag() override;
0020 
0021   // Methods for user data
0022   std::string getGeneralTag() const;
0023   void setGeneralTag(std::string tag);
0024 
0025   LocationDef getLocationDef() const;
0026   void setLocationDef(const LocationDef& locDef);
0027 
0028   // Methods using ID
0029   int fetchID() noexcept(false) override;
0030   void setByID(int id) noexcept(false) override;
0031 
0032   // Operators
0033   inline bool operator==(const DCUTag& t) const { return (m_genTag == t.m_genTag && m_locDef == t.m_locDef); }
0034 
0035   inline bool operator!=(const DCUTag& t) const { return !(*this == t); }
0036 
0037 private:
0038   // User data for this tag
0039   std::string m_genTag;
0040   LocationDef m_locDef;
0041 
0042   // Methods from ITag
0043   int writeDB() noexcept(false);
0044   void fetchParentIDs(int* locId) noexcept(false);
0045 
0046   // Public access methods
0047   void fetchAllTags(std::vector<DCUTag>* fillVec) noexcept(false);
0048 };
0049 
0050 #endif