KaliVeda
Toolkit for HIC analysis
KVDetectorSignal.cpp
1 //Created by KVClassFactory on Wed Jun 5 17:00:08 2019
2 //Author: John Frankland,,,
3 
4 #include "KVDetectorSignal.h"
5 #include "KVDetector.h"
6 
8 
9 
10 
16  : KVBase(type), fDetector(det), fValue(0), fFired(false)
17 {
18  // Constructor
19  // \param[in] type defines the name of the signal
20  // \param[in] det [optional] if given, detector to which signal is associated
21 
22  if (det) SetTitle(Form("Signal %s of detector %s", type, det->GetName()));
23  else SetTitle(Form("Detector signal %s", type));
24 }
25 
26 
27 
30 
32 {
33  // Print compact listing of infos on signal: name/type, associated detector, value
34  double value = -1;
35  // if value can be calculated without supplementary parameters, we print it
36  if (IsAvailableFor("")) value = GetValue();
37  printf(" %-15s\t%-32s\t%-80s\t[%lf]\t%s\n", GetName(), ClassName(), GetType(), value, IsFired() ? "*FIRED*" : "");
38 }
39 
40 
41 
44 
46 {
47  // Override in child classes to report on the 'status' of the signal.
48  return -1;
49 }
50 
51 
52 
55 
57 {
58  // \returns full name of detector signal, i.e. `[detector].[signal-type]` if associated to a detector, or `[signal-type]` if not.
59  if (fDetector)
60  return Form("%s.%s", fDetector->GetName(), GetName());
61  return GetName();
62 }
63 
64 
65 
int Int_t
char Char_t
const char Option_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
Definition: KVBase.h:142
Base class for output signal data produced by a detector.
virtual Int_t GetStatus(const TString &) const
Override in child classes to report on the 'status' of the signal.
const KVDetector * fDetector
associated detector
virtual Double_t GetValue(const KVNameValueList &params="") const
const Char_t * GetType() const
void ls(Option_t *="") const
Print compact listing of infos on signal: name/type, associated detector, value.
TString GetFullName() const
Bool_t IsFired() const
virtual Bool_t IsAvailableFor(const KVNameValueList &) const
Base class for detector geometry description.
Definition: KVDetector.h:160
const char * GetName() const override
virtual const char * ClassName() const
ClassImp(TPyArg)