![]() |
KaliVeda
Toolkit for HIC analysis
|
Before plunging into the many specific classes provided by KaliVeda for handling heany-ion collision data, it is worth mentioning quite a few utility classes which can be useful for a wide range of general programming needs. Some of them are simple extensions to existing ROOT classes, others are more original. See KaliVeda Core Classes for the full list.
KVBase is the base class for the toolkit, derived from the ROOT TNamed (nearly-) base class. TNamed objects have a name and a title, KVBase extends this to include a type (actually just an alias for the TNamed title), a label (a string attribute distinct from the name and title/type) and a number. The class also provides quite a few static methods which have general usefulness. See the class reference for details.
KVString is a (small) extension to ROOT's TString class (some methods which were originally added to KVString have long since been adopted by the official ROOT TString and are therefore no longer defined by KVString).
One thing that it is very useful for is iterating over items in a string separated by 'tokens' in a memory-safe way (unlike TString::Tokenize()):
KVNumberList handles lists of integers. Doesn't sound much, but it's amazing how useful such a class can be!
KVValueRange can be used to define a range of values \([min,max]\) and then do useful things such as generate a random value in the range, or generate a sequence of integer values between the limits, test if a value is contained in the range, etc.
Physical quantities like pressure, mass, energy, etc. obviously have associated units. The default units used by (nearly) all classes and methods in the KaliVeda toolkit are:
etc. etc. The full list can be found in the detailed description of the KVUnits namespace, which provides conversion factors between the standard units. For example, if x
is a density expressed in kilogrammes per cubic metre, the corresponding density in standard units of \([g/cm^3]\) is given by
See the detailed description for more info.
As you may (or may not) know, much of ROOT's infrastructure is based on the use of containers which store base pointers (pointer to TObject) to the objects referenced by the container:
KaliVeda extends the functionality of the existing ROOT list classes (those derived from TSeqCollection) with the KVSeqCollection base class which adds methods to search for objects in the list not only by name (as with TSeqCollection::FindObject()), but also by title, class, type, label, or number (the last 3 attributes only for objects derived from KVBase). It is also possible to select more than one object in a list using the KVSeqCollection::GetSubListWith...() methods.
Derived from KVSeqCollection are 4 more list classes which all inherit the new functionalities and add their own specific flavour:
KVClassFactory, as its name implies, can be used to generate new classes (source code) with very little effort. Many classes in the KaliVeda framework were in fact generated (at least their basic structure) using KVClassFactory. The classes are ROOT-compliant, i.e. they have the necessary macros in order to be used on the ROOT command line. Simple example:
This will produce the following files:
and