ATLAS Offline Software
Loading...
Searching...
No Matches
DBLoader.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TrigConf_DBLoader
6#define TrigConf_DBLoader
7
8
12#include "RelationalAccess/ISessionProxy.h"
13
14#include <tuple>
15#include <string>
16
17namespace TrigConf {
18
21 virtual public ILoader
22 {
23 public:
24
31 explicit DBLoader( StorageMgr& sm, coral::ISessionProxy& session );
32
33 explicit DBLoader( const std::string& name, StorageMgr& sm, coral::ISessionProxy& session );
34
36 virtual ~DBLoader() override = default;
37
38 virtual void setLevel(MSGTC::Level lvl) override;
39 virtual MSGTC::Level outputLevel() const override { return msg().level(); }
40
41
43 void startSession();
44
46 void commitSession();
47
49 bool loadL1MasterKey(int SuperMasterKey, int& Lvl1MasterKey);
50
52 bool loadL1MenuKey(int SuperMasterKey, int& Lvl1MenuKey);
53
54 unsigned int triggerDBSchemaVersion();
55
56 virtual int verbose() const override { return m_verbose; }
57 virtual void setVerbose(int v) override { m_verbose=v; }
58
59 bool isRun1() { return ! isRun2(); }
60 bool isRun2();
61
62 private:
63 int m_verbose{1};
64
65 protected:
67 coral::ISessionProxy& m_session;
68 bool m_sessionOwner{false};
69 private:
71 std::tuple<unsigned int,unsigned int> loadSchemaVersion() const;
72 };
73
74}
75
76#endif
77
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
virtual int verbose() const override
Definition DBLoader.h:56
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:66
DBLoader(StorageMgr &sm, coral::ISessionProxy &session)
constructor
Definition DBLoader.cxx:31
virtual void setVerbose(int v) override
Definition DBLoader.h:57
virtual MSGTC::Level outputLevel() const override
Definition DBLoader.h:39
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:68
virtual void setLevel(MSGTC::Level lvl) override
Load the configuration data from the configuration source.
Definition DBLoader.cxx:60
coral::ISessionProxy & m_session
CORAL interface to database session.
Definition DBLoader.h:67
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:36
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