Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MONRUNTAG_H
0002 #define MONRUNTAG_H
0003 
0004 #include <string>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/ITag.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonVersionDef.h"
0009 
0010 /**
0011  *   Tag for Monitoring Sub-Run information
0012  */
0013 class MonRunTag : public ITag {
0014 public:
0015   friend class MonRunIOV;  // needs permission to write
0016   friend class EcalCondDBInterface;
0017 
0018   MonRunTag();
0019   ~MonRunTag() override;
0020 
0021   // Methods for user data
0022   std::string getGeneralTag() const;
0023   void setGeneralTag(std::string tag);
0024 
0025   MonVersionDef getMonVersionDef() const;
0026   void setMonVersionDef(const MonVersionDef& ver);
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 MonRunTag& t) const {
0034     return (m_genTag == t.m_genTag && m_monVersionDef == t.m_monVersionDef);
0035   }
0036 
0037   inline bool operator!=(const MonRunTag& t) const { return !(*this == t); }
0038 
0039 private:
0040   // User data for this tag
0041   std::string m_genTag;
0042   MonVersionDef m_monVersionDef;
0043 
0044   // Methods from ITag
0045   int writeDB() noexcept(false);
0046 
0047   // Access methods
0048   void fetchAllTags(std::vector<MonRunTag>* fillVec) noexcept(false);
0049 
0050   void fetchParentIDs(int* verID) noexcept(false);
0051 };
0052 
0053 #endif