ATLAS Offline Software
TrigDBLoader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 #ifndef TRIGCONFIO_TRIGDBLOADER_H
13 #define TRIGCONFIO_TRIGDBLOADER_H
14 
16 #include "TrigConfIO/Exceptions.h"
17 
18 #include <memory>
19 #include <map>
20 
21 namespace coral {
22  class ISessionProxy;
23  class Blob;
24 }
25 
26 namespace TrigConf {
27 
28  class QueryDefinition;
29 
34  public:
35 
37  TrigDBLoader(const std::string & loaderName, const std::string & connection);
38 
40  virtual ~TrigDBLoader() override;
41 
45  size_t schemaVersion(coral::ISessionProxy* session) const;
46 
50  bool writeRawFile(const coral::Blob & data, const std::string & outFileName) const;
51 
52  void setLevel(MSGTC::Level lvl) { msg().setLevel(lvl); }
53 
54  MSGTC::Level outputLevel() const { return msg().level(); }
55 
56  protected:
57 
59  std::unique_ptr<coral::ISessionProxy> createDBSession() const;
60 
63  const std::map<size_t, QueryDefinition> & queries) const;
64 
65  private:
66 
67  // private variables
68  std::string m_connection {"TRIGGERDB"};
69  int m_retrialPeriod {0};
72  };
73 
74 }
75 
76 #endif
77 
Exceptions.h
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrigConf::TrigDBLoader::schemaVersion
size_t schemaVersion(coral::ISessionProxy *session) const
access to TriggerDB schema version
Definition: TrigDBLoader.cxx:38
TrigConf::TrigDBLoader::m_connection
std::string m_connection
Definition: TrigDBLoader.h:68
TrigConf::TrigDBLoader
Loader of trigger configurations from Json files.
Definition: TrigDBLoader.h:33
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
TrigConf::QueryDefinition
Definition: TrigDBHelper.h:28
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
coral
Definition: ISecondaryEventSelector.h:19
DumpGeoConfig.outFileName
string outFileName
Definition: DumpGeoConfig.py:252
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
TrigConf::TrigDBLoader::outputLevel
MSGTC::Level outputLevel() const
Definition: TrigDBLoader.h:54
TrigConf::TrigConfMessaging::msg
MsgStreamTC & msg() const
The standard message stream.
Definition: TrigConfMessaging.h:81
TrigConf::MsgStreamTC::level
MSGTC::Level level()
Return message level of stream.
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:53
TrigConf::TrigDBLoader::m_retrialTimeout
int m_retrialTimeout
Definition: TrigDBLoader.h:70
TrigConf::TrigDBLoader::m_connectionTimeout
int m_connectionTimeout
Definition: TrigDBLoader.h:71
TrigConf::TrigDBLoader::m_retrialPeriod
int m_retrialPeriod
Definition: TrigDBLoader.h:69
TrigConf::TrigConfMessaging
Class to provide easy access to TrigConf::MsgStream for TrigConf classes.
Definition: TrigConfMessaging.h:28
TrigConf::TrigDBLoader::writeRawFile
bool writeRawFile(const coral::Blob &data, const std::string &outFileName) const
write data blob into file This can be used to write the DB content to file without going through a pt...
Definition: TrigDBLoader.cxx:80
TrigConf::TrigDBLoader::~TrigDBLoader
virtual ~TrigDBLoader() override
Destructor - cannot be defined here because QueryDefinition is an incomplete type.
TrigConf::TrigDBLoader::setLevel
void setLevel(MSGTC::Level lvl)
Definition: TrigDBLoader.h:52
TrigConfMessaging.h
Messaging base class for TrigConf code shared with Lvl1 ( AthMessaging)
TrigConf::MsgStreamTC::setLevel
void setLevel(MSGTC::Level lvl)
Set message level of stream.
Definition: Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx:52
TrigConf::TrigDBLoader::createDBSession
std::unique_ptr< coral::ISessionProxy > createDBSession() const
create (if needed) DB session and return the session proxy
Definition: TrigDBLoader.cxx:94
TrigConf::TrigDBLoader::getQueryDefinition
QueryDefinition getQueryDefinition(size_t schemaVersion, const std::map< size_t, QueryDefinition > &queries) const
return query for given schemaVersion from possible queries
Definition: TrigDBLoader.cxx:122
TrigConf::TrigDBLoader::TrigDBLoader
TrigDBLoader(const std::string &loaderName, const std::string &connection)
Constructor.
Definition: TrigDBLoader.cxx:21