RCU Namespace Reference

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 ()
void disable_root_version_check ()
void hadd (std::string output_file, std::vector< std::string > input_files, unsigned max_files)
void hadd_core (std::string output_file, std::vector< std::string > input_files, unsigned max_files)
std::string locate (const std::string &locations)
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 ranLoadPackages ()
 whether load_packages.C has been run
bool SetDirectory (TObject *object, TDirectory *directory)
std::string substitute (const std::string &str, const std::string &pattern, const std::string &with)
bool match_expr (const boost::regex &expr, const std::string &str)
std::string glob_to_regexp (const std::string &glob)

Detailed Description

This module defines a variety of assert style macros. 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

This module provides a lot of global definitions, forward declarations and includes that are used by all modules. As such it doesn't fall into the user vs. expert classification.

This module defines macros for reporting errors. 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 class that manages a temporary directory for unit tests. The interface provided in this module is intended for experts only. The module is considered to be in the pre-alpha stage.


Enumeration Type Documentation

Enumerator:
MESSAGE_REGULAR 

description: print a regular message

MESSAGE_WARNING 

description: print a warning

MESSAGE_ERROR 

description: print an error

MESSAGE_EXCEPTION 

description: send out an exception

MESSAGE_ABORT 

description: print and abort

MESSAGE_UNSPECIFIED 

description: unspecified message type


Function Documentation

void RCU::check_root_version (  ) 

effects: check whether we are using a consistent root version guarantee: strong failures: version missmatch

void RCU::disable_root_version_check (  ) 

effects: disable the root version check guarantee: no-fail

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

void RCU::hadd ( std::string  output_file,
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

void RCU::hadd_core ( std::string  output_file,
std::vector< std::string >  input_files,
unsigned  max_files 
)

effects: perform the core hadd functionality guarantee: basic failures: out of memory III failures: i/o errors

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.

bool RCU::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

bool RCU::ranLoadPackages (  ) 

whether load_packages.C has been run

This is mostly meant for the EventLoop PROOF driver, which need to know whether to run this again or not.

Guarantee
no-fail this is the method that should be called to check this, as the exact mechanism for checking this may change
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.

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()

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1