Public Member Functions | Static Public Member Functions | List of all members
OutputConvention Class Reference

A class to systematically name files produced by my analysis programs. More...

#include <OutputConvention.h>

Public Member Functions

 OutputConvention (int argcIn, char *argvIn[])
 Constructor. More...
 
TString getOutputFileName (TString ext="")
 Get the name of the output file from the program name (and system time). More...
 

Static Public Member Functions

static TFile * getFile (TString fileNameWithWildcards)
 Opens a TFile matching a fileName with wildcards. If multiple matches gets the "greatest" TString, which hopefully corresponds to the file with the latest date suffix. More...
 

Detailed Description

A class to systematically name files produced by my analysis programs.

Uses the program name, arguments, date, and time.

Definition at line 31 of file OutputConvention.h.

Constructor & Destructor Documentation

OutputConvention::OutputConvention ( int  argcIn,
char *  argvIn[] 
)

Constructor.

Parameters
argcInshould be the main executable's argc value.
argvInshould be the main executable's argv value.

Definition at line 14 of file OutputConvention.cxx.

Member Function Documentation

TFile * OutputConvention::getFile ( TString  fileNameWithWildcards)
static

Opens a TFile matching a fileName with wildcards. If multiple matches gets the "greatest" TString, which hopefully corresponds to the file with the latest date suffix.

Parameters
fileNameWithWildcardsis the name of the file (with wildcards) that you wish to open.
Returns
NULL if no matches, the opened file if there is a match.

Sorts all matching files into increasing order of fileName. If the files have my standard date suffix attached to them, then this should correspond to the most recent file.

Definition at line 171 of file OutputConvention.cxx.

TString OutputConvention::getOutputFileName ( TString  ext = "")

Get the name of the output file from the program name (and system time).

Parameters
extis an optional parameter file extension you want (e.g. .txt, .root, .csv), if none is given then .root is used.
Returns
the output file name

Definition at line 35 of file OutputConvention.cxx.


The documentation for this class was generated from the following files: