checkmate is hosted by Hepforge, IPPP Durham
AnalysisBase Documentation  1.2.0
File Streams and IO

Functions and objects to easily handle additional output files. More...

Functions

int AnalysisBase::bookFile (std::string name, bool noheader=false)
 Function to book file streams accessible via fStreams and fNames. More...
 

Variables

std::vector< std::ofstream * > AnalysisBase::fStreams
 Container of output file streams booked via bookFile() More...
 
std::vector< std::string > AnalysisBase::fNames
 Container of output file names booked via bookFile() More...
 

Detailed Description

Functions and objects to easily handle additional output files.

Normally, a given analysis only has to create the respective cutflow.dat and signal.dat files, which is done automatically via the booking of signal and cutflow regions. However, for debugging purposes or further means of validation, it might be required to store intermediate results in separate files. The bookfile() routine should be used for this purpose for the following reasons:

  • The booked file is stored in whatever output directory is used in the main CheckMATE runs
  • Each separate input event file is associated with a new file, identified by the XXX_ prefix known from the _signal.dat and _cutflow.dat files
  • Unless the second argument is specifically set to 'true', each file starts with the same header information that is found in _cutflow.dat and _signal.dat

Function Documentation

int AnalysisBase::bookFile ( std::string  name,
bool  noheader = false 
)
protected

Function to book file streams accessible via fStreams and fNames.

This function opens a file in the CheckMATE run-specific output directory for each input event file associating the same XXX prefixes as for the cutflow and signal files.

Parameters
nameThe file ist stored in <CheckMATE output directory>/analysis/<prefix>_name .
noheaderIf not set to true, each file automatically starts with standard header information of the given analysis and the analysed event file.
Returns
An integer corresponding to the associated object within the fStreams and fNames vectors.

Definition at line 235 of file AnalysisBase.cc.

Variable Documentation

std::vector<std::ofstream*> AnalysisBase::fStreams
protected

Container of output file streams booked via bookFile()

Definition at line 496 of file AnalysisBase.h.

std::vector<std::string> AnalysisBase::fNames
protected

Container of output file names booked via bookFile()

Definition at line 497 of file AnalysisBase.h.