ATLAS Offline Software
Loading...
Searching...
No Matches
Value.h File Reference
#include <string>
#include <vector>
#include <iostream>
Include dependency graph for Value.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Value
 tag-value pair class. More...

Functions

std::ostream & operator<< (std::ostream &s, const Value &v)

Detailed Description

Author
M.Sutton
Date
Wed May 4 11:14:42 BST 2005

Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration

Definition in file Value.h.

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & s,
const Value & v )

Definition at line 24 of file Value.cxx.

24 {
25
26 const std::vector<std::string>& vals = v.Val();
27 s << v.Tag() << "\t= ";
28 if ( vals.size()>1 ) {
29 s << "{ ";
30 if ( vals.size()>12 ) s<< "\t";
31 for ( unsigned i=0 ; i<vals.size()-1 ; i++ ) {
32 if ( i && i%12==0 ) s << "\n\t\t";
33 s << vals[i] << ", ";
34 }
35 }
36 if ( vals.size()>0 ) s << vals[vals.size()-1];
37 if ( vals.size()>12 ) s << " ";
38 if ( vals.size()>1 ) s << " }";
39
40 return s;
41}