31 "LHPC_SpectrumPlotter_gnuplot.dat" );
33 "LHPC_SpectrumPlotter_gnuplot.input" );
51 plotControlBlock( plotControlBlock ),
52 linePlottingBlock( linePlottingBlock ),
53 fmassPointer( fmassPointer ),
54 massPointer( massPointer ),
60 columnPointer( NULL ),
66 notYetFinishedShuffling( false ),
67 remainingShuffles( maximumLabelFloatingShuffles ),
68 whichMassEigenstate( 0 ),
70 labelRoomWidth( 30.0 ),
71 labelLatexWidth( labelRoomWidth ),
72 fullColumnWidth( labelRoomWidth + joinerWidth
73 + flatBitWidth + columnPairOffset
74 + joinerWidth + labelRoomWidth ),
75 labelSeparation( 0.05 ),
77 lastOperationSuccessful( false ),
78 systemCallReturn( -1 ),
79 fullLatexFilename( fullLatexBaseName ),
85 mainCleanupCommand(
"" ),
87 leftColumnRatherThanRight( false ),
88 leftLineXValue( 0.0 ),
89 middleLineXValue( 0.0 ),
90 rightLineXValue( 0.0 ),
91 gnuplotLineIndex( 0 ),
92 gnuplotLabelString(
"" )
105 bool const shouldCleanUp )
209 <<
"LHPC::warning! SpectrumPlotter did not understand \""
211 <<
" units are \"GeV\", \"TeV\", \"MeV\", \"keV\", and \"eV\"),"
212 <<
" and is defaulting to GeV.";
213 std::cout << std::endl;
411 for(
int whichColumn(
columnSet.getLastIndex() );
436 for(
int whichColumn(
columnSet.getLastIndex() );
441 for( std::list< SpectrumPlotting::LineData >::iterator
459 for(
int whichColumn(
columnSet.getLastIndex() );
548 if( gnuplotDataFile.is_open()
550 gnuplotCommandFile.is_open() )
552 bool returnBool(
true );
554 <<
"set term epslatex color solid"
556 << std::endl <<
"set format x \"\""
557 << std::endl <<
"unset xtics"
558 << std::endl <<
"set ytics out"
562 for(
int whichColumn(
columnSet.getLastIndex() );
567 if( 1 == ( whichColumn % 2 ) )
592 for( std::list< SpectrumPlotting::LineData >::iterator
662 gnuplotDataFile << std::endl << std::endl;
673 gnuplotDataFile.close();
678 << ( ( (double)( (
columnSet.getLastIndex() / 2 )
685 <<
"' index 0 notitle with lines ls 1";
686 for(
int whichLine( 1 );
692 <<
"' index " << whichLine
693 <<
" notitle with lines ls " << ( whichLine + 1 );
695 gnuplotCommandFile << std::endl;
696 gnuplotCommandFile.close();
699 if( fullLatexFile.is_open() )
702 <<
"\\documentclass{article}" << std::endl
703 <<
"\\usepackage{graphics}" << std::endl
704 <<
"\\newlength\\labelmover" << std::endl
705 <<
"\\begin{document}" << std::endl
706 <<
"\\pagestyle{empty}" << std::endl
707 <<
"\\begin{center}" << std::endl
709 <<
"\\end{center}" << std::endl
710 <<
"\\end{document}" << std::endl;
711 fullLatexFile.close();
static double stringToDouble(std::string const &stringToInterpret)
static void transformToUppercase(std::string &stringToTransform)
int getNumberOfCopiesWithDifferentScale() const
static int const dvipsIndex
static std::string const fullLatexBaseName
LineMap::const_iterator lineIterator
std::string gnuplotLabelString
static int const unitIndex
std::list< SpectrumPlotting::LineData >::iterator upperMassIterator
BOL::VectorlikeArray< LineList > columnSet
static std::string const gnuplotCommandFileName
std::string gnuplotCommand
virtual ~SpectrumPlotter()
static std::string const gnuplotDataFileName
static int const labelXSizeIndex
std::string fullLatexFilename
bool leftColumnRatherThanRight
MassBlock const *const massPointer
static int const latexIndex
LineMap const * plotLineMap
static double const joinerWidth
std::string mainCleanupCommand
SpectrumPlotting::LineData lineAdder
bool lastOperationSuccessful
static std::string const gnuplotTexBaseName
static double const automaticScaleFactor
static int const labelYSizeIndex
static double const marginWidth
static int const gnuplotIndex
static int const ps2epsIndex
FmassBlock const *const fmassPointer
static int const maximumLabelFloatingShuffles
StringBlock const & plotControlBlock
SpectrumPlotter(StringBlock const &plotControlBlock, StringBlock const &linePlottingBlock, FmassBlock const *const fmassPointer, MassBlock const *const massPointer=NULL)
void loadCommands(std::string const &plotFileName)
static int const scaleIndex
StringBlock const & linePlottingBlock
std::list< SpectrumPlotting::LineData >::iterator lowerMassIterator
static double const flatBitWidth
bool notYetFinishedShuffling
bool plotSpectrum(std::string const &plotFileName, bool const shouldCleanUp=true)
static double const labelSeparationShuffleFactor
static double const columnPairOffset
std::string ps2epsCommand
void setValues(std::string const &dataString, double const massValue)
static bool lowToHigh(LineData const &firstLineData, LineData const &secondLineData)