KaliVeda
Toolkit for HIC analysis
|
Base class for KaliVeda framework.
This is the base class for many classes in the KaliVeda framework. Each KVBase object has:
When objects are accessed through a TObject/TNamed base pointer, it is possible to test whether an object is derived from KVBase, using the bit KVBase::kIsKaliVedaObject
:
This class also provides a number of general utilities, often as static (stand-alone) methods.
The static methods
give info on the sources, when and where they were built, and by whom.
The entire KaliVeda framework is initialised by the static method KVBase::InitEnvironment()
Static methods for easily locating and/or opening files within the KaliVeda installation tree are given:
Note that in the second case, two methods exist: one for reading, the other for writing the (ascii) files. A global function for searching files is also defined:
This will search for a file in an arbitrary number of locations, return kTRUE if file is found and put full path to file in 'fullpath':
The remaining arguments are the names of 'ndirs' paths to search in,
Source files for a class can be found using static method
It will look for appropriately-named files corresponding to the header and implementation file of a class, testing several popular suffixes in each case.
To find an executable in the current user's 'PATH' (or elsewhere), use static method
The static methods
can generate and handle uniquely-named temporary (ascii) files.
The static method
can be used to create a dated backup of an existing file before it is replaced with a new version.
As plugins are extensively used in the KaliVeda framework, a few utilities for handling them are defined. They are static methods
#include <KVBase.h>
Inherits TNamed.
Inherited by KVTemplateParticleCondition< KVNucleus >, KVTemplateParticleCondition< Particle >, DMSFile_t, INDRAGeometryBuilder, KV2Body, KVAutoFit, KVAvailableRunsFile, KVBatchJob, KVBatchSystem, KVBatchSystemGUI, KVCalibrator, KVClassFactory::KVClassMember, KVClassMonitor, KVColouredBase, KVDBKey, KVDMS, KVDataAnalysisTask, KVDataBranchHandler, KVDataPatch, KVDataPatchList, KVDataQualityAudit, KVDataQualityAuditReportMaker, KVDataQualityAuditReporting_INDRAFAZIA, KVDataRepository, KVDataSelector, KVDataSet, KVDetectionSimulator, KVDetectorEvent, KVDetectorSignal, KVDigitalFilter, KVEBYEDAT_ACQParam, KVElasticScatterEvent, KVEvent, KVEventReconstructor, KVEventViewer, KVFAZIATrigger, KVFileReader, KVFissionKinematics, KVGemini, KVGenPhaseSpace, KVGeoDNTrajectory, KVGeoDetectorNode, KVGeoNavigator, KVGeoNodeIterator, KVGeoStrucElement, KVGroupReconstructor, KVHistogram, KVIDGridEditor, KVIDGridManager, KVIDTelescope, KVINDRAPulserDataTree, KVIdentificationResult, KVImpactParameters::bayesian_estimator< FittingFunction, FluctuationKernel >, KVImpactParameters::cavata_prescription, KVImpactParameters::impact_parameter_distribution, KVIonRangeTable, KVIonRangeTableMaterial, KVMaterial, KVNuclearChart, KVRawDataReader, KVRunFile, KVRungeKutta, KVSQLROOTFile, KVSimDir, KVSimDirGUI, KVSimFile, KVTarArchive, KVTemplateParticleCondition< ParticleType >, KVTestListView, KVTriggerConditions, KVUserAnalysisOptionList, KVValueRange< ValueType >, KVVarGlob, KVVirtualIDFitter, KVZALineFinder, KVedaLossRangeFitter, and MicroStat::MCSampler.
Public Types | |
enum | EKaliVedaBits { kIsKaliVedaObject = BIT(23) } |
Public Types inherited from TObject | |
enum | EDeprecatedStatusBits |
enum | EStatusBits |
Public Member Functions | |
KVBase () | |
Default constructor. | |
KVBase (const Char_t *name, const Char_t *title="") | |
Ctor for object with given name and type. | |
KVBase (const KVBase &) | |
copy ctor | |
virtual | ~KVBase () |
virtual void | Clear (Option_t *opt="") |
Clear object properties : name, type/title, number, label. | |
virtual void | Copy (TObject &) const |
Make a copy of this object. | |
const Char_t * | GetLabel () const |
UInt_t | GetNumber () const |
UInt_t | GetNumberOfObjects () const |
virtual TObject * | GetObject () const |
virtual const Char_t * | GetType () const |
Bool_t | HasLabel () const |
virtual Bool_t | IsCalled (const Char_t *name) const |
Bool_t | IsLabelled (const Char_t *l) const |
virtual Bool_t | IsType (const Char_t *typ) const |
virtual void | List () |
KVBase & | operator= (const KVBase &) |
copy assignment operator | |
virtual void | Print (Option_t *option="") const |
Double_t | ProtectedGetX (const TF1 *func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) const |
void | SetLabel (const Char_t *lab) |
virtual void | SetNumber (UInt_t num) |
virtual void | SetType (const Char_t *str) |
Public Member Functions inherited from TNamed | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TNamed &named) | |
TNamed (const TString &name, const TString &title) | |
virtual | ~TNamed () |
void | Clear (Option_t *option="") override |
TObject * | Clone (const char *newname="") const override |
Int_t | Compare (const TObject *obj) const override |
void | Copy (TObject &named) const override |
virtual void | FillBuffer (char *&buffer) |
const char * | GetName () const override |
const char * | GetTitle () const override |
ULong_t | Hash () const override |
TClass * | IsA () const override |
Bool_t | IsSortable () const override |
void | ls (Option_t *option="") const override |
TNamed & | operator= (const TNamed &rhs) |
void | Print (Option_t *option="") const override |
virtual void | SetName (const char *name) |
virtual void | SetNameTitle (const char *name, const char *title) |
virtual void | SetTitle (const char *title="") |
virtual Int_t | Sizeof () const |
void | Streamer (TBuffer &) override |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TObject | |
TObject () | |
TObject (const TObject &object) | |
virtual | ~TObject () |
void | AbstractMethod (const char *method) const |
virtual void | AppendPad (Option_t *option="") |
virtual void | Browse (TBrowser *b) |
ULong_t | CheckedHash () |
virtual const char * | ClassName () const |
virtual void | Delete (Option_t *option="") |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
virtual void | Draw (Option_t *option="") |
virtual void | DrawClass () const |
virtual TObject * | DrawClone (Option_t *option="") const |
virtual void | Dump () const |
virtual void | Error (const char *method, const char *msgfmt,...) const |
virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
virtual TObject * | FindObject (const char *name) const |
virtual TObject * | FindObject (const TObject *obj) const |
virtual Option_t * | GetDrawOption () const |
virtual const char * | GetIconName () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
virtual Option_t * | GetOption () const |
virtual UInt_t | GetUniqueID () const |
virtual Bool_t | HandleTimer (TTimer *timer) |
Bool_t | HasInconsistentHash () const |
virtual void | Info (const char *method, const char *msgfmt,...) const |
virtual Bool_t | InheritsFrom (const char *classname) const |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
virtual void | Inspect () const |
void | InvertBit (UInt_t f) |
Bool_t | IsDestructed () const |
virtual Bool_t | IsEqual (const TObject *obj) const |
virtual Bool_t | IsFolder () const |
R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
R__ALWAYS_INLINE Bool_t | IsZombie () const |
void | MayNotUse (const char *method) const |
virtual Bool_t | Notify () |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *vp) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, void *vp) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (const TObject &rhs) |
virtual void | Paint (Option_t *option="") |
virtual void | Pop () |
virtual Int_t | Read (const char *name) |
virtual void | RecursiveRemove (TObject *obj) |
void | ResetBit (UInt_t f) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
void | SetBit (UInt_t f) |
void | SetBit (UInt_t f, Bool_t set) |
virtual void | SetDrawOption (Option_t *option="") |
virtual void | SetUniqueID (UInt_t uid) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
virtual void | UseCurrentStyle () |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const |
Static Public Member Functions | |
static Bool_t | AreEqual (Double_t x, Double_t y, Long64_t maxdif=1) |
Comparison between two 64-bit floating-point values. | |
static void | BackupFileWithDate (const Char_t *path) |
static void | CombineFiles (const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE) |
static void | Deprecated (const char *method, const char *advice) |
static Bool_t | FindClassSourceFiles (const Char_t *class_name, KVString &imp_file, KVString &dec_file, const Char_t *dir_name=".") |
static Bool_t | FindExecutable (TString &exec, const Char_t *path="$(PATH)") |
static const Char_t * | FindFile (const Char_t *search, TString &wfil) |
static const Char_t * | GetBINDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetDATABASEFilePath () |
static const Char_t * | GetDATADIRFilePath (const Char_t *namefile="") |
static Bool_t | GetDataSetEnv (const Char_t *dataset, const Char_t *type, Bool_t defval) |
static const Char_t * | GetDataSetEnv (const Char_t *dataset, const Char_t *type, const Char_t *defval) |
static Double_t | GetDataSetEnv (const Char_t *dataset, const Char_t *type, Double_t defval) |
static const Char_t * | GetETCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetExampleFilePath (const Char_t *library, const Char_t *namefile) |
Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.) | |
static const Char_t * | GetINCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetKVBuildDate () |
Returns KaliVeda build date. | |
static const Char_t * | GetKVBuildDir () |
Returns top-level directory used for build. | |
static const Char_t * | GetKVBuildTime () |
Returns KaliVeda build time. | |
static const Char_t * | GetKVBuildType () |
Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) | |
static const Char_t * | GetKVBuildUser () |
Returns username of person who performed build. | |
static const Char_t * | GetKVSourceDir () |
Returns top-level directory of source tree used for build. | |
static const Char_t * | GetKVVersion () |
Returns KaliVeda version string. | |
static const Char_t * | GetLIBDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetListOfPlugins (const Char_t *base) |
static const Char_t * | GetListOfPluginURIs (const Char_t *base) |
static const Char_t * | GetPluginURI (const Char_t *base, const Char_t *plugin) |
static void | GetTempFileName (TString &base) |
static const Char_t * | GetTEMPLATEDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetWORKDIRFilePath (const Char_t *namefile="") |
static const Char_t * | gitBranch () |
Returns git branch of sources. | |
static const Char_t * | gitCommit () |
Returns last git commit of sources. | |
static void | InitEnvironment () |
static bool | is_gnuinstall () |
static Bool_t | IsThisAPlugin (const TString &uri, TString &base) |
static TPluginHandler * | LoadPlugin (const Char_t *base, const Char_t *uri="0") |
static Bool_t | OpenContextMenu (const char *method, TObject *obj, const char *alt_method_name="") |
static void | OpenTempFile (TString &base, std::ofstream &fp) |
static void | PrintSplashScreen () |
Prints welcome message and infos on version etc. | |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, KVSQLite::database &dbfile, const Char_t *kvsubdir="") |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, std::ifstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0) |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, std::ofstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0) |
static Bool_t | SearchKVFile (const Char_t *name, TString &fullpath, const Char_t *kvsubdir="") |
static const Char_t * | WorkingDirectory () |
Static Public Member Functions inherited from TNamed | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Longptr_t | GetDtorOnly () |
static Bool_t | GetObjectStat () |
static void | SetDtorOnly (void *obj) |
static void | SetObjectStat (Bool_t stat) |
Private Member Functions | |
void | init () |
Default initialisation. | |
Static Private Member Functions | |
static void | ReadConfigFiles () |
static void | ReadGUIMimeTypes () |
Private Attributes | |
TString | fLabel |
label for the object | |
UInt_t | fNumber |
for numbering objects | |
Static Private Attributes | |
static Bool_t | fEnvIsInit = kFALSE |
set when environment is initialised | |
static UInt_t | fNbObj = 0 |
Total number of KaliVeda objects (actually counts number of calls to default ctor) | |
static TString | fWorkingDirectory = "$(HOME)/.kaliveda" |
user working directory for e.g. database files | |
Additional Inherited Members | |
Public Attributes inherited from TObject | |
kBitMask | |
kCanDelete | |
kCannotPick | |
kHasUUID | |
kInconsistent | |
kInvalidObject | |
kIsOnHeap | |
kIsReferenced | |
kMustCleanup | |
kNoContextMenu | |
kNotDeleted | |
kObjInCanvas | |
kOverwrite | |
kSingleKey | |
kWriteDelete | |
kZombie | |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
void | MakeZombie () |
Protected Attributes inherited from TNamed | |
TString | fName |
TString | fTitle |
Protected Attributes inherited from TObject | |
kOnlyPrepStep | |
KVBase::KVBase | ( | ) |
Default constructor.
Definition at line 317 of file KVBase.cpp.
Ctor for object with given name and type.
Definition at line 328 of file KVBase.cpp.
KVBase::KVBase | ( | const KVBase & | obj | ) |
copy ctor
Definition at line 339 of file KVBase.cpp.
|
virtual |
Definition at line 369 of file KVBase.cpp.
Comparison between two 64-bit floating-point values.
Returns kTRUE
if the integer representations of the two values are within maxdif
of each other. By default maxdif=1
, which means that we consider that x==y
if the difference between them is no greater than the precision of Double_t
variables, i.e. 4.94065645841246544e-324
Based on the function AlmostEqual2sComplement(float, float, int)
by Bruce Dawson http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
Definition at line 1442 of file KVBase.cpp.
path
gives the full path (can include environment variables, special symbols) to a file which will be renamed with an extension containing the current date and time (in SQL format).
Example:
KVBase::BackupFileWithDate("$(HOME)/toto.txt")
The file toto.txt
will be renamed toto.txt.2007-05-02_16:22:37
Definition at line 753 of file KVBase.cpp.
Clear object properties : name, type/title, number, label.
Reimplemented from TObject.
Reimplemented in KVFileReader, KVEBYEDAT_ACQParam, KVDetectorSignal, KVGeoDNTrajectory, KVFAZIADetector, KV_CCIN2P3_GE, KV_CCIN2P3_Slurm, KVAutoFit, KVBatchSystem, KVEvent, KVDetectorEvent, KVExpSetUp, KVMultiDetArray, KVDetector, KVGeoStrucElement, KVIdentificationResult, KVIDGridManager, KVMaterial, and KVTarget.
Definition at line 380 of file KVBase.cpp.
|
static |
STATIC method which allows to combine the contents of two ROOT files (file1 and file2) into a new ROOT file (newfilename). All objects from the two files will be written in the new file.
if keep=kFALSE, the two files will be deleted after the operation
Definition at line 1527 of file KVBase.cpp.
Make a copy of this object.
Reimplemented from TObject.
Reimplemented in INDRAGeometryBuilder, KVAutoFit, KVEBYEDAT_ACQParam, KVDataAnalysisTask, KVSimDir, KVSimFile, KVIDGridEditor, KVNuclearChart, KVSimDirGUI, KVZALineFinder, KVIdentificationResult, KVIonRangeTableMaterial, KVRangeYanez, KVRangeYanezMaterial, KVSource, KVValueRange< ValueType >, KVFAZIADetector, KVClassFactory::KVClassMember, KVClassFactory::KVClassMethod, KVEvent, KVEventReconstructor, KVReconNucTrajectory, KVDetector, KVGeoDNTrajectory, KVCaloBase, KVDirectivity, KVFlowTensor, KVFoxH2, KVQuadMoment, KVRiso, KVSubEventMaker, KVVarGlob, KVVarGlob1, KVVarGlobMean, KVVGObjectSum< SumObject >, KVVGObjectSum< KVNucleus >, KVVGObjectSum< TVector3 >, KVZmax, KVTemplateParticleCondition< ParticleType >, KVTemplateParticleCondition< KVNucleus >, KVTemplateParticleCondition< Particle >, KVGenPhaseSpace, KVMaterial, KVTarget, and KVEventClassifier.
Definition at line 394 of file KVBase.cpp.
|
static |
Print a message to indicate when the called method is deprecated and give advice how to do better
Don't call directly: use the macro Deprecate(advice) which will automatically fill in the method name (see KVMacros.h)
Definition at line 1734 of file KVBase.cpp.
|
static |
Look for the source files corresponding to class_name
i.e. taking class_name as a base, we look for one of
and one of
By default we look in the current working directory, unless argument dir_name
is given
If found, the names of the two files are written in imp_file
and dec_file
Definition at line 1102 of file KVBase.cpp.
By default, FindExecutable(exec)
will look for the executable named by exec
in the directories contained in the environment variable PATH
. You can override this by giving your own search path
as second argument (remember to write environment variables as $(PATH)
, for cross-platform compatibility).
If exec
is not found, and if it does not end with .exe
, we look for exec.exe
This is for compatibility with Windows/cygwin environments.
If the executable is found, returns kTRUE
and exec
then holds full path to executable. Returns kFALSE
if exec
not found in paths.
If exec
is an absolute pathname, we return kTRUE
if the file exists (we do not use path
).
Definition at line 1001 of file KVBase.cpp.
Backwards compatible fix for TSystem::FindFile
which only exists from ROOT version 5.12/00 onwards. Use this method as a replacement for gSystem->FindFile
(same arguments)
Definition at line 1060 of file KVBase.cpp.
Definition at line 118 of file KVBase.cpp.
|
static |
Definition at line 92 of file KVBase.cpp.
Definition at line 74 of file KVBase.cpp.
Static method to interrogate dataset-specific variables in configuration Will look for gEnv->GetValue "dataset.type" then simply "type" if no dataset-specific value is found. If neither resource is defined, return the "defval" default value
Definition at line 1660 of file KVBase.cpp.
|
static |
Static method to interrogate dataset-specific variables in configuration Will look for gEnv->GetValue "dataset.type" then simply "type" if no dataset-specific value is found. If neither resource is defined, return the "defval" default value (="" by default)
Definition at line 1619 of file KVBase.cpp.
|
static |
Static method to interrogate dataset-specific variables in configuration Will look for gEnv->GetValue "dataset.type" then simply "type" if no dataset-specific value is found. If neither resource is defined, return the "defval" default value
Definition at line 1639 of file KVBase.cpp.
Definition at line 65 of file KVBase.cpp.
|
static |
Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.)
Definition at line 1577 of file KVBase.cpp.
Definition at line 109 of file KVBase.cpp.
|
static |
Returns KaliVeda build date.
Definition at line 900 of file KVBase.cpp.
|
static |
Returns top-level directory used for build.
Definition at line 951 of file KVBase.cpp.
|
static |
Returns KaliVeda build time.
Definition at line 912 of file KVBase.cpp.
|
static |
Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...)
Definition at line 925 of file KVBase.cpp.
|
static |
Returns username of person who performed build.
Definition at line 887 of file KVBase.cpp.
|
static |
Returns top-level directory of source tree used for build.
Definition at line 938 of file KVBase.cpp.
|
static |
Returns KaliVeda version string.
Definition at line 874 of file KVBase.cpp.
Definition at line 100 of file KVBase.cpp.
Return whitespace-separated list of all plugin classes defined for the given base class.
E.g. if plugins exist for BaseClass:
Plugin.BaseClass: URI PluginClass PluginLibrary "PluginClassConstructor(arguments)" +Plugin.BaseClass: URI2 PluginClass2 PluginLibrary2 "PluginClass2Constructor(arguments)"
then KVBase::GetListOfPlugins("BaseClass") will return "PluginClass PluginClass2"
Most of the code is copied from TPluginManager::LoadHandlersFromEnv
Definition at line 1260 of file KVBase.cpp.
For a given base class, return a whitespace-separated list of plugin identifiers which are known/defined. E.g. if plugins exist for BaseClass:
Plugin.BaseClass: URI PluginClass PluginLibrary "PluginClassConstructor(arguments)" +Plugin.BaseClass: URI2 PluginClass2 PluginLibrary2 "PluginClass2Constructor(arguments)"
then KVBase::GetListOfPluginURIs("BaseClass") will return "URI URI2"
Definition at line 1327 of file KVBase.cpp.
|
virtual |
Dummy method (returns NULL). This method may be used in 'container' classes used with KVListView. In order to open the context menu of the 'contained' object, GetLabel() should return the real class of the object, and this method should return its address. Then call KVListView::SetUseObjLabelAsRealClass(kTRUE).
Reimplemented in KVHistogram.
Definition at line 1560 of file KVBase.cpp.
Inverse of gPluginMgr->FindHandler(const Char_t* base, const Char_t* uri)
Given a base class base
and a derived class derived
, we search gEnv
to find the URI corresponding to this plugin.
Example: given a plugin such as
then calling KVBase::GetPluginURI("KVIDTelescope", "KVIDPhoswich")
will return "PHOS"
.
Most of the code is copied from TPluginManager::LoadHandlersFromEnv
Definition at line 1177 of file KVBase.cpp.
When called with base="toto.dat", the returned value of 'base' is "/full/path/to/temp/dir/toto.dat15930693" i.e. the full path to a file in the system temp directory (gSystem->TempDirectory) appended with the current time as returned by gSystem->Now() in order to make its name unique
Definition at line 848 of file KVBase.cpp.
Definition at line 83 of file KVBase.cpp.
|
inlinevirtual |
Reimplemented in KVDetectorSignal.
Definition at line 127 of file KVBase.cpp.
|
static |
Returns git branch of sources.
Definition at line 964 of file KVBase.cpp.
|
static |
Returns last git commit of sources.
Definition at line 976 of file KVBase.cpp.
Default initialisation.
Definition at line 138 of file KVBase.cpp.
|
static |
STATIC method to Initialise KaliVeda environment Reads config files in $(pkgdatadir)/etc
and sets up environment (data repositories, datasets, etc. etc.). Adds directory where kaliveda shared libs are installed to the dynamic path - for finding and loading plugins. Resets the gRandom
random number sequence using a clock-based seed (i.e. random sequences do not repeat).
Normally, the first object created which inherits from KVBase will perform this initialisation; if you need to set up the environment before creating a KVBase object, or if you just want to be absolutely sure that the environment has been initialised, you can call this method.
If KaliVeda is built with the cmake option -Dgnuinstall=yes
then each user will have a working directory which will be used to store any files generated by KaliVeda at runtime.
By default the location of user's working directory is set to
but can be changed with variable
in configuration file .kvrootrc
. [directory]
must be an absolute pathname, but can use shell variables like $(HOME)
.
Definition at line 181 of file KVBase.cpp.
|
inlinestatic |
Returns kTRUE if 'uri' is the name of a defined plugin, in which case 'base' is the name of the base class extended by this plugin.
Most of the code is copied from TPluginManager::LoadHandlersFromEnv
Definition at line 1357 of file KVBase.cpp.
|
static |
Load plugin library in order to extend capabilities of base class "base", depending on the given uri (these arguments are used to call TPluginManager::FindHandler). Returns pointer to TPluginHandler. Returns 0 in case of problems. does plugin exist for given name ?
Definition at line 793 of file KVBase.cpp.
|
static |
Open context menu for given method of object *obj. By default title of menu is 'obj->ClassName()::method' You can give an alternative method name in 'alt_method_name' Returns kFALSE if the given method is not defined for the class of object in question.
WARNING: even if this method returns kTRUE, this is no guarantee that the method has indeed been executed. The user may have pressed the 'Cancel' button...
Definition at line 1495 of file KVBase.cpp.
Opens a uniquely-named file in system temp directory (gSystem->TempDirectory) Name of file is "basexxxxxxxxxx" where "xxxxxxxxx" is current time as returned by gSystem->Now(). After opening file, 'base' contains full path to file.
Definition at line 827 of file KVBase.cpp.
copy assignment operator
Definition at line 355 of file KVBase.cpp.
Reimplemented from TObject.
Reimplemented in KVFAZIATrigger, INDRAGeometryBuilder, KV_CCIN2P3_GE, KV_CCIN2P3_Slurm, KVBatchSystem, KVClassFactory::KVClassMember, KVClassFactory::KVClassMethod, KVDataPatch, KVDataPatchList, KVFlowTensor, KVVarGlob, KVIDGridManager, KVImpactParameters::bayesian_estimator< FittingFunction, FluctuationKernel >, KVElasticScatterEvent, KVedaLoss, KVIonRangeTable, KVIonRangeTableMaterial, KVRangeYanez, KVAutoFit, KVLightEnergyCsIFull, KVEBYEDAT_ACQParam, KVDataAnalysisTask, KVDataRepository, KVDataSet, KV2Body, KVDataQualityAudit, KVIDTelescope, KVCalibrator, KVCaloBase, KVIdentificationResult, KVTemplateParticleCondition< ParticleType >, KVTemplateParticleCondition< KVNucleus >, KVTemplateParticleCondition< Particle >, KVTarget, KVINDRAReconEvent, KVReconstructedEvent, KVDetector, KVGeoStrucElement, KVMaterial, KVTemplateEvent< Particle >, KVTemplateEvent< KVReconstructedNucleus >, KVTemplateEvent< KVSimNucleus >, KVDetectorEvent, KVSimEvent, and KVTestEvent.
Definition at line 410 of file KVBase.cpp.
|
static |
Prints welcome message and infos on version etc.
Definition at line 1593 of file KVBase.cpp.
Double_t KVBase::ProtectedGetX | ( | const TF1 * | func, |
Double_t | val, | ||
int & | status, | ||
Double_t | xmin = 0.0 , |
||
Double_t | xmax = 0.0 |
||
) | const |
Since ROOT6, the TF1::GetX() method can no longer be used without precaution.
In ROOT5, if the value val was larger or smaller than the maximum or minimum value of the function (within its defined range) then TF1::GetX() would return X of the maximum or minimum, respectively.
In ROOT6, TF1::GetX() has been reimplemented so that, in the above case, it prints out 3 warning messages and returns a TMath::QuietNaN()! Therefore we provide this function in order to replicate the previous behaviour.
The status = 0 if the value is within the limits of the function. status = +1 if value is above the maximum, or status = -1 if value is below the minimum
When compiled with ROOT5, this method just calls TF1::GetX() (and status = 0 always).
Definition at line 1691 of file KVBase.cpp.
|
staticprivate |
Read all configuration files System config files are read first in the order they appear in file ${ETCDIR}/config.files Then we read any of the following files if they exist: ${HOME}/.kvrootrc ${PWD}/.kvrootrc
Definition at line 272 of file KVBase.cpp.
|
staticprivate |
Add to standard ROOT mime types some new ones defined in .kvrootrc
for icons associated with graphs, runs, etc. by lines such as:
etc.
Definition at line 1397 of file KVBase.cpp.
|
static |
Search and open for reading/writing a sqlite database file:
search for file (and open it, if found) in the following order: if 'name' = absolute path the function returns kTRUE if the file exists if name != absolute path:
Definition at line 649 of file KVBase.cpp.
|
static |
|
static |
|
static |
search for files in the following order: if 'name' = absolute path the function returns kTRUE if the file exists if name != absolute path:
Definition at line 538 of file KVBase.cpp.
Reimplemented in KVINDRADetector, and KVDetectorSignal.
|
inlinestatic |
|
staticprivate |