ATLAS Offline Software
Loading...
Searching...
No Matches
Parameter.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4// Parameter.cxx
5// TopoCore
6// Created by Joerg Stelzer on 11/18/12.
7
9#include <iostream>
10
11
12using namespace std;
13using namespace TCS;
14
22
23
24Parameter::Parameter( string_view name,
25 TCS::parType_t value,
27 m_name(name),
28 m_value(value),
29 m_selection(selection),
30 m_defaultValue(value),
31 m_isExtended(true)
32{}
33
34
35namespace TCS {
36
37
38std::ostream &
39operator<<(std::ostream &o, const TCS::Parameter & p) {
40
41 if(!p.isExtended()) {
42 o << p.name() << ": " << p.value();
43 }
44
45 if(p.isExtended()) {
46 o << p.name() << ": " << p.value() << ": " << p.position() << ": " << p.selection();
47 }
48
49 if(!p.isDefault()) {
50 o << " (default value: " << p.defaultValue() << ")";
51 }
52
53 return o;
54}
55
56
57}
parType_t m_value
Definition Parameter.h:65
parType_t value() const
Definition Parameter.h:36
bool m_isExtended
Definition Parameter.h:70
Parameter(std::string_view name, TCS::parType_t value)
Definition Parameter.cxx:15
parType_t m_defaultValue
Definition Parameter.h:68
std::string m_name
Definition Parameter.h:64
const std::string & name() const
Definition Parameter.h:34
const std::string selection
std::ostream & operator<<(std::ostream &os, const TCS::Bin &bin)
uint32_t parType_t
Definition Parameter.h:23
STL namespace.