KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVDetectorSignal.cpp
Go to the documentation of this file.
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
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char Char_t
const char Option_t
int type
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
Definition: KVBase.h:141
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:159
virtual const char * GetName() const
virtual const char * ClassName() const