Belle II Software development
|
Modules | |
framework data objects | |
framework modules | |
Namespaces | |
namespace | Belle2::PyObjConvUtils |
Python object converter utilities namespace. | |
namespace | Belle2::_RelationsInterfaceImpl |
hide some implementation details. | |
namespace | Belle2::_StoreArrayImpl |
hide some implementation details. | |
namespace | Belle2::RootIOUtilities |
Some constants and helpers common to the RootInput and RootOutput modules. | |
namespace | Belle2::TangoPalette |
Implements a colour palette, see http://sobac.com/sobac/tangocolors.htm. | |
namespace | Belle2::HTML |
return information on objects in a nice format. | |
namespace | Belle2::IOIntercept |
Encapsulate all classes needed to intercept stdout and stderr. | |
namespace | Belle2::Stream |
Define (de)serialization methods for TObject. | |
namespace | Belle2::TestHelpers |
Some utilities to help with writing unit tests. | |
namespace | Belle2::Utils |
General utility functions. | |
Classes | |
class | CreateConsistencyInfoModule |
If you want to merge two events with the 'MergeDataStoreModule', it might be necessary to make sure that this combination of events make sense. More... | |
class | DataFlowVisualization |
class to visualize data flow between modules. More... | |
class | Environment |
This class stores all environment information required to run the framework, such as module or data filepaths, number of processes to be used in parallel processing etc. More... | |
class | EventProcessor |
provides the core event processing loop. More... | |
class | FileCatalog |
This class provides an interface to the file (metadata) catalog. More... | |
class | HistoModule |
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions to be managed by HistoManager. More... | |
class | InputController |
A static class to control supported input modules. More... | |
class | MemoryPool< T, chunkSize > |
Class to provide a constant access time memory pool for one kind of objects. More... | |
class | MergeDataStoreModule |
Internal module used by Path.add_independent_merge_path(). More... | |
class | MetadataService |
This class provides a service for writing metadata about the basf2 execution and about output files to a json file. More... | |
class | Module |
Base class for Modules. More... | |
class | ModuleProxyBase |
The base module proxy class is used to create new instances of a module. More... | |
class | ModuleCondition |
Wraps a condition set on a Module instance. More... | |
class | ModuleManager |
The ModuleManager Class. More... | |
class | ModuleParam< T > |
A single parameter of the module. More... | |
class | ModuleParamBase |
Base class for module parameter. More... | |
class | ModuleParamInfoPython |
Class to store basic information about a parameter. More... | |
class | ModuleParamList |
The Module parameter list class. More... | |
class | ModuleStatistics |
Keep track of time and memory consumption during processing. More... | |
class | MRUCache< KEY, VALUE > |
Class implementing a generic Most Recently Used cache. More... | |
class | Path |
Implements a path consisting of Module and/or Path objects. More... | |
class | PathElement |
Base for classes that can be elements of a Path. More... | |
class | PathIterator |
Iterator over a Path (returning Module pointers). More... | |
class | ProcessStatistics |
Class to collect call statistics for all modules. More... | |
class | PyModule |
Python wrapper for Belle2::Module. More... | |
class | RandomGenerator |
Fast Random number Generator using on xorshift1024* [arXiv:1402.6246]. More... | |
class | RandomNumbers |
The class for handling the random number generation. More... | |
class | SteerRootInputModule |
Internal module used by Path.add_independent_merge_path(). More... | |
class | SubEventModule |
Framework-internal module that implements the functionality of Path::forEach() as well as Path::doWhile(). More... | |
class | SwitchDataStoreModule |
Internal module used by Path.add_independent_path(). More... | |
class | Database |
Singleton base class for the low-level interface to the database. More... | |
class | DBAccessorBase |
Base class for DBObjPtr and DBArray for easier common treatment. More... | |
class | DBArray< T > |
Class for accessing arrays of objects in the database. More... | |
class | OptionalDBArray< T > |
Optional DBArray: This class behaves the same as the DBArray except that it will not raise errors when an object could not be found in the database. More... | |
class | DBImportArray< T > |
Class for importing array of objects to the database. More... | |
class | DBImportBase |
Base class for importing objects to the database. More... | |
class | DBImportObjPtr< T > |
Class for importing a single object to the database. More... | |
class | DBObjPtr< T > |
Class for accessing objects in the database. More... | |
class | OptionalDBObjPtr< T > |
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors when an object could not be found in the database. More... | |
class | DBPointer< T, KEY, METHOD, NAME > |
Class for pointing to an element in an array stored in the database. More... | |
class | DBStore |
Singleton class to cache database objects. More... | |
class | DBStoreEntry |
Class to hold one entry from the ConditionsDB in the DBStore. More... | |
class | EventDependency |
Class for handling changing conditions as a function of event number. More... | |
class | IntervalOfValidity |
A class that describes the interval of experiments/runs for which an object in the database is valid. More... | |
class | IntraRunDependency |
Base class for handling changing conditions during a run. More... | |
class | PayloadFile |
A wrapper class for payload files used by the Database and DBStore classes. More... | |
class | DBObjPtr< PayloadFile > |
Specialization of DBObjPtr in case of PayloadFiles. More... | |
class | RelationVector< T > |
Class for type safe access to objects that are referred to in relations. More... | |
class | DataStore |
In the store you can park objects that have to be accessed by various modules. More... | |
class | DependencyMap |
Collect information about the dependencies between modules. More... | |
class | StoreArray< T > |
Accessor to arrays stored in the data store. More... | |
class | RelationArray |
Low-level class to create/modify relations between StoreArrays. More... | |
struct | RelationEntry |
Struct for relations. More... | |
class | RelationIndex< FROM, TO > |
Provides access to fast ( O(log n) ) bi-directional lookups on a specified relation. More... | |
class | RelationIndexBase |
Baseclass for all RelationIndexContainers. More... | |
class | RelationIndexContainer< FROM, TO > |
Class to store a bidirectional index between two StoreArrays. More... | |
class | RelationIndexManager |
Manager to keep a cache of existing RelationIndexContainers. More... | |
class | RelationsInterface< BASE > |
Defines interface for accessing relations of objects in StoreArray. More... | |
class | RelationVectorBase |
base class for RelationVector<T> More... | |
class | SelectSubsetBase |
Type-independent implementation details of SelectSubset. More... | |
class | SelectSubset< StoredClass > |
Class to create a subset of a given StoreArray together with the relations with other StoreArrays. More... | |
class | StoreAccessorBase |
Base class for StoreObjPtr and StoreArray for easier common treatment. More... | |
struct | StoreEntry |
Wraps a stored array/object, stored under unique (name, durability) key. More... | |
class | StoreObjPtr< T > |
Type-safe access to single objects in the data store. More... | |
class | BeamParameters |
This class contains the nominal beam parameters and the parameters used for smearing of the primary vertex and the beam energy and momentum. More... | |
class | BunchStructure |
Class to store the fill pattern of colliding bunches. More... | |
class | dEdxPDFs |
Base class for holding the dE/dx PDFs. More... | |
class | HardwareClockSettings |
Database object containing the nominal accelerator RF value and the prescales to derive the clock frequencies of the sub-detectors. More... | |
class | MagneticField |
Magnetic field map. More... | |
class | MagneticFieldComponent |
Abstract base class for BField components. More... | |
class | MagneticFieldComponentConstant |
Describe one component of the Geometry. More... | |
class | RunInfo |
Database object for Run Information. More... | |
class | Const |
This class provides a set of constants for the framework. More... | |
class | Gearbox |
Singleton class responsible for loading detector parameters from an XML file. More... | |
struct | InputHandlerFactory< T > |
Helper class to easily register new input handlers. More... | |
class | GearDir |
GearDir is the basic class used for accessing the parameter store. More... | |
class | Unit |
The Unit class. More... | |
class | B2Vector3< DataType > |
A fast and root compatible alternative to TVector3. More... | |
class | BFieldManager |
Bfield manager to obtain the magnetic field at any point. More... | |
class | LogConfig |
The LogConfig class. More... | |
class | LogConnectionBase |
Abstract base class for the different types of log connections. More... | |
class | LogConnectionConsole |
Implements a log connection to an IO Stream. More... | |
class | LogConnectionFilter |
Implements a log connection that filters repeated messages. More... | |
class | LogConnectionJSON |
Implements a log connection to stdout but with messages formatted as json objects to allow easy parsing by other tools, say jupyter notebooks. More... | |
class | LogConnectionTxtFile |
Implements a log connection to a text file. More... | |
class | LogConnectionUDP |
Log Connection to send the log message as JSON to a UDP server. More... | |
class | LogMessage |
The LogMessage class. More... | |
class | LogMethod |
The LogMethod class. More... | |
class | LogSystem |
Class for logging debug, info and error messages. More... | |
class | EvtGenDatabasePDG |
Replacement for TDatabasePDG that is filled from EvtGen's evt.pdl. More... | |
class | EvtGenParticlePDG |
Helper class for setting additional TParticlePDG members and storing the ones it doesn't have yet. More... | |
class | AsyncWrapper |
Wraps a given Module to execute it asynchronously. More... | |
class | DataStoreStreamer |
Stream/restore DataStore objects to/from EvtMessage. More... | |
struct | EvtHeader |
Header structure of streamed object list. More... | |
class | EvtMessage |
Class to manage streamed object. More... | |
class | GlobalProcHandler |
A class to manage processes for parallel processing. More... | |
class | MapMergeable< T > |
Wrap an STL map to make it mergeable. More... | |
class | Mergeable |
Abstract base class for objects that can be merged. More... | |
class | CharBuffer |
dynamic character buffer that knows its size. More... | |
class | InMessage |
Reusable Message class derived from TMessage (for reading only) More... | |
class | MsgHandler |
A class to encode/decode an EvtMessage. More... | |
class | PathUtils |
Helper utils for path arithmetics needed in the pEventProcessor. More... | |
class | pEventProcessor |
This class provides the core event processing loop for parallel processing. More... | |
class | ProcessMonitor |
Class to monitor all started framework processes (input, workers, output), kill them if requested and handle the signals from the OS. More... | |
class | ProcHandler |
A class to manage processes for parallel processing. More... | |
class | RbTupleManager |
Class to manage histograms defined in registered modules. More... | |
struct | RingBufInfo |
Internal metadata structure for RingBuffer. More... | |
class | RingBuffer |
Class to manage a Ring Buffer placed in an IPC shared memory. More... | |
class | RootMergeable< T > |
Wrap a root histogram or TNtuple to make it mergeable. More... | |
class | RxModule |
Module to decode data store contents from RingBuffer. More... | |
class | SemaphoreLocker |
Handles creation, locking and unlocking of System V semaphores. More... | |
class | SeqFile |
A class to manage I/O for a chain of blocked files. More... | |
class | SetMergeable< T > |
Wrap an STL set to make it mergeable. More... | |
class | TxModule |
Module for encoding data store contents into a RingBuffer. More... | |
class | ZMQEventProcessor |
This class provides the core event processing loop for parallel processing with ZMQ. More... | |
class | ZMQConfirmedInput |
Input part of a confirmed connection. More... | |
class | ZMQConfirmedOutput |
Output part of a confirmed connection. More... | |
class | ZMQConnection |
Base class for every connection with virtual functions to be implemented: More... | |
class | ZMQConnectionOverSocket |
Specialized connection over a ZMQ socket. More... | |
class | ZMQLoadBalancedInput |
Input part of a load-balanced connection. More... | |
class | ZMQLoadBalancedOutput |
Output part of a load-balanced connection. More... | |
class | ZMQNullConnection |
Connection doing just nothing: without the capability to pull, send or receive. Useful for template interfaces. More... | |
class | ZMQRawInput |
Input connection allowing to speak with non-zmq sockets via a ZMQ_STREAM socket. More... | |
class | ZMQRawOutput |
Output connection to speak to non-zmq sockets via a ZMQ_STREAM socket. More... | |
class | ZMQSimpleConnection |
Connection type to be used for answering simple requests, e.g. More... | |
class | ZMQIdMessage |
A message with the socket ID. Needed in input<->worker communication. More... | |
class | ZMQMessageFactory |
Helper class for creating new ID/No-ID messages. More... | |
class | ZMQMessageHelper |
Internal helper for creating ZMQ messages (should not be used otherwise). More... | |
class | ZMQModuleMessage< AMessageFrameNumber > |
A general message with as many parts as given as template argument. More... | |
class | ZMQNoIdMessage |
A message without an associated socket ID. Is used in most cases. More... | |
class | ProcessedEventBackup |
Storage item for the event backup storing the event message, the time stamp and the event meta data. More... | |
class | ProcessedEventsBackupList |
List-like structure for storing and retaining event backups. More... | |
class | ZMQRxOutputModule |
Module connecting the worker path with the output path on the output side. More... | |
class | ZMQRxWorkerModule |
Module connecting the input path with the worker path on the worker side. More... | |
class | ZMQTxInputModule |
Module connecting the input path with the worker path on the input side. More... | |
class | ZMQTxWorkerModule |
Module connecting the worker path with the output path on the worker side. More... | |
class | ZMQClient |
A helper class for communicating over ZMQ. Includes a multicast and (if needed) also a data socket. More... | |
class | EventMetaDataSerialization |
Helper class for (de)serializing the event meta data used for the event backup transferral. More... | |
class | StreamHelper |
Helper class for data store serialization. More... | |
class | ZMQAddressUtils |
Summary of some address helpers. More... | |
class | ZMQLogger |
Base class for the ZMQ connection to help monitor and log certain values. More... | |
class | ZMQParent |
A helper class for creating ZMQ sockets keeping track of the ZMQ context and terminating it if needed. More... | |
class | Framework |
This class combines all subsystems of the framework, and exports the main interface to Python. More... | |
class | LogPythonInterface |
Thin wrapper to expose a usable interface to the logging framework in python. More... | |
class | ProcessStatisticsPython |
Python interface for ProcessStatistics. More... | |
class | PyDBArray |
Class to access a DB Array from Python. More... | |
class | PyDBObj |
Class to access a DBObjPtr from Python. More... | |
class | PyStoreArray |
A (simplified) python wrapper for StoreArray. More... | |
class | PyStoreObj |
a (simplified) python wrapper for StoreObjPtr. More... | |
class | AbstractBooleanNode< AVariableManager > |
A parsed cut-string naturally has a tree shape which incorporates the infomation of operator precedence and evaluation order of the statements. More... | |
class | AbstractExpressionNode< AVariableManager > |
AbstractExpressionNode Superclass for all nodes which host expressions. More... | |
class | BaseAngle |
Class to compare if two angles are compatible withing a given error range. More... | |
class | ThetaAngle |
class | PhiAngle |
class | ObjArrayIterator< ArrayType, ValueType > |
Optimizes class to iterate over TObjArray and classes inheriting from it. More... | |
class | ArrayIterator< ArrayType, ValueType > |
Generic iterator class for arrays, allowing use of STL algorithms, range-based for etc. More... | |
class | CalcMeanCov< N, RealType > |
Class to calculate mean and and covariance between a number of parameters on running data without storing the actual values, also for weighted entries. More... | |
class | ConditionalGaussGenerator |
Class implementing n-dimensional random number generator from Gaussian distribution where the first component of the vector is generated first (using some external source) and the remaining components are generated based on the value of the first component. More... | |
struct | Visitor< operation > |
This is a class template which takes a template class operation as template argument. More... | |
struct | EqualVisitor |
Seperate Visitor struct for equal_to comparison of variant<double, int bool>. More... | |
class | UnaryBooleanNode< AVariableManager > |
Nodeclass with a single AbstractBooleanNode as child. More... | |
class | BinaryBooleanNode< AVariableManager > |
Nodeclass with two AbstractBooleanNode as children and a Boolean Operator (AND, OR) Check() method evaluates the child nodes and returns the result of the boolean operation. More... | |
class | UnaryRelationalNode< AVariableManager > |
Nodeclass with a single AbstractExpressioNode as child. More... | |
class | BinaryRelationalNode< AVariableManager > |
BooleanNode which has two AbstractExpressionNodes nodes and a ComparisonOperator. More... | |
class | TernaryRelationalNode< AVariableManager > |
BooleanNode which has three AbstractExpressionNodes nodes and two ComparisonOperator. More... | |
class | UnaryExpressionNode< AVariableManager > |
UnaryExpressionNode Node class with a single expression node as child. More... | |
class | BinaryExpressionNode< AVariableManager > |
BinaryExpressionNode Node which connects two expression nodes with an arithemtic operation. More... | |
class | DataNode< AVariableManager, T > |
Template class for storing the Constants (int, double, bool) of the Cutstring. More... | |
class | IdentifierNode< AVariableManager > |
Class which stores the name of a variable. More... | |
class | FunctionNode< AVariableManager > |
FunctionNode Node class for handling MetaVariables in cuts. More... | |
class | EnvironmentVariables |
Utility functions related to environment variables. More... | |
class | FileSystem |
Utility functions related to filename validation and filesystem access. More... | |
class | FormulaParserBase |
Base class with the non-templated part of the formula parser. More... | |
class | FormulaParser< VariableConstructor > |
FormulaParser to parse a text formula like "a + b * c ^ d" where the separate parts can be either variables (with and without arguments) or numbers. More... | |
struct | StringFormulaConstructor |
Example struct to be used with the FormulaParser to create a string representation of the formula, mainly for testing and debugging. More... | |
class | GeneralCut< AVariableManager > |
This class implements a common way to implement cut/selection functionality for arbitrary objects. More... | |
class | KeyValuePrinter |
create human-readable or JSON output for key value pairs. More... | |
class | LabToCms |
Class implementing general Lorentz Transformation between LAB and CMS system. More... | |
class | MakeROOTCompatible |
Helper class for converting strings into a ROOT-friendly format (e.g.: removing special characters in branch names, etc.) More... | |
class | MultivariateNormalGenerator |
Class to generate normal distributed, correlated random numbers given the mean values and the covariance matrix of all dimensions. More... | |
class | NodeFactory |
Wrapper class for static node compile functions. More... | |
class | BoostPythonModuleProxy |
Proxy class to register python modules (the things you can 'import'). More... | |
class | RootFileCreationManager |
This single instance class takes track of all open ROOT files open in "create" mode, usually meant for all the ntuple output modules. More... | |
class | ScopeGuard |
Simple ScopeGuard to execute a function at the end of the object lifetime. More... | |
struct | TRandomWrapper |
Wrap TRandom to be useable as a uniform random number generator with STL algorithms like std::shuffle. More... | |
Macros | |
#define | BELLE2_DEFINE_EXCEPTION(ClassName, Message) |
Macro that defines an exception with the given message template. | |
#define | _PACKAGE_ "" |
make sure REG_MODULE works outside the normal build system | |
#define | REG_MODULE(moduleName) |
Register the given module (without 'Module' suffix) with the framework. | |
#define | B2_GEARBOX_REGISTER_INPUTHANDLER(classname, prefix) InputHandlerFactory<classname> Gearbox_InputHandlerFactory_##classname(prefix) |
Helper macro to easily register new input handlers. | |
#define | DEFINE_UNIT_NAME(var, value, name) const double Unit::var = Unit::registerConversion(name,value) |
Define a new Unit given a name for the conversion table. | |
#define | DEFINE_UNIT(var, value) DEFINE_UNIT_NAME(var,value,#var) |
Define a new Unit and take the variable name as name for the conversion table. | |
#define | REGISTER_PYTHON_MODULE(moduleName) Belle2::BoostPythonModuleProxy boostPythonModuleProxy##moduleName(#moduleName, PyInit_##moduleName); |
Register a python module to make available when loading the library. | |
#define | REGISTER_PYTHON_MODULE_AUTOIMPORT(moduleName) Belle2::BoostPythonModuleProxy boostPythonModuleProxy##moduleName(#moduleName, PyInit_##moduleName, true); |
Identical to REGISTER_PYTHON_MODULE(), but will also import the module into the global namespace after loading it. | |
#define | B2INFO_MEASURE_TIME(txt, ...) |
Print an INFO message txt followed by the time it took to execute the statment given as second argument. | |
#define | branch_unlikely(x) (x) |
A macro to tell the compiler that the argument x will be very likely be false. | |
#define | branch_likely(x) (x) |
Usage: | |
Typedefs | |
typedef std::shared_ptr< Module > | ModulePtr |
Defines a pointer to a module object as a boost shared pointer. | |
typedef std::list< ModulePtr > | ModulePtrList |
Defines a std::list of shared module pointers. | |
using | ModuleParamPtr = std::shared_ptr< ModuleParamBase > |
Defines a pointer to a module parameter as a boost shared pointer. */. | |
typedef std::shared_ptr< Path > | PathPtr |
Defines a pointer to a path object as a boost shared pointer. | |
typedef RelationsInterface< TObject > | RelationsObject |
Provides interface for getting/adding relations to objects in StoreArrays. | |
typedef std::pair< std::string, DataStore::EDurability > | AccessorParams |
Pair of parameters needed to find an object in the DataStore. | |
typedef B2Vector3< double > | B2Vector3D |
typedef for common usage with double | |
typedef B2Vector3< float > | B2Vector3F |
typedef for common usage with float | |
Enumerations | |
enum | ERecordType { MSG_EVENT , MSG_BEGIN_RUN , MSG_END_RUN , MSG_TERMINATE , MSG_NORECORD , MSG_STREAMERINFO } |
What type of message is this? More... | |
enum class | ProcType { c_Input = 'i' , c_Worker = 'w' , c_Output = 'o' , c_Proxy = 'p' , c_Monitor = 'm' , c_Init = '0' , c_Stopped = 's' } |
Type of the process used for storing and mapping the child processes in the process handler. More... | |
enum class | EMessageTypes { c_confirmMessage = 'c' , c_helloMessage = 'h' , c_deleteWorkerMessage = 'd' , c_lastEventMessage = 'l' , c_readyMessage = 'r' , c_terminateMessage = 'x' , c_rawDataMessage = 'u' , c_compressedDataMessage = 'v' , c_eventMessage = 'w' , c_goodbyeMessage = 'g' , c_statisticMessage = 's' , c_killWorkerMessage = 'k' , c_monitoringMessage = 'm' , c_newRunMessage = 'n' } |
Type the messages can have. More... | |
enum | ZMQAddressType { c_input , c_output , c_pub , c_sub , c_control } |
The type of a ZMQ socket address (which socket to use) More... | |
enum class | NodeType : int { UnaryBooleanNode , BinaryBooleanNode , UnaryRelationalNode , BinaryRelationalNode , TernaryRelationalNode , UnaryExpressionNode , BinaryExpressionNode , FunctionNode , IdentifierNode , DoubleNode , IntegerNode , BooleanNode } |
Enum of possible Nodes in parsing tree. More... | |
enum class | BooleanOperator : int { AND , OR } |
Enum for decoding the boolean operator type. More... | |
enum class | ComparisonOperator : int { EQUALEQUAL , GREATEREQUAL , LESSEQUAL , GREATER , LESS , NOTEQUAL } |
Enum for decoding the comparison operator type. More... | |
enum class | ArithmeticOperation : int { PLUS , MINUS , PRODUCT , DIVISION , POWER } |
Enum for decoding the comparison operator type. More... | |
Functions | |
template<class T > | |
boost::python::object | createROOTObjectPyCopy (const T &instance) |
Create a python wrapped copy from a class instance which has a ROOT dictionary. | |
std::istream & | operator>> (std::istream &input, IntervalOfValidity &iov) |
std::ostream & | operator<< (std::ostream &output, const IntervalOfValidity &iov) |
ADD_BITMASK_OPERATORS (DataStore::EStoreFlags) | |
Add bitmask operators to DataStore::EStoreFlags. | |
DEFINE_UNIT (cm, 1.) | |
Standard units with the value = 1. | |
DEFINE_UNIT (ns, 1.) | |
Standard of [time]. | |
DEFINE_UNIT (GHz, 1.) | |
Standard of [frequency]. | |
DEFINE_UNIT (rad, 1.) | |
Standard of [angle]. | |
DEFINE_UNIT (GeV, 1.) | |
Standard of [energy, momentum, mass]. | |
DEFINE_UNIT (K, 1.) | |
Standard of [temperature]. | |
DEFINE_UNIT (e, 1.) | |
Standard of [electric charge]. | |
DEFINE_UNIT_NAME (g_cm3, 1., "g/cm3") | |
Practical units with the value = 1. | |
DEFINE_UNIT (km, Unit::cm *1e5) | |
Derived units. | |
DEFINE_UNIT (m, Unit::cm *1e2) | |
[meters] | |
DEFINE_UNIT (mm, Unit::m *1e-3) | |
[millimeters] | |
DEFINE_UNIT (um, Unit::m *1e-6) | |
[micrometers] | |
DEFINE_UNIT (nm, Unit::m *1e-9) | |
[nanometers] | |
DEFINE_UNIT (pm, Unit::m *1e-12) | |
[picometers] | |
DEFINE_UNIT (fm, Unit::m *1e-15) | |
[femtometers] | |
DEFINE_UNIT (m2, Unit::m *Unit::m) | |
[square meters] | |
DEFINE_UNIT (cm2, Unit::cm *Unit::cm) | |
[square centimeters] | |
DEFINE_UNIT (mm2, Unit::mm *Unit::mm) | |
[square millimeters] | |
DEFINE_UNIT (b, Unit::m2 *1e-28) | |
[barn] | |
DEFINE_UNIT (mb, Unit::b *1e-3) | |
[millibarn] | |
DEFINE_UNIT (ub, Unit::b *1e-6) | |
[microbarn] | |
DEFINE_UNIT (nb, Unit::b *1e-9) | |
[nanobarn] | |
DEFINE_UNIT (pb, Unit::b *1e-12) | |
[picobarn] | |
DEFINE_UNIT (fb, Unit::b *1e-15) | |
[femtobarn] | |
DEFINE_UNIT (ab, Unit::b *1e-18) | |
[attobarn] | |
DEFINE_UNIT (m3, Unit::m *Unit::m *Unit::m) | |
[cubic meters] | |
DEFINE_UNIT (cm3, Unit::cm *Unit::cm *Unit::cm) | |
[cubic centimeters] | |
DEFINE_UNIT (mm3, Unit::mm *Unit::mm *Unit::mm) | |
[cubic millimeters] | |
DEFINE_UNIT (s, Unit::ns *1e9) | |
[second] | |
DEFINE_UNIT (ms, Unit::s *1e-3) | |
[millisecond] | |
DEFINE_UNIT (us, Unit::s *1e-6) | |
[microsecond] | |
DEFINE_UNIT (ps, Unit::s *1e-12) | |
[picosecond] | |
DEFINE_UNIT (fs, Unit::s *1e-15) | |
[femtosecond] | |
DEFINE_UNIT (Hz, Unit::GHz *1e-9) | |
[Hertz] | |
DEFINE_UNIT (kHz, Unit::GHz *1e-6) | |
[Kilohertz] | |
DEFINE_UNIT (MHz, Unit::GHz *1e-3) | |
[Megahertz] | |
DEFINE_UNIT (mHz, Unit::GHz *1e-12) | |
[Millihertz] | |
DEFINE_UNIT (mrad, Unit::rad *1e-3) | |
[millirad] | |
DEFINE_UNIT (deg, TMath::DegToRad()) | |
degree to radians | |
DEFINE_UNIT (eV, Unit::GeV *1e-9) | |
[electronvolt] | |
DEFINE_UNIT (keV, Unit::eV *1e3) | |
[kiloelectronvolt] | |
DEFINE_UNIT (MeV, Unit::eV *1e6) | |
[megaelectronvolt] | |
DEFINE_UNIT (TeV, Unit::eV *1e12) | |
[teraelectronvolt] | |
DEFINE_UNIT (J, 1.0/TMath::Qe() *Unit::eV) | |
[joule] | |
DEFINE_UNIT (V, Unit::eV/Unit::e) | |
Standard of [voltage]. | |
DEFINE_UNIT (C, 1.0/TMath::Qe() *Unit::e) | |
[Coulomb] | |
DEFINE_UNIT (fC, Unit::C/1.0e15) | |
[femtoCoulomb] | |
DEFINE_UNIT (T, Unit::V *Unit::s/Unit::m2) | |
[Tesla] | |
DEFINE_UNIT (mT, Unit::T *1e-3) | |
[millitesla] | |
DEFINE_UNIT (Gauss, Unit::T *1e-4) | |
[Gauss] | |
DEFINE_UNIT (kGauss, Unit::Gauss *1e3) | |
[kiloGauss] | |
DEFINE_UNIT_NAME (mg_cm3, Unit::g_cm3 *1e-3, "mg/cm3") | |
[mg/cm^3] | |
DEFINE_UNIT_NAME (kg_cm3, Unit::g_cm3 *1e3, "kg/cm3") | |
[kg/cm^3] | |
DEFINE_UNIT_NAME (g_mm3, Unit::g_cm3/Unit::mm3, "g/mm3") | |
[g/mm^3] | |
DEFINE_UNIT_NAME (mg_mm3, Unit::mg_cm3/Unit::mm3, "mg/mm3") | |
[mg/mm^3] | |
DEFINE_UNIT_NAME (kg_mm3, Unit::kg_cm3/Unit::mm3, "kg/mm3") | |
[kg/mm^3] | |
template<typename DataType > | |
Bool_t | operator== (const TVector3 &a, const B2Vector3< DataType > &b) |
non-memberfunction Comparison for equality with a TVector3 | |
template<typename DataType > | |
Bool_t | operator!= (const TVector3 &a, const B2Vector3< DataType > &b) |
non-memberfunction Comparison for equality with a TVector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator* (DataType a, const B2Vector3< DataType > &p) |
non-memberfunction Scaling of 3-vectors with a real number | |
template<typename DataType > | |
B2Vector3< DataType > | operator+ (const TVector3 &a, const B2Vector3< DataType > &b) |
non-memberfunction for adding a TVector3 to a B2Vector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator- (const TVector3 &a, const B2Vector3< DataType > &b) |
non-memberfunction for substracting a TVector3 from a B2Vector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator+ (const B2Vector3< DataType > &a, const TVector3 &b) |
non-memberfunction for adding a B2Vector3 to a TVector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator- (const B2Vector3< DataType > &a, const TVector3 &b) |
non-memberfunction for substracting a B2Vector3 from a TVector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator+ (const ROOT::Math::XYZVector &a, const B2Vector3< DataType > &b) |
non-memberfunction for adding a XYZVector to a B2Vector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator- (const ROOT::Math::XYZVector &a, const B2Vector3< DataType > &b) |
non-memberfunction for substracting a XYZVector from a B2Vector3 | |
template<typename DataType > | |
B2Vector3< DataType > | operator+ (const B2Vector3< DataType > &a, const ROOT::Math::XYZVector &b) |
non-memberfunction for adding a B2Vector3 to a XYZVector | |
template<typename DataType > | |
B2Vector3< DataType > | operator- (const B2Vector3< DataType > &a, const ROOT::Math::XYZVector &b) |
non-memberfunction for substracting a B2Vector3 from a XYZVector | |
void | injectBooleanOperatorToStream (std::ostream &stream, const BooleanOperator &boperator) |
Helper functions for AbstractBooleanNode and AbstractExpressionNode print() and decompile() members Shifts the correct characters into the ostream, depending on the BooleanOperator given. | |
void | injectComparisonOperatorToStream (std::ostream &stream, const ComparisonOperator &coperator) |
Helper functions for AbstractBooleanNode and AbstractExpressionNode print() and decompile() members Shifts the correct characters into the ostream, depending on the ComparisonOperator given. | |
void | injectArithmeticOperatorToStream (std::ostream &stream, const ArithmeticOperation &aoperation) |
Helper functions for AbstractBooleanNode and AbstractExpressionNode print() and decompile() members Shifts the correct characters into the ostream, depending on the ComparisonOperator given. | |
template<typename T > | |
T | convertString (const std::string &str) |
Converts a string to type T (one of float, double, long double, int, long int, unsigned long int). | |
unsigned long int | findMatchedParenthesis (std::string str, char open='[', char close=']') |
Returns position of the matched closing parenthesis if the first character in the given string contains an opening parenthesis. | |
std::vector< std::string > | splitOnDelimiterAndConserveParenthesis (std::string str, char delimiter, char open, char close) |
Split into std::vector on delimiter ignoring delimiters between parenthesis. | |
unsigned long int | findIgnoringParenthesis (std::string str, std::string pattern, unsigned int begin=0) |
Returns the position of a pattern in a string ignoring everything that is in parenthesis. | |
bool | almostEqualFloat (const float &a, const float &b) |
Helper function to test if two floats are almost equal. | |
bool | almostEqualDouble (const double &a, const double &b) |
Helper function to test if two doubles are almost equal. | |
std::set< int64_t > | generate_number_sequence (const std::string &str) |
Generate a sequence of numbers defined by a string. | |
template<> | |
float | convertString (const std::string &str) |
Converts a string to float. | |
template<typename T > | |
void | addParam (const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue) |
Adds a new parameter to the module. | |
template<typename T > | |
void | addParam (const std::string &name, T ¶mVariable, const std::string &description) |
Adds a new enforced parameter to the module. | |
template<typename T > | |
ModuleParam< T > & | getParam (const std::string &name) const |
Returns a reference to a parameter. | |
static std::string | TypeInfo () |
Static function to generate a string description for the parameter type. | |
ModuleParam (T ¶mVariable, const std::string &description="", bool force=false) | |
Constructor. | |
virtual | ~ModuleParam () |
Destructor. | |
void | setValue (const T &value) |
Sets the value of a parameter. | |
void | setDefaultValue (const T &defaultValue) |
Sets the default value of a parameter. | |
T & | getValue () |
Returns the value of the parameter. | |
T & | getDefaultValue () |
Returns the default value of the parameter. | |
virtual void | setValueFromPythonObject (const boost::python::object &pyObject) final |
Implements a method for setting boost::python objects. | |
virtual void | setValueToPythonObject (boost::python::object &pyObject, bool defaultValues=false) const final |
Returns a python object containing the value or the default value of the given parameter. | |
virtual void | setValueFromParam (const ModuleParamBase ¶m) final |
Set value from other ModuleParam of same type. | |
void | resetValue () |
Resets the parameter value by assigning the default value to the parameter value. | |
template<typename T > | |
void | addParameter (const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue) |
Adds a new parameter to the module list. | |
template<typename T > | |
void | addParameter (const std::string &name, T ¶mVariable, const std::string &description) |
Adds a new enforced parameter to the module list. | |
template<typename T > | |
void | setParameter (const std::string &name, const T &value) |
Sets the value of a parameter given by its name. | |
template<typename T > | |
ModuleParam< T > & | getParameter (const std::string &name) const |
Returns a reference to a parameter. | |
template<typename PythonObject > | |
void | setParamPython (const std::string &name, const PythonObject &pyObj) |
Implements a method for setting boost::python objects. | |
template<typename PythonObject > | |
void | getParamValuesPython (const std::string &name, PythonObject &pyOutput, bool defaultValues) const |
Returns a python object containing the value or default value of the given parameter. | |
uint64_t | random64 () |
Generate one 64bit unsigned integer between 0 and UINT64_MAX (both inclusive). | |
void | RndmArray (Int_t n, Float_t *array) |
Fill an array of floats with random values in (0,1), both limits excluded. | |
void | RndmArray (Int_t n, Double_t *array) |
Fill an array of doubles with random values in (0,1), both limits excluded. | |
void | RndmArray (Int_t n, ULong64_t *array) |
Fill an array of unsigned 64bit integers with random values in [0, UINT64_MAX], both limits included. | |
void | RndmArray (Int_t n, UInt_t *array) |
Fill an array of unsigned integers with random values in [0, UINT32_MAX], both limits included. | |
double | random01 () |
Generate a random double value between 0 and 1, both limits excluded. | |
static Database & | Instance () |
Instance of a singleton Database. | |
~Database () | |
Hidden destructor, as it is a singleton. | |
static void | reset (bool keepConfig=false) |
Reset the database instance. | |
ScopeGuard | createScopedUpdateSession () |
Make sure we have efficient http pipelinging during initialize/beginRun but don't keep session alive for full processing time. | |
std::pair< TObject *, IntervalOfValidity > | getData (const EventMetaData &event, const std::string &name) |
Request an object from the database. | |
bool | getData (const EventMetaData &event, std::vector< DBQuery > &query) |
Request multiple objects from the database. | |
bool | storeData (std::list< DBImportQuery > &query) |
Store multiple objects in the database. | |
bool | storeData (const std::string &name, TObject *object, const IntervalOfValidity &iov) |
Store an object in the database. | |
std::string | getGlobalTags () |
Return the global tags used by the database. | |
void | nextMetadataProvider () |
Enable the next metadataprovider in the list. | |
void | initialize (const EDatabaseState target=c_Ready) |
Initialize the database connection settings on first use. | |
static void | exposePythonAPI () |
Exposes setGlobalTag function of the Database class to Python. | |
~DBStore () | |
Destructor. | |
static DBStore & | Instance () |
Instance of a singleton DBStore. | |
DBStoreEntry * | getEntry (DBStoreEntry::EPayloadType payloadType, const std::string &name, const TClass *objClass, bool array, bool required=true) |
Returns the entry with the requested name in the DBStore. | |
void | update () |
Updates all objects that are outside their interval of validity. | |
void | update (const EventMetaData &event) |
Updates all objects that are outside their interval of validity. | |
void | performUpdate (const EventMetaData &event) |
The main code that does an update, factored out so it can be used by both update and update(event). | |
void | updateEvent () |
Updates all intra-run dependent objects. | |
void | updateEvent (const unsigned int eventNumber) |
Updates all intra-run dependent objects. | |
void | performUpdateEvent (const EventMetaData &event) |
The main code that does an updateEvent. | |
void | reset (bool keepEntries=false) |
Invalidate all payloads. | |
std::set< std::string > | getAllEntryNames () |
Return the names of all the payloads stored in the database at the time of this function is called. | |
void | addConstantOverride (const std::string &name, TObject *obj, bool oneRun=false) |
Add constant override payload. | |
static DBStoreEntry | fromObject (const std::string &name, const TObject *obj, bool isRequired) |
Construct a new DBStoreEntry with a requested name and an object directly. | |
~DBStoreEntry () | |
Clean up memory. | |
void | updateObject (const EventMetaData &event) |
update the payload object according to the new event information. | |
void | resetPayload () |
reset the payload to nothing | |
void | updatePayload (unsigned int revision, const IntervalOfValidity &iov, const std::string &filename, const std::string &checksum, const std::string &globaltag, const EventMetaData &event) |
Update the payload information for this entry and if appropriate open the new file and extract the object as needed. | |
void | loadPayload (const EventMetaData &event) |
Actual load the payload from file after all info is set. | |
void | overrideObject (TObject *obj, const IntervalOfValidity &iov) |
Set an override object in case we want to use a different object then actually provided by the database. | |
void | notifyAccessors (bool onDestruction=false) |
Notify all the registered accessors. | |
bool | checkType (EPayloadType type, const TClass *objClass, bool array, bool inverse=false) const |
Check if a given TClass is compatible with the type of this entry. | |
bool | checkType (const TObject *object) const |
Check if a given TObject instance is compatible with the type of this entry. | |
template<class FunctionFrom , class FunctionTo > | |
void | consolidate (const FunctionFrom &replaceFrom=FunctionFrom(), const FunctionTo &replaceTo=FunctionTo(), EConsolidationAction action=c_doNothing) |
Consolidate RelationElements. | |
void | rebuild (bool force=false) |
Rebuild the index. | |
std::map< int, int > | copySetWithRelations (std::function< bool(const StoredClass *)> f) |
Selects the elements, fill the subset and copies all the relations in which the set is involved. | |
void | copyRelationsToSelf () |
Copy any set -> set relations between selected objects. | |
void | select (const std::function< bool(const StoredClass *)> &f) |
This method is the actual worker. | |
ROOT::Math::XYZVector | getField (const ROOT::Math::XYZVector &pos) const |
Calculate the magnetic field at a given position. | |
void | setBucket (unsigned i) |
Sets the fill status of RF bucket to true. | |
bool | getBucket (int i) const |
Returns the fill status of RF bucket. | |
unsigned | getNumOfFilledBuckets () const |
Returns the number of filled buckets. | |
unsigned | generateBucketNumber () const |
Generates RF bucket number according to the fill pattern. | |
Gearbox () | |
Singleton: private constructor. | |
~Gearbox () | |
Free structures on destruction. | |
static Gearbox & | getInstance () |
Return reference to the Gearbox instance. | |
gearbox::InputContext * | openXmlUri (const std::string &uri) const |
Function to be called when libxml requests a new input uri to be opened. | |
void | setBackends (const std::vector< std::string > &backends) |
Select the backends to use to find resources. | |
void | clearBackends () |
Clear list of backends. | |
void | open (const std::string &name="Belle2.xml", size_t cacheSize=c_DefaultCacheSize) |
Open connection to backend and parse tree. | |
void | close () |
Free internal structures of previously parsed tree and clear cache. | |
void | overridePathValue (const PathOverride &poverride) |
Change the value of a given path expression. | |
PathValue | getPathValue (const std::string &path) const |
Return the (cached) value of a given path. | |
virtual const TObject * | getTObject (const std::string &path) const noexcept(false) override |
Get the parameter path as a TObject. | |
GearDir | getDetectorComponent (const std::string &component) |
Return GearDir representing a given DetectorComponent. | |
static double | convertValue (double value, const std::string &unitString) |
Converts a floating point value to the standard framework unit. | |
static double | convertValueToUnit (double value, const std::string &unitString) |
Converts a floating point value from the standard framework unit to the given unit. | |
static double | registerConversion (const std::string &name, double value) |
registers the name and value of a conversion in s_conversionFactors. | |
B2Vector3< DataType > & | operator= (const B2Vector3< DataType > &b) |
Assignment via B2Vector3. | |
B2Vector3< DataType > & | operator= (const TVector3 &b) |
Assignment via TVector3. | |
B2Vector3< DataType > & | operator= (const ROOT::Math::XYZVector &b) |
Assignment via XYZVector. | |
B2Vector3< DataType > & | operator+= (const B2Vector3< DataType > &b) |
addition | |
B2Vector3< DataType > & | operator-= (const B2Vector3< DataType > &b) |
subtraction | |
B2Vector3< DataType > & | operator*= (DataType a) |
scaling with real numbers | |
void | SetXYZ (const TVector3 &tVec) |
set all coordinates using a reference to TVector3 | |
void | SetXYZ (const TVector3 *tVec) |
set all coordinates using a pointer to TVector3 | |
void | SetXYZ (const ROOT::Math::XYZVector &xyzVec) |
set all coordinates using a reference to XYZVector | |
void | SetXYZ (const ROOT::Math::XYZVector *xyzVec) |
set all coordinates using a pointer to XYZVector | |
void | GetXYZ (TVector3 *tVec) const |
directly copies coordinates to a TVector3 | |
void | GetXYZ (ROOT::Math::XYZVector *xyzVec) const |
directly copies coordinates to a XYZVector | |
TVector3 | GetTVector3 () const |
returns a TVector3 containing the same coordinates | |
ROOT::Math::XYZVector | GetXYZVector () const |
returns a XYZVector containing the same coordinates | |
DataType | at (unsigned i) const |
safe member access (with boundary check!) | |
static std::string | name () |
Returns the name of the B2Vector. | |
ROOT::Math::XYZVector | calculate (const ROOT::Math::XYZVector &pos) const |
Calculate the field value at a given position and return it. | |
static void | getField (const double *pos, double *field) |
return the magnetic field at a given position. | |
const LogConfig & | getCurrentLogConfig (const char *package=nullptr) const |
Returns the current LogConfig object used by the logging system. | |
bool | isLevelEnabled (LogConfig::ELogLevel level, int debugLevel=0, const char *package=nullptr) const |
Returns true if the given log level is allowed by the log system (i.e. | |
LogConnectionJSON (bool complete=false) | |
The constructor. | |
bool | sendMessage (const LogMessage &message) override |
Sends a log message. | |
std::string | __repr__ () const |
Return a string repesentation of this particle to be used when printing the particle in python. | |
template<class AZMQClient > | |
void | sendToSocket (const AZMQClient &socket) |
Publish this event backup directly to the given client. | |
template<class AZMQClient > | |
void | sendWorkerBackupEvents (unsigned int worker, const AZMQClient &socket) |
Send all backups of a given worker directly to the multicast and delete them. | |
template<class AMulticastAnswer , class ASocketAnswer > | |
int | poll (unsigned int timeout, AMulticastAnswer multicastAnswer, ASocketAnswer socketAnswer) const |
Poll both the multicast and the data socket until, either: | |
template<class ASocketAnswer > | |
int | pollSocket (unsigned int timeout, ASocketAnswer socketAnswer) const |
Poll method to only the data socket. | |
template<class AMulticastAnswer > | |
int | pollMulticast (unsigned int timeout, AMulticastAnswer multicastAnswer) const |
Poll method to only the multicast socket. | |
template<class AClass > | |
void | log (const std::string &key, const AClass &value) |
Store a value under a certain key. Different types of values can be stored, namely long, double or string. Mixtures are not allowed for a given key. | |
template<size_t MAX_SIZE = 100> | |
void | average (const std::string &key, double value) |
Instead of storeing the double value directly under the given key, store the average of the last MAX_SIZE values. | |
template<size_t AVERAGE_SIZE = 2000> | |
void | timeit (const std::string &key) |
Measure the rate of calls with the same key every AVERAGE_SIZE calls (and also display the last time AVERAGE_SIZE was reached under <key>_last_measurement) | |
template<int AZMQType> | |
std::unique_ptr< zmq::socket_t > | createSocket (const std::string &socketAddress, bool bind) |
Create a socket of the given type with the given address and bind or not bind it. | |
template<int AZMQType> | |
std::unique_ptr< zmq::socket_t > | createSocket (const std::string &socketAddress) |
Create a socket of the given type while deciding on the bind behaviour via the address. | |
template<class AZMQMessage > | |
static void | send (std::unique_ptr< zmq::socket_t > &socket, AZMQMessage message) |
Send a given message over the given created socket. You need to move in the message for zero-copy. | |
template<class value_type > | |
bool | setMeanCov (const TVectorT< value_type > &mean, const TMatrixTBase< value_type > &cov) |
set mean and covariance matrix from ROOT vector/matrix objects, e.g. | |
template<class value_type > | |
bool | setMeanCov (const ROOT::Math::XYZVector &mean, const TMatrixTBase< value_type > &cov) |
set the mean and covariance for the distribution. | |
static bool | isSet (const std::string &name) |
Check if a value is set in the database. | |
static std::string | get (const std::string &name, const std::string &fallback="") |
Get the value of an environment variable or the given fallback value if the variable is not set. | |
static std::vector< std::string > | getList (const std::string &name, const std::vector< std::string > &fallback={}, const std::string &separators=" \t\n\r") |
Get a list of values from an environment variable or the given fallback list if the variable is not set. | |
static std::vector< std::string > | getOrCreateList (const std::string &name, const std::string &fallback, const std::string &separators=" \t\n\r") |
Get a list of values from an environment variable or the given fallback string if the variable is not set. | |
static std::string | expand (const std::string &text) |
Modify the given string and replace every occurence of $NAME or ${NAME} with the value of the environment variable NAME. | |
static char | operatorToChar (EOperator op) noexcept |
Convert operator code to character. | |
static double | applyOperator (EOperator op, double a, double b) |
Apply operator on two values. | |
static ENumberStatus | checkNumber (ENumberStatus current, char next) |
Check if a string literal with a given number status continues to be a valid number if next is appended to it. | |
static void | assertOperatorUsable (size_t stacksize) |
Make sure we have enough operands to use an operator. | |
void | addOperator (EOperator op) |
Add an operator to the internal state, convert them to reverse polish notation using the shunting yard algorithm and execute them as they become available. | |
void | flushPendingOperators () |
Flush all pending operators at the end of processing. | |
void | flushCurrentVariable () |
Flush the currently parsed variable name and add it to the state either as variable or number. | |
EOperator | checkForOperator (char next) |
Check if the next character is a operator. | |
void | processString (const std::string &formula) |
Process the given formula and store the final state. | |
void | raiseError (const std::runtime_error &e) |
Format the given runtime_error with context information and rethrow a new one. | |
std::shared_ptr< TFile > | getFile (std::string, bool ignoreErrors=false) |
Get a file with a specific name, if is does not exist it will be created. | |
static RootFileCreationManager & | getInstance () |
Interface for the FileManager. | |
Variables | |
std::string | DBPointer_defaultName = "" |
Use default name for array in DBPointer. | |
static constexpr auto | XYZToTVector |
Helper function to convert XYZVector to TVector3. | |
static std::map< std::string, double > | s_conversionFactors |
Map to be able to convert between units using string representations of the unit name. | |
#define _PACKAGE_ "" |
#define B2_GEARBOX_REGISTER_INPUTHANDLER | ( | classname, | |
prefix | |||
) | InputHandlerFactory<classname> Gearbox_InputHandlerFactory_##classname(prefix) |
Helper macro to easily register new input handlers.
It will create a factory function for the InputHandler and register it with the Gearbox instance
classname | Classname to create factory for |
prefix | Prefix to register the handler for, e.g. "file" to register a handler responsible for uris starting with file: |
#define B2INFO_MEASURE_TIME | ( | txt, | |
... | |||
) |
Print an INFO message txt followed by the time it took to execute the statment given as second argument.
Care should be taken not to define variables in this call since they will be scoped and thus unavaiable after the macro
#define BELLE2_DEFINE_EXCEPTION | ( | ClassName, | |
Message | |||
) |
Macro that defines an exception with the given message template.
Use the macro inside your class (header file) and specify a class name for your exception, plus a format string that contains a description of what went wrong:
When throwing, simply create an instance of this class, use operator<< to fill any placeholders (n%) specified, and pass this to the throw keyword:
Exceptions defined using this macro inherit from std::runtime_error, and can be queried using their what() member.
Definition at line 36 of file FrameworkExceptions.h.
#define branch_likely | ( | x | ) | (x) |
#define branch_unlikely | ( | x | ) | (x) |
A macro to tell the compiler that the argument x will be very likely be false.
This could result in optimized code as the compiler can reorder the code to reduce conditional jumps during execution. Due to the high efficiency of todays branch prediction systems the effect is probably small.
#define DEFINE_UNIT | ( | var, | |
value | |||
) | DEFINE_UNIT_NAME(var,value,#var) |
Define a new Unit and take the variable name as name for the conversion table.
Definition at line 35 of file UnitConst.cc.
#define DEFINE_UNIT_NAME | ( | var, | |
value, | |||
name | |||
) | const double Unit::var = Unit::registerConversion(name,value) |
Define a new Unit given a name for the conversion table.
Definition at line 33 of file UnitConst.cc.
#define REG_MODULE | ( | moduleName | ) |
Register the given module (without 'Module' suffix) with the framework.
#define REGISTER_PYTHON_MODULE | ( | moduleName | ) | Belle2::BoostPythonModuleProxy boostPythonModuleProxy##moduleName(#moduleName, PyInit_##moduleName); |
Register a python module to make available when loading the library.
Use it by defining your module via BOOST_PYTHON_MODULE(name), then call REGISTER_PYTHON_MODULE(name) with the same name.
After the library has been loaded, you can use 'import name' to import the defined objects.
Definition at line 36 of file RegisterPythonModule.h.
#define REGISTER_PYTHON_MODULE_AUTOIMPORT | ( | moduleName | ) | Belle2::BoostPythonModuleProxy boostPythonModuleProxy##moduleName(#moduleName, PyInit_##moduleName, true); |
Identical to REGISTER_PYTHON_MODULE(), but will also import the module into the global namespace after loading it.
This might be useful to allow extra definitions for individual basf2 modules, consider for example:
In a steering file, the type MyTest.Sphere is available immediately after register_module('MyTest').
Definition at line 74 of file RegisterPythonModule.h.
typedef std::pair<std::string, DataStore::EDurability> AccessorParams |
Pair of parameters needed to find an object in the DataStore.
Definition at line 24 of file StoreAccessorBase.h.
typedef B2Vector3<double> B2Vector3D |
typedef for common usage with double
Definition at line 516 of file B2Vector3.h.
typedef B2Vector3<float> B2Vector3F |
typedef for common usage with float
Definition at line 519 of file B2Vector3.h.
using ModuleParamPtr = std::shared_ptr<ModuleParamBase> |
Defines a pointer to a module parameter as a boost shared pointer. */.
Definition at line 38 of file ModuleParamList.h.
typedef std::list<ModulePtr> ModulePtrList |
typedef RelationsInterface<TObject> RelationsObject |
Provides interface for getting/adding relations to objects in StoreArrays.
See RelationsInterface for details.
Definition at line 441 of file RelationsObject.h.
|
strong |
Enum for decoding the comparison operator type.
For encoding scheme in python
Definition at line 141 of file AbstractNodes.h.
|
strong |
Enum for decoding the boolean operator type.
For encoding scheme in python
Definition at line 119 of file AbstractNodes.h.
|
strong |
Enum for decoding the comparison operator type.
For encoding scheme in python
Definition at line 128 of file AbstractNodes.h.
|
strong |
Type the messages can have.
Definition at line 16 of file ZMQDefinitions.h.
enum ERecordType |
What type of message is this?
Note: for parallel processing, the only type that can work is MSG_EVENT. Other messages would need to be sent once to each process, which would result in all kinds of race conditions.
Definition at line 25 of file EvtMessage.h.
|
strong |
Enum of possible Nodes in parsing tree.
NodeTypes in python are encoded with the corresponding dict
Definition at line 100 of file AbstractNodes.h.
|
strong |
Type of the process used for storing and mapping the child processes in the process handler.
Enumerator | |
---|---|
c_Input | Input Process. |
c_Worker | Worker/Reconstruction Process. |
c_Output | Output Process. |
c_Proxy | Multicast Proxy Process. |
c_Monitor | Monitoring Process. |
c_Init | Before the forks, the process is in init state. |
c_Stopped | The process is stopped/killed. |
Definition at line 16 of file ProcHelper.h.
enum ZMQAddressType |
The type of a ZMQ socket address (which socket to use)
Enumerator | |
---|---|
c_output | Input socket. |
c_pub | Output socket. |
c_sub | Multicast publish socket. |
c_control | Multicast subscribe socket. Multicast control socket |
Definition at line 18 of file ZMQAddressUtils.h.
std::string __repr__ | ( | ) | const |
Return a string repesentation of this particle to be used when printing the particle in python.
Definition at line 18 of file EvtGenParticlePDG.cc.
void addConstantOverride | ( | const std::string & | name, |
TObject * | obj, | ||
bool | oneRun = false |
||
) |
Add constant override payload.
This payload will be valid for all possible iov and will be used instead of values from the database.
name | Name under which the object will be accessible |
obj | Pointer to the object to be used. Ownership will be transfered to the DBStore. |
oneRun | if true the override will only be in effect for this one run, not for any other runs |
Definition at line 204 of file DBStore.cc.
|
private |
Add an operator to the internal state, convert them to reverse polish notation using the shunting yard algorithm and execute them as they become available.
Definition at line 111 of file FormulaParser.cc.
|
protected |
Adds a new enforced parameter to the module.
This method has to be called in the constructor of the module. The user has to set the value for this parameter in the steering file.
name | The unique name of the parameter. |
paramVariable | The member variable of the module to which the value from the steering file is written. |
description | A description of the parameter. |
Definition at line 567 of file Module.h.
|
protected |
Adds a new parameter to the module.
This method has to be called in the constructor of the module.
name | The unique name of the parameter. |
paramVariable | The member variable of the module to which the value from the steering file is written. |
description | A description of the parameter. |
defaultValue | The default value of the parameter which is used if there was no value given in the steering file. |
void addParameter | ( | const std::string & | name, |
T & | paramVariable, | ||
const std::string & | description | ||
) |
Adds a new enforced parameter to the module list.
A parameter consists of a reference pointing to a member variable in the module which stores and allows fast access to the parameter value. In addition the type of the parameter is saved and a description is given. This parameter has to be set by the user in the steering file.
name | The unique name of the parameter. |
paramVariable | Reference to the variable which stores the parameter value. |
description | An description of the parameter. |
Definition at line 50 of file ModuleParamList.templateDetails.h.
void addParameter | ( | const std::string & | name, |
T & | paramVariable, | ||
const std::string & | description, | ||
const T & | defaultValue | ||
) |
Adds a new parameter to the module list.
A parameter consists of a reference pointing to a member variable in the module which stores and allows fast access to the parameter value. In addition the type of the parameter is saved and a description is given.
name | The unique name of the parameter. |
paramVariable | Reference to the variable which stores the parameter value. |
description | An description of the parameter. |
defaultValue | The default value of the parameter. |
Definition at line 28 of file ModuleParamList.templateDetails.h.
bool almostEqualDouble | ( | const double & | a, |
const double & | b | ||
) |
Helper function to test if two doubles are almost equal.
Forward declaration of function defined in framework/utilities/GeneralCut.cc.
Definition at line 26 of file CutHelpers.cc.
bool almostEqualFloat | ( | const float & | a, |
const float & | b | ||
) |
Helper function to test if two floats are almost equal.
Definition at line 19 of file CutHelpers.cc.
|
static |
Apply operator on two values.
Definition at line 36 of file FormulaParser.cc.
|
staticprotected |
Make sure we have enough operands to use an operator.
Definition at line 102 of file FormulaParser.cc.
DataType at | ( | unsigned | i | ) | const |
safe member access (with boundary check!)
safe member access (with boundary check!) should always be used!
Definition at line 751 of file B2Vector3.h.
void average | ( | const std::string & | key, |
double | value | ||
) |
Instead of storeing the double value directly under the given key, store the average of the last MAX_SIZE values.
Definition at line 102 of file ZMQLogger.h.
|
inlineprivate |
Calculate the field value at a given position and return it.
pos | position where to evaluate the magnetic field |
Definition at line 85 of file BFieldManager.h.
|
private |
Check if the next character is a operator.
Definition at line 192 of file FormulaParser.cc.
|
static |
Check if a string literal with a given number status continues to be a valid number if next is appended to it.
Definition at line 49 of file FormulaParser.cc.
|
private |
Check if a given TObject instance is compatible with the type of this entry.
Definition at line 228 of file DBStoreEntry.cc.
|
private |
Check if a given TClass is compatible with the type of this entry.
Definition at line 198 of file DBStoreEntry.cc.
void clearBackends | ( | ) |
Clear list of backends.
Definition at line 127 of file Gearbox.cc.
void close | ( | ) |
Free internal structures of previously parsed tree and clear cache.
Definition at line 169 of file Gearbox.cc.
void consolidate | ( | const FunctionFrom & | replaceFrom = FunctionFrom() , |
const FunctionTo & | replaceTo = FunctionTo() , |
||
EConsolidationAction | action = c_doNothing |
||
) |
Consolidate RelationElements.
This function will loop over the relation and "compress" it by merging all elements with the same fromIndex.
The optional arguments can be used to replace indices in the relation, mainly useful in the simulation to replace the Geant4 TrackID with the index of the MCParticle at the end of the event
The Function objects should return a new (index,bool) pair for every index in the old relation. The returned index will be used as the new index in the relation and the bool pair indicates whether the original element got re-attributed or if it is just an index reordering. If it the original element got re-attributed the behaviour depends on the value of action, see EConsolidationAction
Warning: If action is set to c_negativeWeight and there is more than one element having the same from->to index pair after transformation the behaviour is undefined as the two elements get merged. It could happen that a negative and a positive weight get summed up, leaving the weight rather meaningless
replaceFrom | Function object containing replacements for the from indices |
replaceTo | Function object containing replacements for the to indices |
action | Action to be performed when the old element got removed |
Definition at line 466 of file RelationArray.h.
T convertString | ( | const std::string & | str | ) |
Converts a string to type T (one of float, double, long double, int, long int, unsigned long int).
Throws std::invalid_argument on conversion errors, out_of_range if T cannot hold the given value. You can catch both possible exception types of the function (invalid_argument and out_of_range) using the base class logic_error
float convertString | ( | const std::string & | str | ) |
Converts a string to float.
str | string which is converted to float |
Definition at line 24 of file Conversion.cc.
|
static |
Converts a floating point value to the standard framework unit.
If the given unit is not found, the value is returned unchanged (and an error printed).
value | The value which should be converted. |
unitString | The string of the unit of the specified value. |
Definition at line 129 of file UnitConst.cc.
|
static |
Converts a floating point value from the standard framework unit to the given unit.
If the given unit is not found, the value is returned unchanged (and an error printed).
value | The value which should be converted. |
unitString | The string of the unit of the specified value. |
Definition at line 139 of file UnitConst.cc.
|
protected |
Copy any set -> set relations between selected objects.
Definition at line 390 of file SelectSubset.h.
|
protected |
Selects the elements, fill the subset and copies all the relations in which the set is involved.
Definition at line 351 of file SelectSubset.h.
boost::python::object createROOTObjectPyCopy | ( | const T & | instance | ) |
Create a python wrapped copy from a class instance which has a ROOT dictionary.
This piece of dark magic creates a python object referencing a ROOT object the same way as you would see it in the ROOT python module.
It will create a copy of the object using the copy constructor which is then owned by python.
Definition at line 26 of file PyObjROOTUtils.h.
ScopeGuard createScopedUpdateSession | ( | ) |
Make sure we have efficient http pipelinging during initialize/beginRun but don't keep session alive for full processing time.
This will return an object which keeps the session open as long as it is alive.
Definition at line 62 of file Database.cc.
std::unique_ptr< zmq::socket_t > createSocket | ( | const std::string & | socketAddress | ) |
Create a socket of the given type while deciding on the bind behaviour via the address.
An address in the form "tcp://ast:<port>" (with ast = *) means the socket is bound to a local interface. An address in the from "tcp://<host>:<port>" means it connects to the given host.
If you want to fore a given bind behaviour (and fail if the address is invalid), use the function above.
Definition at line 141 of file ZMQParent.h.
std::unique_ptr< zmq::socket_t > createSocket | ( | const std::string & | socketAddress, |
bool | bind | ||
) |
Create a socket of the given type with the given address and bind or not bind it.
Typical socket types are ZMQ_ROUTER, ZMQ_DEALER and ZMQ_STREAM.
The address needs to be in the form "tcp://ast:<port>" (with ast = *) if you want to bind to a local interface or "tcp://<host>:<port>" if you want to connect. Use the convenience function below if you want the program to decide based on your address and use this function if you want the program to force a specific bind behaviour (it will raise an exception if given an invalid address).
Definition at line 105 of file ZMQParent.h.
DEFINE_UNIT | ( | cm | , |
1. | |||
) |
Standard units with the value = 1.
Standard of [length]
DEFINE_UNIT | ( | km | , |
Unit::cm * | 1e5 | ||
) |
Derived units.
[kilometers]
DEFINE_UNIT_NAME | ( | g_cm3 | , |
1. | , | ||
"g/cm3" | |||
) |
Practical units with the value = 1.
These units are NOT consistent with the other standard units. Please use them carefully. Standard of [density]
|
static |
Modify the given string and replace every occurence of $NAME or ${NAME} with the value of the environment variable NAME.
Variables which are not found are returned unchanged
Definition at line 60 of file EnvironmentVariables.cc.
|
static |
Exposes setGlobalTag function of the Database class to Python.
Definition at line 272 of file Database.cc.
unsigned long int findIgnoringParenthesis | ( | std::string | str, |
std::string | pattern, | ||
unsigned int | begin = 0 |
||
) |
Returns the position of a pattern in a string ignoring everything that is in parenthesis.
Definition at line 49 of file CutHelpers.cc.
unsigned long int findMatchedParenthesis | ( | std::string | str, |
char | open = '[' , |
||
char | close = ']' |
||
) |
Returns position of the matched closing parenthesis if the first character in the given string contains an opening parenthesis.
Otherwise return 0.
Definition at line 33 of file CutHelpers.cc.
|
private |
Flush the currently parsed variable name and add it to the state either as variable or number.
Definition at line 173 of file FormulaParser.cc.
|
private |
Flush all pending operators at the end of processing.
Definition at line 161 of file FormulaParser.cc.
|
static |
Construct a new DBStoreEntry with a requested name and an object directly.
The constructor arguments type, objClass and isArray will be filled correctly by looking at obj
name | name of the payload, ususally the class name of the payload but can be any string identifying the payload in the database |
obj | instance of an object representing the correct type |
isRequired | if false don't emit errors if the payload cannot be found for any run |
Definition at line 37 of file DBStoreEntry.cc.
|
private |
Singleton: private constructor.
Definition at line 67 of file Gearbox.cc.
std::set< int64_t > generate_number_sequence | ( | const std::string & | str | ) |
Generate a sequence of numbers defined by a string.
The syntax looks like this: sequence = interval,interval,interval,... interval = begin:end number
For instance. 3,23:27,101 Would generate the following sequence of numbers 3,23,24,25,26,27,101
If intervals overlap the number is only returned once, so the following string 27,24:28,26:29 yields 24,25,26,27,28,29
Negative numbers and intervals are supported as well -3:3 yields -3,-2,-1,0,1,2,3
But reversed intervals are considered empty 5:3 yields an empty sequence
Returns a std::set, which contains the number sequence, each number (as stated above) occurs only once (obviously, since it's a set) and the numbers are ordered using the default Compare operator less<int> of std::set.
Definition at line 20 of file NumberSequence.cc.
unsigned generateBucketNumber | ( | ) | const |
Generates RF bucket number according to the fill pattern.
Definition at line 47 of file BunchStructure.cc.
|
static |
Get the value of an environment variable or the given fallback value if the variable is not set.
Definition at line 25 of file EnvironmentVariables.cc.
std::set< std::string > getAllEntryNames | ( | ) |
Return the names of all the payloads stored in the database at the time of this function is called.
This is equivalent to getting all the payloads' names used by the current basf2 process.
Definition at line 196 of file DBStore.cc.
bool getBucket | ( | int | i | ) | const |
Returns the fill status of RF bucket.
i | bucket number (modulo c_RFBuckets applied internally) |
Definition at line 29 of file BunchStructure.cc.
|
inline |
Returns the current LogConfig object used by the logging system.
Will use the configuration of the current package, if available, or the current module, if available, or, otherwise, the global configuration.
The idea is that a module can call functions in a different package, and the log configuration for that package will be used.
Definition at line 258 of file LogSystem.h.
std::pair< TObject *, IntervalOfValidity > getData | ( | const EventMetaData & | event, |
const std::string & | name | ||
) |
Request an object from the database.
event | The metadata of the event for which the object should be valid. |
name | Name that identifies the object in the database. |
Definition at line 72 of file Database.cc.
bool getData | ( | const EventMetaData & | event, |
std::vector< DBQuery > & | query | ||
) |
Request multiple objects from the database.
event | The metadata of the event for which the objects should be valid. |
query | A list of DBQuery entries that contains the names of the objects to be retrieved. On return the object and iov fields are filled. |
Definition at line 81 of file Database.cc.
T & getDefaultValue |
Returns the default value of the parameter.
Definition at line 56 of file ModuleParam.templateDetails.h.
GearDir getDetectorComponent | ( | const std::string & | component | ) |
Return GearDir representing a given DetectorComponent.
component | Name of the DetectorComponent (e.g. IR, PXD) |
Definition at line 314 of file Gearbox.cc.
DBStoreEntry * getEntry | ( | DBStoreEntry::EPayloadType | payloadType, |
const std::string & | name, | ||
const TClass * | objClass, | ||
bool | array, | ||
bool | required = true |
||
) |
Returns the entry with the requested name in the DBStore.
If the DBStore entry does not exist yet it is added to the map.
If the DBStore map already contains an object under the key with a DIFFERENT type than the given type one, an error will be reported.
payloadType | Type of the payload. Usually c_Object. |
name | Name under which the object is stored in the database (and in the DBStore). |
objClass | The class of the object. |
array | Whether it is a TClonesArray or not. |
required | If true emit errors if the object cannot be found |
Definition at line 34 of file DBStore.cc.
|
inlinestatic |
return the magnetic field at a given position.
[in] | pos | position in framework units, needs to be of at least size 3 |
[out] | field | magnetic field field value at position pos in framework units |
Definition at line 91 of file BFieldManager.h.
|
inline |
Calculate the magnetic field at a given position.
pos | position where the field should be evaluated in framework units. |
Definition at line 67 of file MagneticField.h.
std::shared_ptr< TFile > getFile | ( | std::string | fileName, |
bool | ignoreErrors = false |
||
) |
Get a file with a specific name, if is does not exist it will be created.
If the file cannot be created and opened an error is emitted and you get an empty shared_ptr. If you don't want an error to be emitted you can provide ignoreErrors=true as second argument.
WARNING: When you get this file it is probably not set as current directory so before you use it you have to call file->cd();
Definition at line 33 of file RootFileCreationManager.cc.
std::string getGlobalTags | ( | ) |
Return the global tags used by the database.
If no conditions database is configured return an empty string. If more then one database is configured return all global tags concatenated by ','
Definition at line 154 of file Database.cc.
|
static |
Return reference to the Gearbox instance.
Definition at line 81 of file Gearbox.cc.
|
static |
Interface for the FileManager.
Definition at line 54 of file RootFileCreationManager.cc.
|
static |
Get a list of values from an environment variable or the given fallback list if the variable is not set.
By default the value of the environment variable is split by whitespace (" \t\n\r") but a different list of characters can be supplied, for example ":" for path lists or ", " for comma or space separated values
Definition at line 36 of file EnvironmentVariables.cc.
unsigned getNumOfFilledBuckets | ( | ) | const |
Returns the number of filled buckets.
Definition at line 39 of file BunchStructure.cc.
|
static |
Get a list of values from an environment variable or the given fallback string if the variable is not set.
By default the value of the environment variable is split by whitespace (" \t\n\r") but a different list of characters can be supplied, for example ":" for path lists or ", " for comma or space separated values
In case the variable is not set this function will convert the fallback string to a list using the same rules as would apply for the envirnoment value itself.
Definition at line 48 of file EnvironmentVariables.cc.
ModuleParam< T > & getParam | ( | const std::string & | name | ) | const |
Returns a reference to a parameter.
The returned parameter has already the correct type.
Throws an exception of type ModuleParameterNotFoundError if a parameter with the given name does not exist. Throws an exception of type ModuleParameterTypeError if the parameter type of does not match to the template parameter.
name | The unique name of the parameter. |
Definition at line 573 of file Module.h.
ModuleParam< T > & getParameter | ( | const std::string & | name | ) | const |
Returns a reference to a parameter.
The returned parameter has already the correct type.
Throws an exception of type ModuleParameterNotFoundError if a parameter with the given name does not exist. Throws an exception of type ModuleParameterTypeError if the parameter type of does not match to the template parameter.
name | The unique name of the parameter. |
Definition at line 80 of file ModuleParamList.templateDetails.h.
void getParamValuesPython | ( | const std::string & | name, |
PythonObject & | pyOutput, | ||
bool | defaultValues | ||
) | const |
Returns a python object containing the value or default value of the given parameter.
Calls according to the parameter type a specialized converter in PyObjConvUtils.h
name | The unique name of the parameter. |
pyOutput | Reference to the output object containing the parameter value or default values. |
defaultValues | If true returns a list of default values otherwise a list of the parameter values. |
Definition at line 112 of file ModuleParamList.templateDetails.h.
|
private |
Return the (cached) value of a given path.
Definition at line 247 of file Gearbox.cc.
|
overridevirtual |
Get the parameter path as a TObject.
gearbox::PathEmptyError | if path is empty or does not exist |
gearbox::TObjectConversionError | if the value could not be deserialized |
path | Path of the parameter to get |
Implements Interface.
Definition at line 295 of file Gearbox.cc.
TVector3 GetTVector3 |
returns a TVector3 containing the same coordinates
Definition at line 725 of file B2Vector3.h.
T & getValue |
Returns the value of the parameter.
Definition at line 50 of file ModuleParam.templateDetails.h.
void GetXYZ | ( | ROOT::Math::XYZVector * | xyzVec | ) | const |
directly copies coordinates to a XYZVector
Definition at line 715 of file B2Vector3.h.
void GetXYZ | ( | TVector3 * | tVec | ) | const |
directly copies coordinates to a TVector3
Definition at line 706 of file B2Vector3.h.
ROOT::Math::XYZVector GetXYZVector |
returns a XYZVector containing the same coordinates
returns a ROOT::Math::XYZVector containing the same coordinates
Definition at line 738 of file B2Vector3.h.
void initialize | ( | const EDatabaseState | target = c_Ready | ) |
Initialize the database connection settings on first use.
Definition at line 197 of file Database.cc.
void injectArithmeticOperatorToStream | ( | std::ostream & | stream, |
const ArithmeticOperation & | aoperation | ||
) |
Helper functions for AbstractBooleanNode and AbstractExpressionNode print() and decompile() members Shifts the correct characters into the ostream, depending on the ComparisonOperator given.
For decompiling/printing we want the corresponding character of the operator e.g " + " for ArithmeticOperator::PLUS print() redirects to std::cout, decompile() should redirect to a std::stringstream Both streams subclass std::ostream. This allows the use of these functions in both cases.
Definition at line 57 of file AbstractNodes.cc.
void injectBooleanOperatorToStream | ( | std::ostream & | stream, |
const BooleanOperator & | boperator | ||
) |
Helper functions for AbstractBooleanNode and AbstractExpressionNode print() and decompile() members Shifts the correct characters into the ostream, depending on the BooleanOperator given.
For decompiling/printing we want the corresponding character of the operator e.g " and " for BooleanOperator::AND print() redirects to std::cout, decompile() should redirect to a std::stringstream Both streams subclass std::ostream. This allows the use of these functions in both cases.
Definition at line 17 of file AbstractNodes.cc.
void injectComparisonOperatorToStream | ( | std::ostream & | stream, |
const ComparisonOperator & | coperator | ||
) |
Helper functions for AbstractBooleanNode and AbstractExpressionNode print() and decompile() members Shifts the correct characters into the ostream, depending on the ComparisonOperator given.
For decompiling/printing we want the corresponding character of the operator e.g " == " for ComparisonOperator::EQUALEQUAL print() redirects to std::cout, decompile() should redirect to a std::stringstream Both streams subclass std::ostream. This allows the use of these functions in both cases.
Definition at line 31 of file AbstractNodes.cc.
|
static |
Instance of a singleton Database.
Definition at line 42 of file Database.cc.
|
static |
Instance of a singleton DBStore.
This method is used to access the DBStore directly. It is used internally in the DBStore accessor classes.
Definition at line 28 of file DBStore.cc.
|
inline |
Returns true if the given log level is allowed by the log system (i.e.
>= the system level).
level | The log level which should be compared with the log level of the log system |
debugLevel | The level for debug messages. Only used for the debug level. |
package | Current package (e.g. framework). NULL for package-independent config. |
Definition at line 277 of file LogSystem.h.
|
static |
Check if a value is set in the database.
Definition at line 19 of file EnvironmentVariables.cc.
|
private |
Actual load the payload from file after all info is set.
Definition at line 115 of file DBStoreEntry.cc.
void log | ( | const std::string & | key, |
const AClass & | value | ||
) |
Store a value under a certain key. Different types of values can be stored, namely long, double or string. Mixtures are not allowed for a given key.
Definition at line 96 of file ZMQLogger.h.
|
explicit |
The constructor.
complete | if true ignore the LogInfo settings and output all parts of the message (like file, line, etc.) |
Definition at line 19 of file LogConnectionJSON.cc.
|
explicit |
Constructor.
A parameter consists of a reference pointing to a member variable in the module which stores and allows fast access to the parameter value. In addition the type of the parameter is saved and optionally a description can be given.
paramVariable | Reference to the variable which stores the parameter value. |
description | The optional description of the parameter. |
force | If true the parameter has to be set by the user in the steering file. |
Definition at line 28 of file ModuleParam.templateDetails.h.
|
static |
Returns the name of the B2Vector.
Returns a less readable (but more compatible) name of the B2Vector3.
Definition at line 767 of file B2Vector3.h.
|
protected |
Enable the next metadataprovider in the list.
Definition at line 159 of file Database.cc.
|
private |
Notify all the registered accessors.
Definition at line 190 of file DBStoreEntry.cc.
void open | ( | const std::string & | name = "Belle2.xml" , |
size_t | cacheSize = c_DefaultCacheSize |
||
) |
Open connection to backend and parse tree.
name | Name of the tree to parse |
cacheSize | maximum cache size in entries |
Definition at line 133 of file Gearbox.cc.
|
private |
Function to be called when libxml requests a new input uri to be opened.
Definition at line 87 of file Gearbox.cc.
non-memberfunction Comparison for equality with a TVector3
Definition at line 530 of file B2Vector3.h.
non-memberfunction Scaling of 3-vectors with a real number
Definition at line 537 of file B2Vector3.h.
B2Vector3< DataType > & operator*= | ( | DataType | a | ) |
scaling with real numbers
multiplication with a real number
Definition at line 652 of file B2Vector3.h.
B2Vector3< DataType > operator+ | ( | const B2Vector3< DataType > & | a, |
const ROOT::Math::XYZVector & | b | ||
) |
non-memberfunction for adding a B2Vector3 to a XYZVector
Definition at line 586 of file B2Vector3.h.
non-memberfunction for adding a B2Vector3 to a TVector3
Definition at line 558 of file B2Vector3.h.
B2Vector3< DataType > operator+ | ( | const ROOT::Math::XYZVector & | a, |
const B2Vector3< DataType > & | b | ||
) |
non-memberfunction for adding a XYZVector to a B2Vector3
Definition at line 572 of file B2Vector3.h.
non-memberfunction for adding a TVector3 to a B2Vector3
Definition at line 544 of file B2Vector3.h.
addition
Definition at line 631 of file B2Vector3.h.
B2Vector3< DataType > operator- | ( | const B2Vector3< DataType > & | a, |
const ROOT::Math::XYZVector & | b | ||
) |
non-memberfunction for substracting a B2Vector3 from a XYZVector
Definition at line 593 of file B2Vector3.h.
non-memberfunction for substracting a B2Vector3 from a TVector3
Definition at line 565 of file B2Vector3.h.
B2Vector3< DataType > operator- | ( | const ROOT::Math::XYZVector & | a, |
const B2Vector3< DataType > & | b | ||
) |
non-memberfunction for substracting a XYZVector from a B2Vector3
Definition at line 579 of file B2Vector3.h.
non-memberfunction for substracting a TVector3 from a B2Vector3
Definition at line 551 of file B2Vector3.h.
subtraction
Definition at line 642 of file B2Vector3.h.
std::ostream & operator<< | ( | std::ostream & | output, |
const IntervalOfValidity & | iov | ||
) |
output | The output stream. |
iov | The IntervalOfValidity object. |
Definition at line 194 of file IntervalOfValidity.cc.
Assignment via B2Vector3.
Definition at line 601 of file B2Vector3.h.
B2Vector3< DataType > & operator= | ( | const ROOT::Math::XYZVector & | b | ) |
Assignment via XYZVector.
Definition at line 621 of file B2Vector3.h.
B2Vector3< DataType > & operator= | ( | const TVector3 & | b | ) |
Assignment via TVector3.
Definition at line 611 of file B2Vector3.h.
Bool_t operator== | ( | const TVector3 & | a, |
const B2Vector3< DataType > & | b | ||
) |
non-memberfunction Comparison for equality with a TVector3
Definition at line 523 of file B2Vector3.h.
std::istream & operator>> | ( | std::istream & | input, |
IntervalOfValidity & | iov | ||
) |
input | The input stream. |
iov | The InervalOfValidity object. |
Definition at line 150 of file IntervalOfValidity.cc.
|
staticnoexcept |
Convert operator code to character.
Definition at line 19 of file FormulaParser.cc.
|
private |
Set an override object in case we want to use a different object then actually provided by the database.
obj | Instance to use as payload, this entry will take over ownership. |
iov | interval how long this object should be valid |
Definition at line 159 of file DBStoreEntry.cc.
|
private |
Change the value of a given path expression.
Definition at line 184 of file Gearbox.cc.
|
private |
The main code that does an update, factored out so it can be used by both update and update(event).
Definition at line 108 of file DBStore.cc.
|
private |
The main code that does an updateEvent.
Factored out so it can be used by both updateEvent and updateEvent(eventNumber).
Definition at line 169 of file DBStore.cc.
int poll | ( | unsigned int | timeout, |
AMulticastAnswer | multicastAnswer, | ||
ASocketAnswer | socketAnswer | ||
) | const |
Poll both the multicast and the data socket until, either:
A note on the order: if there are messages on both the data socket and the multicast socket, first all messages to the multicast socket will be answered and then all messages to the data socket.
Definition at line 113 of file ZMQClient.h.
int pollMulticast | ( | unsigned int | timeout, |
AMulticastAnswer | multicastAnswer | ||
) | const |
Poll method to only the multicast socket.
Basically the same as the poll function to both sockets, except: If the answer function returns false, the polling will stop as above, BUT: it will first answer all messages that are already in the socket!
Definition at line 162 of file ZMQClient.h.
int pollSocket | ( | unsigned int | timeout, |
ASocketAnswer | socketAnswer | ||
) | const |
Poll method to only the data socket.
Basically the same as the poll function to both sockets, except: If the answer function returns false, the polling will stop as above, BUT: it will first answer all messages that are already in the socket!
Definition at line 142 of file ZMQClient.h.
|
protected |
Process the given formula and store the final state.
Definition at line 225 of file FormulaParser.cc.
|
protected |
Format the given runtime_error with context information and rethrow a new one.
Definition at line 294 of file FormulaParser.cc.
|
inline |
Generate a random double value between 0 and 1, both limits excluded.
Definition at line 240 of file RandomGenerator.h.
|
inline |
Generate one 64bit unsigned integer between 0 and UINT64_MAX (both inclusive).
Definition at line 200 of file RandomGenerator.h.
|
protected |
Rebuild the index.
force | if force is true, the index will be rebuild even if the RelationArray says that it has not been modified |
Definition at line 156 of file RelationIndexContainer.h.
|
staticprotected |
registers the name and value of a conversion in s_conversionFactors.
Definition at line 149 of file UnitConst.cc.
|
static |
Reset the database instance.
keepConfig | if true the configuration object itself is not resetted so that initializing the database again will result in the same configuration as before. This is useful when running process multiple times. |
Definition at line 50 of file Database.cc.
void reset | ( | bool | keepEntries = false | ) |
Invalidate all payloads.
keepEntries | Keep the existing entries so that future calls to update the database will try to obtain the payloads which were registered so far. |
Definition at line 177 of file DBStore.cc.
|
private |
reset the payload to nothing
Definition at line 68 of file DBStoreEntry.cc.
void resetValue |
Resets the parameter value by assigning the default value to the parameter value.
Definition at line 87 of file ModuleParam.templateDetails.h.
|
inline |
Fill an array of doubles with random values in (0,1), both limits excluded.
n | number of doubles to generate |
array | pointer to an array where the numbers should be stored |
Definition at line 219 of file RandomGenerator.h.
|
inline |
Fill an array of floats with random values in (0,1), both limits excluded.
n | number of floats to generate |
array | pointer to an array where the numbers should be stored |
Definition at line 212 of file RandomGenerator.h.
|
inline |
Fill an array of unsigned integers with random values in [0, UINT32_MAX], both limits included.
n | number of ints to generate |
array | pointer to an array where the numbers should be stored |
Definition at line 231 of file RandomGenerator.h.
|
inline |
Fill an array of unsigned 64bit integers with random values in [0, UINT64_MAX], both limits included.
n | number of ints to generate |
array | pointer to an array where the numbers should be stored |
Definition at line 225 of file RandomGenerator.h.
void select | ( | const std::function< bool(const StoredClass *)> & | f | ) |
This method is the actual worker.
It selects the elements, fill the subset and all the relations in which the subset is involved.
f | the pointer to the function (or a nameless lambda expression) returning true for the elements to be selected and false for the others. |
Definition at line 414 of file SelectSubset.h.
|
static |
Send a given message over the given created socket. You need to move in the message for zero-copy.
Definition at line 153 of file ZMQParent.h.
|
overridevirtual |
Sends a log message.
message | The log message object. |
Implements LogConnectionBase.
Definition at line 23 of file LogConnectionJSON.cc.
void sendToSocket | ( | const AZMQClient & | socket | ) |
Publish this event backup directly to the given client.
Definition at line 56 of file ProcessedEventBackup.h.
void sendWorkerBackupEvents | ( | unsigned int | worker, |
const AZMQClient & | socket | ||
) |
Send all backups of a given worker directly to the multicast and delete them.
Definition at line 51 of file ProcessedEventsBackupList.h.
void setBackends | ( | const std::vector< std::string > & | backends | ) |
Select the backends to use to find resources.
backends | list of URIs identifying the backends starting with the handler prefix followed by a colon, the rest is handler specific |
Definition at line 99 of file Gearbox.cc.
void setBucket | ( | unsigned | i | ) |
Sets the fill status of RF bucket to true.
i | bucket number (modulo c_RFBuckets applied internally) |
Definition at line 20 of file BunchStructure.cc.
void setDefaultValue | ( | const T & | defaultValue | ) |
Sets the default value of a parameter.
defaultValue | The parameter default value of the parameter. |
Definition at line 42 of file ModuleParam.templateDetails.h.
bool setMeanCov | ( | const ROOT::Math::XYZVector & | mean, |
const TMatrixTBase< value_type > & | cov | ||
) |
set the mean and covariance for the distribution.
mean | Vector of mean values |
cov | Matrix containing the covariance values |
Definition at line 191 of file MultivariateNormalGenerator.h.
bool setMeanCov | ( | const TVectorT< value_type > & | mean, |
const TMatrixTBase< value_type > & | cov | ||
) |
set mean and covariance matrix from ROOT vector/matrix objects, e.g.
TMatrixD, TMatrixF, TMatrixDSym and so forth
mean | Vector of mean values |
cov | Matrix containing the covariance values |
Definition at line 177 of file MultivariateNormalGenerator.h.
void setParameter | ( | const std::string & | name, |
const T & | value | ||
) |
Sets the value of a parameter given by its name.
A template based method which is invoked by the module.
name | The unique name of the parameter. |
value | The parameter value which should be assigned to the parameter given by its name. |
Definition at line 69 of file ModuleParamList.templateDetails.h.
void setParamPython | ( | const std::string & | name, |
const PythonObject & | pyObj | ||
) |
Implements a method for setting boost::python objects.
The method supports the following types: dict, list, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done by specialized converter in PyObjConvUtils.h
name | The unique name of the parameter. |
pyObj | The object which should be converted and stored as the parameter value. |
Definition at line 104 of file ModuleParamList.templateDetails.h.
void setValue | ( | const T & | value | ) |
Sets the value of a parameter.
value | The parameter value which should be assigned to the parameter. |
Definition at line 35 of file ModuleParam.templateDetails.h.
|
finalvirtual |
Set value from other ModuleParam of same type.
Implements ModuleParamBase.
Definition at line 76 of file ModuleParam.templateDetails.h.
|
finalvirtual |
Implements a method for setting boost::python objects.
The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done by PyObjConvUtils::convertPythonObject.
pyObject | The object which should be converted and stored as the parameter value. |
Implements ModuleParamBase.
Definition at line 62 of file ModuleParam.templateDetails.h.
|
finalvirtual |
Returns a python object containing the value or the default value of the given parameter.
pyObject | Reference to the python object which is set to the parameter value. |
defaultValues | If true returns default value otherwise parameter value. |
Implements ModuleParamBase.
Definition at line 68 of file ModuleParam.templateDetails.h.
void SetXYZ | ( | const ROOT::Math::XYZVector & | xyzVec | ) |
set all coordinates using a reference to XYZVector
Definition at line 680 of file B2Vector3.h.
void SetXYZ | ( | const ROOT::Math::XYZVector * | xyzVec | ) |
set all coordinates using a pointer to XYZVector
Definition at line 689 of file B2Vector3.h.
void SetXYZ | ( | const TVector3 & | tVec | ) |
set all coordinates using a reference to TVector3
Definition at line 662 of file B2Vector3.h.
void SetXYZ | ( | const TVector3 * | tVec | ) |
set all coordinates using a pointer to TVector3
Definition at line 671 of file B2Vector3.h.
std::vector< std::string > splitOnDelimiterAndConserveParenthesis | ( | std::string | str, |
char | delimiter, | ||
char | open, | ||
char | close | ||
) |
Split into std::vector on delimiter ignoring delimiters between parenthesis.
Definition at line 81 of file CutHelpers.cc.
bool storeData | ( | const std::string & | name, |
TObject * | object, | ||
const IntervalOfValidity & | iov | ||
) |
Store an object in the database.
name | Name that identifies the object in the database. |
object | The object that should be stored in the database. |
iov | The interval of validity of the the object. |
Definition at line 141 of file Database.cc.
bool storeData | ( | std::list< DBImportQuery > & | query | ) |
Store multiple objects in the database.
query | A list of DBImportQuery entries that contains the objects, their names, and their intervals of validity. |
Definition at line 134 of file Database.cc.
void timeit | ( | const std::string & | key | ) |
Measure the rate of calls with the same key every AVERAGE_SIZE calls (and also display the last time AVERAGE_SIZE was reached under <key>_last_measurement)
Definition at line 117 of file ZMQLogger.h.
|
static |
Static function to generate a string description for the parameter type.
This string will be used to identify the contained type and guaranties some level of type safety in this type erasure.
Definition at line 22 of file ModuleParam.templateDetails.h.
void update | ( | ) |
Updates all objects that are outside their interval of validity.
This method is called by the framework for each new run.
Definition at line 79 of file DBStore.cc.
void update | ( | const EventMetaData & | event | ) |
Updates all objects that are outside their interval of validity.
This method is for calling the DBStore manually using an EventMetaData object instead of relying on the DataStore containing one.
Definition at line 97 of file DBStore.cc.
void updateEvent | ( | ) |
Updates all intra-run dependent objects.
This method is called by the framework for each event.
Definition at line 142 of file DBStore.cc.
void updateEvent | ( | const unsigned int | eventNumber | ) |
Updates all intra-run dependent objects.
This method is for specifying the event number to update to manually. Updates the m_manualEvent to use the event number given in the argument, before performing the intra-run update. This doesn't alter/use the DataStore EventMetaData.
Definition at line 153 of file DBStore.cc.
|
private |
update the payload object according to the new event information.
If the payload has no intra run dependency this does nothing, otherwise it will load the appropirate object for the given event and call the update notifications on changes to the object.
Definition at line 55 of file DBStoreEntry.cc.
|
private |
Update the payload information for this entry and if appropriate open the new file and extract the object as needed.
If another version is already loaded the object will be deleted and the file closed.
If neither revision or filename change we assume the payload is not modified and will not update anything and not call any update notifications.
revision | new revision of the payload |
iov | new interval of validity for the payload |
filename | filename for the payload |
checksum | checksum of the payload |
globaltag | globaltag name (or testing payloads path) from which the payload is picked |
event | EventMetaData object |
Definition at line 83 of file DBStoreEntry.cc.
~DBStore | ( | ) |
~DBStoreEntry | ( | ) |
Clean up memory.
Some of the members are raw pointers to limit the include burden on this class as it will be included by anyone using Conditions data
Definition at line 45 of file DBStoreEntry.cc.
~Gearbox | ( | ) |
Free structures on destruction.
Definition at line 74 of file Gearbox.cc.
std::string DBPointer_defaultName = "" |
Use default name for array in DBPointer.
Definition at line 19 of file DBPointer.h.
|
staticprotected |
|
staticconstexpr |
Helper function to convert XYZVector to TVector3.
Definition at line 24 of file VectorUtil.h.