ConfigSvcBase.h 1.49 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

#ifndef TrigConfigSvc_ConfigSvcBase
#define TrigConfigSvc_ConfigSvcBase

#include "AthenaBaseComps/AthService.h"

namespace TrigConf {
   class TrigDBConnectionConfig;
   class IStorageMgr;
   class TrigDBConnectionConfig;

   class ConfigSvcBase : public AthService {
   public:
      ConfigSvcBase(const std::string& name, ISvcLocator* pSvcLocator);
      virtual ~ConfigSvcBase();

      virtual StatusCode initialize();

      virtual void declareCommonProperties();

      // to create db storage manager
      StatusCode initStorageMgr();
      StatusCode freeStorageMgr();

      bool fromDB() const { return m_dbconfig != nullptr; }

   protected:

      // properties
      std::string        m_configSourceString { "XML" };
      std::string        m_xmlFile { "NONE" };
      std::string        m_dbServer { "" };
      std::string        m_dbUser { "" };
      std::string        m_dbPassword { "" };
      std::string        m_dbTable { "" };
      int                m_dbSMKey { 0 };
      int                m_dbLVL1PSKey { 0 };
      int                m_dbHLTPSKey { 0 };
42
      std::string        m_dbHLTPSKeySet { "[]" };
43
      BooleanProperty    m_useFrontier { false };
44
      BooleanProperty    m_useSQLite { true };
45
46
47
48
49
50
51
52
53
54
      int                m_printMenuLevel { 1 };
      std::unique_ptr<TrigDBConnectionConfig> m_dbconfig;

      // the storage manager
      IStorageMgr*       m_storageMgr { nullptr };

   };
}

#endif