ATLAS Offline Software
Loading...
Searching...
No Matches
ASCIICondDbSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHEXHIVE_CONDEX_ASCIICONDDBSVC_H
6#define ATHEXHIVE_CONDEX_ASCIICONDDBSVC_H
7
8#include "GaudiKernel/Service.h"
9#include "GaudiKernel/EventIDBase.h"
10#include "GaudiKernel/EventIDRange.h"
13
15
16#include <map>
17#include <set>
18#include <vector>
19#include <mutex>
20
21class ASCIICondDbSvc: public extends<AthService, IASCIICondDbSvc> {
22public:
23
24 ASCIICondDbSvc(const std::string& name, ISvcLocator* svc);
25 ~ASCIICondDbSvc() = default;
26
27 virtual StatusCode initialize() override;
28 virtual StatusCode finalize() override;
29
30 // from IASCIICondDbSvc
31public:
32
33 virtual StatusCode getRange(const std::string&
34 , const EventContext&
35 , EventIDRange&,
36 IASCIICondDbSvc::dbData_t&) const override;
37
38 virtual void dump() const override;
39 void dump(std::ostringstream&) const;
40
41private:
42
43 bool parse(EventIDRange& t, const std::string& s);
44 bool parse(IOVEntryT<IASCIICondDbSvc::dbData_t>& t, const std::string& s);
45
46 StatusCode readDbFile(const std::string&);
47
48 Gaudi::Property<std::string> m_file{this, "CondFile", "", "cond db file name"};
49 Gaudi::Property<unsigned int> m_lbn{this, "LBN", 1, "explicit lumi block number"};
50
51 typedef std::map<std::string, std::vector<IOVEntryT<IASCIICondDbSvc::dbData_t>>> registry_t;
53
54 mutable std::mutex m_lock;
55
56};
57
58#endif
virtual StatusCode getRange(const std::string &, const EventContext &, EventIDRange &, IASCIICondDbSvc::dbData_t &) const override
Gaudi::Property< unsigned int > m_lbn
virtual StatusCode finalize() override
Gaudi::Property< std::string > m_file
virtual StatusCode initialize() override
ASCIICondDbSvc(const std::string &name, ISvcLocator *svc)
registry_t m_registry
std::map< std::string, std::vector< IOVEntryT< IASCIICondDbSvc::dbData_t > > > registry_t
std::mutex m_lock
bool parse(EventIDRange &t, const std::string &s)
~ASCIICondDbSvc()=default
StatusCode readDbFile(const std::string &)
virtual void dump() const override