ATLAS Offline Software
|
This module defines a variety of assert style macros. More...
Namespaces | |
Check | |
Shell | |
Classes | |
class | ExceptionMsg |
struct | Message |
class | UnitTestDir |
Enumerations | |
enum | MessageType { MESSAGE_REGULAR, MESSAGE_WARNING, MESSAGE_ERROR, MESSAGE_EXCEPTION, MESSAGE_ABORT, MESSAGE_UNSPECIFIED } |
Functions | |
void | check_root_version () |
effects: check whether we are using a consistent root version guarantee: strong failures: version missmatch More... | |
void | disable_root_version_check () |
effects: disable the root version check guarantee: no-fail More... | |
void | hadd (const std::string &output_file, const std::vector< std::string > &input_files, unsigned max_files=0) |
effects: perform the hadd functionality guarantee: basic failures: out of memory III failures: i/o errors More... | |
std::string | locate (const std::string &locations) |
effects: find the file with the given name from a list of locations separated by "::". More... | |
void | send_message (const char *package, const char *file, unsigned line, MessageType type, const char *msg) |
void | send_message (const char *package, const char *file, unsigned line, MessageType type, const std::string &msg) |
void | send_message (const char *package, const char *file, unsigned line, MessageType type, const TString &msg) |
void | send_message_abort (const char *package, const char *file, unsigned line, MessageType type, const char *msg) |
void | send_message_abort (const char *package, const char *file, unsigned line, MessageType type, const std::string &msg) |
void | send_message_abort (const char *package, const char *file, unsigned line, MessageType type, const TString &msg) |
bool | SetDirectory (TObject *object, TDirectory *directory) |
effects: set the directory this object is associated with returns: whether the object type actively knows its directory, otherwise this is a no-op guarantee: strong failures: directory add errors requires: object != 0 rationale: this is mainly meant to allow calling SetDirectory(0) on arbitrary objects, but it also tries to do the right thing when adding objects to a directory. More... | |
std::string | substitute (const std::string &str, const std::string &pattern, const std::string &with) |
effects: substitute all occurences of "pattern" with "with" in the string "str" returns: the substituted string guarantee: out of memory II requires: !pattern.empty() More... | |
bool | match_expr (const boost::regex &expr, const std::string &str) |
returns: whether we can match the entire string with the regular expression guarantee: strong failures: out of memory II More... | |
std::string | glob_to_regexp (const std::string &glob) |
returns: a string that is the regular expression equivalent of the given glob expression guarantee: strong failures: out of memory II rationale: I am returning a TString instead of an std::string, so that this can be passed directly into regexp More... | |
This module defines a variety of assert style macros.
This module defines a class that manages a temporary directory for unit tests.
This module defines macros for reporting errors.
This module provides a lot of global definitions, forward declarations and includes that are used by all modules.
The interface in this module is indended for experts only. This module is considered to be in the pre-alpha stage. This module defines a variety of assert style macros for different situations, i.e. macros that test whether a particular condition has been met and that trigger an error if the condition is not met. The exact error behavior depends on the configuration options as well as the macro called. The main distinction is the purpose of the test: RCU_REQUIRE: checks on the arguments to a function RCU_PROVIDE: checks on the results of a function RCU_ASSERT: checks that happen in the middle of a function RCU_INVARIANT: checks that happen in the invariant test These can be further modified using postfixes: _SLOW: tests that are in the critical path of a program _SOFT: tests that are expected to fail in correctly implemented programs, i.e. should trigger an exception 2: tests that have a textual description of the condition 0: tests that always fail Furthermore there are also invariant tests in here (calling MyClass::testInvariant()): RCU_READ_INVARIANT: an invariant is read, but not modified RCU_CHANGE_INVARIANT: an invariant is read and modified RCU_NEW_INVARIANT: an invariant has been newly established RCU_DESTROY_INVARIANT: an invariant is about to be decomissioned
As such it doesn't fall into the user vs. expert classification.
The interface in this module is indended for experts only. This module is considered to be in the pre-alpha stage.
The interface provided in this module is intended for experts only. The module is considered to be in the pre-alpha stage.
enum RCU::MessageType |
Definition at line 23 of file MessageType.h.
void RCU::check_root_version | ( | ) |
effects: check whether we are using a consistent root version guarantee: strong failures: version missmatch
Definition at line 31 of file CheckRootVersion.cxx.
void RCU::disable_root_version_check | ( | ) |
effects: disable the root version check guarantee: no-fail
Definition at line 52 of file CheckRootVersion.cxx.
std::string RCU::glob_to_regexp | ( | const std::string & | glob | ) |
returns: a string that is the regular expression equivalent of the given glob expression guarantee: strong failures: out of memory II rationale: I am returning a TString instead of an std::string, so that this can be passed directly into regexp
Definition at line 56 of file StringUtil.cxx.
void RCU::hadd | ( | const std::string & | output_file, |
const std::vector< std::string > & | input_files, | ||
unsigned | max_files | ||
) |
std::string RCU::locate | ( | const std::string & | locations | ) |
effects: find the file with the given name from a list of locations separated by "::".
the list may contain either files or URLs starting with "http://". URLs will be downloaded into the data/ directory, where they will stay permanently. returns: the path in the local filesystem guarantee: strong failures: out of memory III failures: inconsistent file names failures: download errors rationale: depending on where you are executing your code, you may or may not have access to /cvmfs where important data files are kept. this mechanism allows to pick it up from various alternate places.
Definition at line 28 of file Locate.cxx.
returns: whether we can match the entire string with the regular expression guarantee: strong failures: out of memory II
Definition at line 40 of file StringUtil.cxx.
void RCU::send_message | ( | const char * | package, |
const char * | file, | ||
unsigned | line, | ||
MessageType | type, | ||
const char * | msg | ||
) |
void RCU::send_message | ( | const char * | package, |
const char * | file, | ||
unsigned | line, | ||
MessageType | type, | ||
const std::string & | msg | ||
) |
Definition at line 41 of file PrintMsg.cxx.
void RCU::send_message | ( | const char * | package, |
const char * | file, | ||
unsigned | line, | ||
MessageType | type, | ||
const TString & | msg | ||
) |
Definition at line 49 of file PrintMsg.cxx.
void RCU::send_message_abort | ( | const char * | package, |
const char * | file, | ||
unsigned | line, | ||
MessageType | type, | ||
const char * | msg | ||
) |
void RCU::send_message_abort | ( | const char * | package, |
const char * | file, | ||
unsigned | line, | ||
MessageType | type, | ||
const std::string & | msg | ||
) |
Definition at line 73 of file PrintMsg.cxx.
void RCU::send_message_abort | ( | const char * | package, |
const char * | file, | ||
unsigned | line, | ||
MessageType | type, | ||
const TString & | msg | ||
) |
Definition at line 81 of file PrintMsg.cxx.
bool RCU::SetDirectory | ( | TObject * | object, |
TDirectory * | directory | ||
) |
effects: set the directory this object is associated with returns: whether the object type actively knows its directory, otherwise this is a no-op guarantee: strong failures: directory add errors requires: object != 0 rationale: this is mainly meant to allow calling SetDirectory(0) on arbitrary objects, but it also tries to do the right thing when adding objects to a directory.
For the most part it is a workaround for TH1 objects keeping track of which directory they belong to.
Definition at line 28 of file RootUtils.cxx.
std::string RCU::substitute | ( | const std::string & | str, |
const std::string & | pattern, | ||
const std::string & | with | ||
) |
effects: substitute all occurences of "pattern" with "with" in the string "str" returns: the substituted string guarantee: out of memory II requires: !pattern.empty()
Definition at line 24 of file StringUtil.cxx.