Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:19:27

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef FFAMODULES_CDBINTERFACE_H
0004 #define FFAMODULES_CDBINTERFACE_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <cstdint>  // for uint64_t
0009 #include <set>
0010 #include <string>
0011 #include <tuple>  // for tuple
0012 
0013 class PHCompositeNode;
0014 class SphenixClient;
0015 
0016 class CDBInterface : public SubsysReco
0017 {
0018  public:
0019   static CDBInterface *instance();
0020 
0021   ~CDBInterface() override;
0022 
0023   /// Called at the end of all processing.
0024   int End(PHCompositeNode *topNode) override;
0025 
0026   void Print(const std::string &what = "ALL") const override;
0027 
0028   int UpdateRunNode(PHCompositeNode *topNode) override;
0029 
0030   void Disable() { disable = true; }
0031   void Enable() { disable = false; }
0032 
0033   void Disable_default() { disable_default = true; }
0034   void Enable_default() { disable_default = false; }
0035 
0036   std::string getUrl(const std::string &domain, const std::string &filename = "");
0037 
0038  private:
0039   CDBInterface(const std::string &name = "CDBInterface");
0040 
0041   static CDBInterface *__instance;
0042   SphenixClient *cdbclient{nullptr};
0043   bool disable{false};
0044   bool disable_default{false};
0045   std::set<std::tuple<std::string, std::string, uint64_t>> m_UrlVector;
0046 };
0047 
0048 #endif  // FFAMODULES_CDBINTERFACE_H