ATLAS Offline Software
Loading...
Searching...
No Matches
StorageMgr.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9#include "./MenuLoader.h"
10#include "./MuctpiLoader.h"
11#include "./DeadTimeLoader.h"
13#include "./RandomLoader.h"
15#include "./LutCamLoader.h"
17#include "./CTPFilesLoader.h"
18#include "./PrescaleSetLoader.h"
19#include "./PrioritySetLoader.h"
20#include "./BunchGroupLoader.h"
22#include "./CTPConfigLoader.h"
27#include "./CaloSinCosLoader.h"
28#include "./CaloInfoLoader.h"
30#include "./HLTFrameLoader.h"
34#include "./L1TopoMenuLoader.h"
35
36#include <iostream>
37#include <memory>
38
39using namespace std;
40using namespace TrigConf;
41
42TrigConf::StorageMgr::StorageMgr( const std::string& cs,
43 const std::string& user,
44 const std::string& pass,
45 std::ostream & /*o*/) :
46 TrigConfMessaging("DBStorageMgr")
47 , m_cs( cs )
48 , m_user( user )
49 , m_password( pass )
50{}
51
53 const std::string& server,
54 const std::string& name,
55 const std::string& user,
56 const std::string& pass,
57 std::ostream & /*o*/) :
58 TrigConfMessaging("DBStorageMgr")
59 , m_dbtype( type )
60 , m_dbserver( server )
61 , m_dbname( name )
62 , m_user( user )
63 , m_password( pass )
64{}
65
66
69
70
71// setting log level of all loaders and itself
72void
76
77
78void
82
83
86 if( m_sessionMgr == 0 ) {
87 m_sessionMgr = std::make_unique<SessionMgr>();
88 if( m_cs != "" ) {
89 m_sessionMgr->setConnectionString(m_cs);
90 } else {
91 m_sessionMgr->setDbType(m_dbtype);
92 m_sessionMgr->setDbServer(m_dbserver);
93 m_sessionMgr->setDbName(m_dbname);
94 m_sessionMgr->setDbUser(m_user);
95 m_sessionMgr->setDbPassword(m_password);
96 }
97 m_sessionMgr->setUseFrontier(useFrontier());
98 m_sessionMgr->setRetrialPeriod(m_retrialPeriod);
99 m_sessionMgr->setRetrialTimeout(m_retrialTimeout);
100 m_sessionMgr->setConnectionTimeout(m_connectionTimeout);
101 }
102 return * m_sessionMgr;
103}
104
105
106
111
116
121
126
131
136
141
146
151
156
161
166
171
176
182
187
192
197
202
207
212
216
221
226
231
236
Interface for loaders of the LVL1 trigger configuration.
void setLevel(MSGTC::Level lvl)
Set message level of stream.
Manager of the database session.
Definition SessionMgr.h:30
void closeSession()
close open sessions
std::unique_ptr< ICaloInfoLoader > m_caloInfoLoader
std::unique_ptr< IJobOptionTableLoader > m_jobOptionTableLoader
std::unique_ptr< IThresholdMonitorLoader > m_thresholdMonitorLoader
std::unique_ptr< IMuctpiLoader > m_muctpiLoader
std::unique_ptr< IBunchGroupLoader > m_bunchGroupLoader
std::unique_ptr< ITriggerThresholdLoader > m_triggerThresholdLoader
std::unique_ptr< IPrioritySetLoader > m_prioritySetLoader
std::unique_ptr< IDeadTimeLoader > m_deadTimeLoader
std::unique_ptr< ITriggerThresholdValueLoader > m_triggerThresholdValueLoader
std::unique_ptr< ICTPConfigLoader > m_ctpConfigLoader
std::unique_ptr< IMasterTableLoader > m_masterTableLoader
std::unique_ptr< IBunchGroupSetLoader > m_bunchGroupSetLoader
std::unique_ptr< ICaloJetInputLoader > m_caloJetInputLoader
std::unique_ptr< IThresholdConfigLoader > m_thresholdConfigLoader
std::unique_ptr< ILutCamLoader > m_lutCamLoader
std::unique_ptr< ICTPFilesLoader > m_ctpFilesLoader
std::unique_ptr< IRandomLoader > m_randomLoader
std::unique_ptr< IMuonThresholdSetLoader > m_muonThresholdSetLoader
std::unique_ptr< ICaloSinCosLoader > m_caloSinCosLoader
std::unique_ptr< IHLTFrameLoader > m_HLTFrameLoader
std::unique_ptr< IPrescaledClockLoader > m_prescaledClockLoader
std::unique_ptr< IL1TopoMenuLoader > m_l1topoMenuLoader
std::unique_ptr< IPrescaleSetLoader > m_prescaleSetLoader
std::unique_ptr< IMenuLoader > m_menuLoader
bool useFrontier() const
Definition StorageMgr.h:104
virtual ICaloInfoLoader & caloInfoLoader() override
virtual IMenuLoader & menuLoader() override
virtual IRandomLoader & randomLoader() override
virtual IThresholdMonitorLoader & thresholdMonitorLoader() override
virtual IBunchGroupSetLoader & bunchGroupSetLoader() override
std::unique_ptr< IHLTPrescaleSetCollectionLoader > m_hltPrescaleSetCollectionLoader
Definition StorageMgr.h:122
std::unique_ptr< SessionMgr > m_sessionMgr
Definition StorageMgr.h:124
virtual ITriggerThresholdLoader & triggerThresholdLoader() override
virtual IThresholdConfigLoader & thresholdConfigLoader() override
std::string m_dbtype
db type
Definition StorageMgr.h:126
std::unique_ptr< IHLTPrescaleSetLoader > m_hltPrescaleSetLoader
Definition StorageMgr.h:121
virtual IPrioritySetLoader & prioritySetLoader() override
virtual IHLTFrameLoader & hltFrameLoader() override
IHLTPrescaleSetCollectionLoader & hltPrescaleSetCollectionLoader()
virtual ILutCamLoader & lutcamLoader() override
std::string m_dbserver
db server
Definition StorageMgr.h:127
virtual ICaloJetInputLoader & caloJetInputLoader() override
SessionMgr & sessionMgr()
creates and returns a new database session manager
virtual ICTPConfigLoader & ctpConfigOnlineLoader() override
virtual IL1TopoMenuLoader & l1topoMenuLoader() override
virtual IPrescaleSetLoader & prescaleSetLoader() override
IHLTPrescaleSetLoader & hltPrescaleSetLoader()
std::string m_user
user name
Definition StorageMgr.h:129
std::string m_cs
connection string
Definition StorageMgr.h:125
std::unique_ptr< L > NewLoader()
Definition StorageMgr.h:117
virtual ICTPFilesLoader & ctpFilesLoader() override
std::string m_password
password
Definition StorageMgr.h:130
virtual ~StorageMgr() override
destructor
StorageMgr(const std::string &cs, const std::string &user="", const std::string &password="", std::ostream &o=std::cout)
constructor
virtual ICTPConfigLoader & ctpConfigLoader() override
virtual ITriggerThresholdValueLoader & triggerThresholdValueLoader() override
virtual IPrescaledClockLoader & prescaledClockLoader() override
virtual IBunchGroupLoader & bunchGroupLoader() override
void setLevel(MSGTC::Level lvl) override
IMuonThresholdSetLoader & muonThresholdSetLoader()
std::string m_dbname
db name
Definition StorageMgr.h:128
virtual IMuctpiLoader & muctpiLoader() override
virtual IJobOptionTableLoader & jobOptionTableLoader() override
virtual IDeadTimeLoader & deadTimeLoader() override
virtual IMasterTableLoader & masterTableLoader() override
virtual ICaloSinCosLoader & caloSinCosLoader() override
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
STL namespace.