Skip to content

Logfile

Dylan Teague edited this page Dec 22, 2016 · 2 revisions

#Logfile Log file is a small class that handles writing out of cut flow efficiency. If you want certain information in the output file, this class makes it easy to make these changes without deeply affecting the Plotter. Feel free to modify or add whatever functions you need.

The current format for the logfiles is a latex format. The output logfile will look roughly like this:

Process Data Background 1 ...
Cut 1 #### #### ####
Cut 2 #### #### ####
... ... .... ...

Constructors and Destructors

Logfile();
Logfile(string logname);
~Logfile();

The constructor simply opens up an outfile file with the name given. If none is given, the default is log.txt.

Public Functions

void setHeader(vector<string> plotnames)

Sets up the Latex table and puts the data samples to be used in the table across the top. Because it sets up the top row of the table, it gets the sample names from plotnames


void addLine(vector<string> values)

Puts the values of number of normalized events to pass up to a certain cut. The values are set up in the Plotter with the error bounds, so the Logfile simple takes the vector values and separates them into their respective cells in the table. Since it is so general, most changes to format are processed by the Plotter. If one wants more specific function to abstract this more, a function may be created (might do in future)


void setTrailer()

Ends the table in latex (since latex uses tags).