HistoFormat.hh
// -*- C++ -*-
#ifndef RIVET_HistoFormat_HH
#define RIVET_HistoFormat_HH
#include "Rivet/Rivet.hh"
namespace Rivet {
enum HistoFormat { AIDAML, FLAT, ROOT };
typedef std::map<HistoFormat, std::string> HistoFormatMap;
typedef std::map<std::string, HistoFormat> HistoFormatMapR;
inline HistoFormatMap getKnownHistoFormats() {
HistoFormatMap hfmap;
hfmap[AIDAML] = "AIDA";
hfmap[FLAT] = "FLAT";
#ifdef HAVE_ROOT
hfmap[ROOT] = "ROOT";
#endif
return hfmap;
}
inline HistoFormatMapR getKnownHistoFormatsR() {
HistoFormatMap hfmap = getKnownHistoFormats();
HistoFormatMapR hfmapr;
for (HistoFormatMap::const_iterator hf = hfmap.begin(); hf != hfmap.end(); ++hf) {
hfmapr[hf->second] = hf->first;
}
return hfmapr;
}
typedef std::vector<HistoFormat> HistoFormatList;
inline HistoFormatList getKnownHistoFormatEnums() {
HistoFormatList names;
HistoFormatMap hfmap = getKnownHistoFormats();
for (HistoFormatMap::const_iterator hf = hfmap.begin(); hf != hfmap.end(); ++hf) {
names.push_back(hf->first);
}
return names;
}
inline std::vector<std::string> getKnownHistoFormatNames() {
vector<string> names;
HistoFormatMap hfmap = getKnownHistoFormats();
for (HistoFormatMap::const_iterator hf = hfmap.begin(); hf != hfmap.end(); ++hf) {
names.push_back(hf->second);
}
return names;
}
}
#endif
Rivet::HistoFormat
HistoFormat
Enumeration of available histogram output formats.
Definition: HistoFormat.hh:11
Rivet::getKnownHistoFormatEnums
HistoFormatList getKnownHistoFormatEnums()
Definition: HistoFormat.hh:49
Rivet::getKnownHistoFormatsR
HistoFormatMapR getKnownHistoFormatsR()
Function which returns a map from histogram format name strings to the corresponding enums...
Definition: HistoFormat.hh:33
Rivet::getKnownHistoFormatNames
std::vector< std::string > getKnownHistoFormatNames()
Function which returns a vector of all the histogram format name strings.
Definition: HistoFormat.hh:60
Rivet::getKnownHistoFormats
HistoFormatMap getKnownHistoFormats()
Function which returns a map from histogram format enums to the corresponding name strings...
Definition: HistoFormat.hh:22
Rivet::HistoFormatMapR
std::map< std::string, HistoFormat > HistoFormatMapR
Typedef for a map of histogram format name strings to enums.
Definition: HistoFormat.hh:18
Rivet::HistoFormatMap
std::map< HistoFormat, std::string > HistoFormatMap
Typedef for a map of histogram format enums to strings.
Definition: HistoFormat.hh:14
Rivet::HistoFormatList
std::vector< HistoFormat > HistoFormatList
Typedef for a collection of histogram format name enums.
Definition: HistoFormat.hh:44