ATLAS Offline Software
Loading...
Searching...
No Matches
CondDataObj.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 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#include <iostream>
24inline std::ostream& operator<<(std::ostream& ost, const CondDataObj& rhs) {
25 ost << rhs.val();
26 return ost;
27}
28
29
30//using the macros below we can assign an identifier (and a version)
31//to the type CondDataObj
32//This is required and checked at compile time when you try to record/retrieve
34CLASS_DEF( CondDataObj , 232539028 , 1 )
35CLASS_DEF( CondCont<CondDataObj> , 261788530 , 1 )
36
37
38#endif
std::ostream & operator<<(std::ostream &ost, const CondDataObj &rhs)
Definition CondDataObj.h:24
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