ATLAS Offline Software
Loading...
Searching...
No Matches
DBLoader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrigConf_DBLoader
6#define TrigConf_DBLoader
7
10#include "RelationalAccess/ISessionProxy.h"
12
13#include <tuple>
14
15namespace TrigConf {
16
19 virtual public ILoader
20 {
21 public:
22
29 explicit DBLoader( StorageMgr& sm, coral::ISessionProxy& session );
30
31 explicit DBLoader( const std::string& name, StorageMgr& sm, coral::ISessionProxy& session );
32
34 virtual ~DBLoader() override = default;
35
37 //std::ostream & msg() { return m_storageMgr.msg(); }
38
39 virtual void setLevel(MSGTC::Level lvl) override;
40 virtual MSGTC::Level outputLevel() const override { return msg().level(); }
41
42
44 void startSession();
45
47 void commitSession();
48
50 bool loadL1MasterKey(int SuperMasterKey, int& Lvl1MasterKey);
51
53 bool loadL1MenuKey(int SuperMasterKey, int& Lvl1MenuKey);
54
55 unsigned int triggerDBSchemaVersion();
56
57 virtual int verbose() const override { return m_verbose; }
58 virtual void setVerbose(int v) override { m_verbose=v; }
59
60 bool isRun1() { return ! isRun2(); }
61 bool isRun2();
62
63 private:
64 int m_verbose{1};
65
66 protected:
68 coral::ISessionProxy& m_session;
69 bool m_sessionOwner{false};
70 private:
72 std::tuple<unsigned int,unsigned int> loadSchemaVersion() const;
73 };
74
75}
76
77#endif
78
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
virtual int verbose() const override
Definition DBLoader.h:57
bool loadL1MasterKey(int SuperMasterKey, int &Lvl1MasterKey)
get l1 master from super master
Definition DBLoader.cxx:128
StorageMgr & m_storageMgr
reference to the storage manager
Definition DBLoader.h:67
DBLoader(StorageMgr &sm, coral::ISessionProxy &session)
constructor
Definition DBLoader.cxx:30
virtual void setVerbose(int v) override
Definition DBLoader.h:58
virtual MSGTC::Level outputLevel() const override
Definition DBLoader.h:40
void commitSession()
commit session if not already done
Definition DBLoader.cxx:45
bool m_sessionOwner
remember if the loader started the session in the first place
Definition DBLoader.h:69
virtual void setLevel(MSGTC::Level lvl) override
access to output stream
Definition DBLoader.cxx:60
coral::ISessionProxy & m_session
CORAL interface to database session.
Definition DBLoader.h:68
unsigned int triggerDBSchemaVersion()
Definition DBLoader.cxx:76
virtual ~DBLoader() override=default
destructor
std::tuple< unsigned int, unsigned int > loadSchemaVersion() const
get DB schema version and run number
Definition DBLoader.cxx:81
void startSession()
start session if not already active
Definition DBLoader.cxx:35
bool loadL1MenuKey(int SuperMasterKey, int &Lvl1MenuKey)
get l1 menu id from super master
Definition DBLoader.cxx:167
Interface class for loaders.
Definition ILoader.h:17
Database Storage Manager, controls the database session and the different loader classes for DB acces...
Definition StorageMgr.h:23
MsgStreamTC & msg() const
The standard message stream.
TrigConfMessaging(const std::string &name)
Constructor with parameters.
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22