ATLAS Offline Software
Loading...
Searching...
No Matches
CondDataObj.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 CONDALGS_CONDDATAOBJ_H
6#define CONDALGS_CONDDATAOBJ_H
7
9
10public:
11
13 CondDataObj(int i): m_val(i) {};
14 virtual ~CondDataObj(){};
15
16 void val(int i) { m_val = i; }
17 int val() const { return m_val; }
18
19private:
20 int m_val;
21};
22
23
24#include <format>
25namespace std {
26
27template <>
28struct formatter<CondDataObj>
29 : public formatter<string_view>
30{
31 template <class FmtContext>
32 FmtContext::iterator format (const CondDataObj& io, FmtContext& ctx) const
33 {
34 return std::format_to (ctx.out(), "{}", io.val());
35 }
36};
37
38} // namespace std
39
40
41//using the macros below we can assign an identifier (and a version)
42//to the type CondDataObj
43//This is required and checked at compile time when you try to record/retrieve
45CLASS_DEF( CondDataObj , 232539028 , 1 )
46CLASS_DEF( CondCont<CondDataObj> , 261788530 , 1 )
47
48
49#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Hold mapping of ranges to condition objects.
Definition CondCont.h:889
void val(int i)
Definition CondDataObj.h:16
CondDataObj(int i)
Definition CondDataObj.h:13
int val() const
Definition CondDataObj.h:17
virtual ~CondDataObj()
Definition CondDataObj.h:14
STL namespace.
FmtContext::iterator format(const CondDataObj &io, FmtContext &ctx) const
Definition CondDataObj.h:32