BCAux Namespace Reference
Some functions not fitting anywhere else. More...
Classes | |
class | BCTrash |
A trash to keep heap-allocated objects of type T alive until the trash goes out of scope. More... | |
class | RootSideEffectGuard |
A guard object to prevent ROOT from taking over ownership of TNamed objects. More... | |
Enumerations | |
enum | BCKnowledgeUpdateDrawingStyle { kKnowledgeUpdateDefaultStyle = 0, kKnowledgeUpdateDetailedPosterior = 1, kKnowledgeUpdateDetailedPrior = 2 } |
An enumerator for the knowledge update drawing style presets. More... | |
enum | BCRange { kFiniteRange = 1, kNegativeInfiniteRange = 2, kPositiveInfiniteRange = 3, kInfiniteRange = 4, kEmptyRange = 5, kReverseRange = 6 } |
Range types. More... | |
Functions | |
bool | AllowedCharacter (char c) |
void | DefaultToPDF (std::string &filename) |
Force file extension to be .pdf if not already .pdf or .ps. More... | |
void | DrawKnowledgeUpdate (BCHistogramBase &prior, BCHistogramBase &posterior, bool draw_prior_first, BCTrash< TObject > &trash) |
Draw knowledge update plot into current TPad. More... | |
void | MakeFinite (double &xmin, double &xmax) |
Make an infinite range finite by setting inf values to max. More... | |
template<class T > | |
T * | OwnClone (const T *o) |
Create a clone of the input but avoid registering the object with ROOT so it cannot be deleted twice. | |
template<class T > | |
T * | OwnClone (const T *o, const std::string &name) |
Create a clone of the input, change the name but avoid registering the object with ROOT so it cannot be deleted twice. | |
unsigned | PrintPlots (std::vector< BCH1D > &h1, std::vector< BCH2D > &h2, const std::string &filename, unsigned hdiv=1, unsigned vdiv=1) |
Print plots. More... | |
BCAux::BCRange | RangeType (double xmin, double xmax) |
Return type of range as a BCAux::BCRange enum. More... | |
std::string | SafeName (const std::string &name) |
Convert a name into a safe name for use in ROOT object naming. More... | |
void | SetKnowledgeUpdateDrawingStyle (BCH1D &prior, BCH1D &posterior, BCAux::BCKnowledgeUpdateDrawingStyle style=BCAux::kKnowledgeUpdateDefaultStyle) |
Use pre-made drawing options for knowledge update plots. More... | |
void | SetKnowledgeUpdateDrawingStyle (BCH2D &prior, BCH2D &posterior, BCAux::BCKnowledgeUpdateDrawingStyle style=BCAux::kKnowledgeUpdateDefaultStyle) |
Use pre-made drawing options for knowledge update plots. More... | |
void | SetStyle () |
TH2 * | Transpose (const TH2 *const h, const std::string &name="") |
Transpose a TH2. More... | |
Detailed Description
Some functions not fitting anywhere else.
- Version
- 1.0
- Date
- 01.2009
A namespace which encapsulates auxiliary functions necessary for BAT.
Enumeration Type Documentation
An enumerator for the knowledge update drawing style presets.
enum BCAux::BCRange |
Range types.
Function Documentation
bool BCAux::AllowedCharacter | ( | char | c | ) |
void BCAux::DefaultToPDF | ( | std::string & | filename | ) |
void BCAux::DrawKnowledgeUpdate | ( | BCHistogramBase & | prior, |
BCHistogramBase & | posterior, | ||
bool | draw_prior_first, | ||
BCTrash< TObject > & | trash | ||
) |
Draw knowledge update plot into current TPad.
- Parameters
-
prior BCHistogramBase containing prior posterior BCHistogramBase containing posterior draw_prior_first Flag for deciding drawing order. trash Where to keep references of plot objects for later deletion.
void BCAux::MakeFinite | ( | double & | xmin, |
double & | xmax | ||
) |
BCAux::BCRange BCAux::RangeType | ( | double | xmin, |
double | xmax | ||
) |
Return type of range as a BCAux::BCRange enum.
- Parameters
-
xmin lower limit of range xmax upper limit of range
- Returns
- range type.
std::string BCAux::SafeName | ( | const std::string & | name | ) |
void BCAux::SetKnowledgeUpdateDrawingStyle | ( | BCH1D & | prior, |
BCH1D & | posterior, | ||
BCAux::BCKnowledgeUpdateDrawingStyle | style = BCAux::kKnowledgeUpdateDefaultStyle |
||
) |
void BCAux::SetKnowledgeUpdateDrawingStyle | ( | BCH2D & | prior, |
BCH2D & | posterior, | ||
BCAux::BCKnowledgeUpdateDrawingStyle | style = BCAux::kKnowledgeUpdateDefaultStyle |
||
) |
void BCAux::SetStyle | ( | ) |
- Deprecated:
- This function is empty but for a warning message.
Please do not call it.
TH2 * BCAux::Transpose | ( | const TH2 *const | h, |
const std::string & | name = "" |
||
) |