ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
InDetDD::Version Class Reference

#include <Version.h>

Collaboration diagram for InDetDD::Version:

Public Member Functions

 Version (const std::string &tag, const std::string &name, const std::string &layout, const std::string &description, int major, int minor, int patch)
 Constructor. More...
 
 Version ()
 Empty Constructor
More...
 
const std::string & tag () const
 Version tag. More...
 
const std::string & name () const
 Version label. More...
 
const std::string & layout () const
 Layout (eg Initial, Final, TestBeam) More...
 
const std::string & description () const
 Description or comment. More...
 
int majorNum () const
 Major version number. More...
 
int minorNum () const
 Minor version number. More...
 
int patchNum () const
 Patch version number
More...
 
std::string versionNumber () const
 Print out version number (eg. More...
 
std::string fullDescription () const
 Full Description For example, Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 2.00.00, Description: DC1 Geometry. More...
 

Private Attributes

std::string m_tag
 
std::string m_name
 
std::string m_layout
 
std::string m_description
 
int m_major
 
int m_minor
 
int m_patch
 

Detailed Description

Class to hold version information consisting of tag, name layout and description as strings, such as their integer regpresentation in the major-minor-tag scheme

Definition at line 24 of file Version.h.

Constructor & Destructor Documentation

◆ Version() [1/2]

InDetDD::Version::Version ( const std::string &  tag,
const std::string &  name,
const std::string &  layout,
const std::string &  description,
int  major,
int  minor,
int  patch 
)

Constructor.


Definition at line 13 of file Version.cxx.

20  : m_tag(tag),
21  m_name(name),
24  m_major(major),
25  m_minor(minor),
26  m_patch(patch)
27 {}

◆ Version() [2/2]

InDetDD::Version::Version ( )

Empty Constructor

Definition at line 31 of file Version.cxx.

32  : m_major(0),
33  m_minor(0),
34  m_patch(0)
35 {}

Member Function Documentation

◆ description()

const std::string & InDetDD::Version::description ( ) const

Description or comment.

Definition at line 56 of file Version.cxx.

57 {
58  return m_description;
59 }

◆ fullDescription()

std::string InDetDD::Version::fullDescription ( ) const

Full Description For example, Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 2.00.00, Description: DC1 Geometry.

Definition at line 90 of file Version.cxx.

91 {
92 
93  // Output of the form
94  // Version: SCT-DC1-00, Name: DC1, Layout: Final, Code Version: 02.01.01, Description: DC1 Geometry
95 
96  std::ostringstream ostr;
97  ostr << "Version: " << m_tag << ", Name: " << m_name << ", Layout: " << m_layout
98  << ", Code Version: " << versionNumber();
99  if (!m_description.empty()) {
100  ostr << ", Description: " << m_description;
101  }
102  return ostr.str();
103 }

◆ layout()

const std::string & InDetDD::Version::layout ( ) const

Layout (eg Initial, Final, TestBeam)

Definition at line 50 of file Version.cxx.

51 {
52  return m_layout;
53 }

◆ majorNum()

int InDetDD::Version::majorNum ( ) const

Major version number.

Definition at line 62 of file Version.cxx.

63 {
64  return m_major;
65 }

◆ minorNum()

int InDetDD::Version::minorNum ( ) const

Minor version number.

Definition at line 68 of file Version.cxx.

69 {
70  return m_minor;
71 }

◆ name()

const std::string & InDetDD::Version::name ( ) const

Version label.

Definition at line 44 of file Version.cxx.

45 {
46  return m_name;
47 }

◆ patchNum()

int InDetDD::Version::patchNum ( ) const

Patch version number

Definition at line 74 of file Version.cxx.

75 {
76  return m_patch;
77 }

◆ tag()

const std::string & InDetDD::Version::tag ( ) const

Version tag.

Definition at line 38 of file Version.cxx.

39 {
40  return m_tag;
41 }

◆ versionNumber()

std::string InDetDD::Version::versionNumber ( ) const

Print out version number (eg.

2.00.00)

Definition at line 80 of file Version.cxx.

81 {
82  std::ostringstream ostr;
83  ostr << m_major
84  << "." << std::setfill('0') << std::setw(2) << m_minor
85  << "." << std::setfill('0') << std::setw(2) << m_patch;
86  return ostr.str();
87 }

Member Data Documentation

◆ m_description

std::string InDetDD::Version::m_description
private

Definition at line 75 of file Version.h.

◆ m_layout

std::string InDetDD::Version::m_layout
private

Definition at line 74 of file Version.h.

◆ m_major

int InDetDD::Version::m_major
private

Definition at line 76 of file Version.h.

◆ m_minor

int InDetDD::Version::m_minor
private

Definition at line 77 of file Version.h.

◆ m_name

std::string InDetDD::Version::m_name
private

Definition at line 73 of file Version.h.

◆ m_patch

int InDetDD::Version::m_patch
private

Definition at line 78 of file Version.h.

◆ m_tag

std::string InDetDD::Version::m_tag
private

Definition at line 72 of file Version.h.


The documentation for this class was generated from the following files:
InDetDD::Version::layout
const std::string & layout() const
Layout (eg Initial, Final, TestBeam)
Definition: Version.cxx:50
InDetDD::Version::m_patch
int m_patch
Definition: Version.h:78
InDetDD::Version::versionNumber
std::string versionNumber() const
Print out version number (eg.
Definition: Version.cxx:80
InDetDD::Version::name
const std::string & name() const
Version label.
Definition: Version.cxx:44
InDetDD::Version::m_tag
std::string m_tag
Definition: Version.h:72
InDetDD::Version::m_minor
int m_minor
Definition: Version.h:77
InDetDD::Version::m_description
std::string m_description
Definition: Version.h:75
InDetDD::Version::description
const std::string & description() const
Description or comment.
Definition: Version.cxx:56
InDetDD::Version::m_layout
std::string m_layout
Definition: Version.h:74
InDetDD::Version::m_major
int m_major
Definition: Version.h:76
InDetDD::Version::tag
const std::string & tag() const
Version tag.
Definition: Version.cxx:38
InDetDD::Version::m_name
std::string m_name
Definition: Version.h:73