a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
LineData.cpp
Go to the documentation of this file.
1/*
2 * LineData.cpp
3 *
4 * Created on: Feb 26, 2012
5 * Author: Ben O'Leary (benjamin.oleary@gmail.com)
6 * Copyright 2012 Ben O'Leary
7 *
8 * This file is part of LesHouchesParserClasses, released under the
9 * GNU General Public License. Please see the accompanying
10 * README.LHPC_CPP.txt file for a full list of files, brief documentation
11 * on how to use these classes, and further details on the license.
12 */
13
14#include "SSP/LineData.hpp"
15
16namespace LHPC
17{
18 namespace SLHA
19 {
20 namespace SpectrumPlotting
21 {
23 '0',
24 3,
25 1,
26 "",
27 "-",
28 "",
29 "-",
30 "e" );
31
33 columnIndex( 0 ),
34 whichJustification( centerJustified ),
35 massValue( 0.0 ),
36 labelPosition( -1.0 ),
37 labelString( "error" ),
38 colorString( "black" ),
39 remainderString( "" )
40 {
41 // just an initialization list (with default unset values).
42 }
43
44 LineData::LineData( LineData const& copySource ) :
45 columnIndex( copySource.columnIndex ),
46 whichJustification( copySource.whichJustification ),
47 massValue( copySource.massValue ),
48 labelPosition( copySource.labelPosition ),
49 labelString( copySource.labelString ),
50 colorString( copySource.colorString ),
51 remainderString( "" )
52 {
53 // just an initialization list.
54 }
55
57 {
58 // does nothing.
59 }
60
61
62 void
63 LineData::setValues( std::string const& dataString,
64 double const massValue )
65 {
66 if( 0.0 > massValue )
67 {
68 this->massValue = -massValue;
69 }
70 else
71 {
72 this->massValue = massValue;
73 }
77 dataString,
80 if( 0 == ( columnIndex % 2 ) )
81 {
83 /* columns 2, 4, ... are the right-hand columns of their pairs & get
84 * their labels flushed up against their right side, thus the labels'
85 * left sides.
86 */
87 }
88 else
89 {
91 /* columns 2, 4, ... are the left-hand columns of their pairs & get
92 * their labels flushed up against their left side, thus the labels'
93 * right sides.
94 */
95 }
102 }
103
104 }
105
106 }
107
108}
static std::string firstWordOf(std::string const &stringToParse, std::string *const remainderString=NULL, std::string const &separatorChars=whitespaceChars)
static std::string const whitespaceChars
static std::string trimFromFrontAndBack(std::string const &stringToTrim, std::string const &charsToTrim=whitespaceAndNewlineChars)
static int stringToInt(std::string const &stringToInterpret)
JustificationStyle whichJustification
Definition: LineData.hpp:75
static BOL::StringParser const overlargeMassPrinter
Definition: LineData.hpp:72
void setValues(std::string const &dataString, double const massValue)
Definition: LineData.cpp:63