Per-run or per-file information. More...
#include <CDFRunInfo.h>
Public Member Functions | |
CDFRunInfo () | |
CDFRunInfo (TFile *fromFile) | |
const char * | get (const char *key) const |
Get some run info by name. More... | |
double | getDouble (const char *key) const |
Get a run info item by name and convert it to a double. More... | |
int | getInt (const char *key) const |
Get a run info item by name and convert it to an integer. More... | |
int | getKeys (const char **buffer, int nbufs) |
fill the given array with key name pointers More... | |
int | getSize () const |
get the number of items More... | |
bool | hasKey (const char *key) const |
test for thr presence of given key More... | |
void | print () const |
print all information to the terminal More... | |
void | setInfo (const char *key, const char *value) |
add some information to the run info More... | |
void | store (TFile *toFile) |
Private Member Functions | |
bool | load (TFile *fromFile) |
Private Attributes | |
std::map< std::string, std::string > | m_mapData |
Static Private Attributes | |
static const char * | RootVariableName = "CDFRunInfo" |
Per-run or per-file information.
This class allows access to per-run or per-file information as opposed to per-event information such as CDFEventInfo. The information is stored in the form of string -> string pairs. There are utility methods for decoding string values as integers and doubles.
Definition at line 15 of file CDFRunInfo.h.
CDFRunInfo::CDFRunInfo | ( | ) |
Definition at line 8 of file CDFRunInfo.cc.
CDFRunInfo::CDFRunInfo | ( | TFile * | fromFile | ) |
const char * CDFRunInfo::get | ( | const char * | key | ) | const |
Get some run info by name.
Definition at line 15 of file CDFRunInfo.cc.
References i, m_mapData, and NULL.
Referenced by Options.Options::__getitem__().
double CDFRunInfo::getDouble | ( | const char * | key | ) | const |
Get a run info item by name and convert it to a double.
Definition at line 27 of file CDFRunInfo.cc.
References gen::k, combine::key, and NULL.
int CDFRunInfo::getInt | ( | const char * | key | ) | const |
Get a run info item by name and convert it to an integer.
Definition at line 21 of file CDFRunInfo.cc.
References gen::k, combine::key, and NULL.
int CDFRunInfo::getKeys | ( | const char ** | buffer, |
int | nbufs | ||
) |
|
inline |
bool CDFRunInfo::hasKey | ( | const char * | key | ) | const |
|
private |
Definition at line 50 of file CDFRunInfo.cc.
References a, b, i, m_mapData, NULL, connectstrParser::o, and RootVariableName.
Referenced by CDFRunInfo().
void CDFRunInfo::print | ( | void | ) | const |
void CDFRunInfo::setInfo | ( | const char * | key, |
const char * | value | ||
) |
add some information to the run info
Definition at line 46 of file CDFRunInfo.cc.
References combine::key, m_mapData, and relativeConstraints::value.
Referenced by HcalTBWriter::analyze(), and HcalTBWriter::endJob().
void CDFRunInfo::store | ( | TFile * | toFile | ) |
Definition at line 66 of file CDFRunInfo.cc.
References i, m_mapData, and RootVariableName.
Referenced by HcalTBWriter::endJob().
|
private |
|
staticprivate |
Definition at line 41 of file CDFRunInfo.h.