KaliVeda
Toolkit for HIC analysis
KVFAZIARawEvent.cpp
1 //Created by KVClassFactory on Wed Jul 15 11:54:35 2015
2 //Author: ,,,
3 
4 #include "KVFAZIARawEvent.h"
5 
7 
8 // BEGIN_HTML <!--
10 /* -->
11 <h2>KVFAZIARawEvent</h2>
12 <h4>Handle list of signals and additional information coming from acquisition file</h4>
13 <!-- */
14 // --> END_HTML
16 
17 
18 
22 {
23  // Default constructor
24  fSignals = new TClonesArray("KVSignal", ntot);
25  fValues = new KVNameValueList();
26  fNumber = -1;
27 }
28 
29 
30 
33 
35 {
36  // Default constructor
37  fSignals = new TClonesArray("KVSignal", 10);
38  fValues = new KVNameValueList();
39  fNumber = -1;
40 }
41 
42 
43 
46 
48 {
49  // Destructor
50  delete fSignals;
51  delete fValues;
52 }
53 
54 
55 
56 
64 
66 {
67  // This method copies the current state of 'this' object into 'obj'
68  // You should add here any member variables, for example:
69  // (supposing a member variable KVFAZIARawEvent::fToto)
70  // CastedObj.fToto = fToto;
71  // or
72  // CastedObj.SetToto( GetToto() );
73 
74  TObject::Copy(obj);
75  //KVFAZIARawEvent& CastedObj = (KVFAZIARawEvent&)obj;
76 }
77 
78 
79 
82 
84 {
85  //Info("Clear","IsCalled");
86  fSignals->Clear();
87  fValues->Clear();
88 }
89 
90 
91 
93 
95 {
97  sig->SetNameTitle(name.Data(), title.Data());
98  return sig;
99 
100 }
101 
102 
104 
105 const Char_t* KVFAZIARawEvent::GetFPGAEnergy(Int_t blk, Int_t qua, Int_t tel, TString signaltype, Int_t idx)
106 {
107 
108  TString sene = "";
109 // sene.Form("ENER%d-B%03d-Q%d-T%d-%s", idx, blk, qua, tel, signaltype.Data()); -> old detector names...
110  sene.Form("ENER%d-%s-%d", idx, signaltype.Data(), 100 * blk + 10 * qua + tel);
111  //rustines for RUTHERFORD Telescope
112  if (blk == 0 && qua == 0 && tel == 0)
113  sene.Form("ENER%d-RUTH-%s", idx, signaltype.Data());
114 
115  if (fValues->HasParameter(sene.Data()))
116  return fValues->GetStringValue(sene.Data());
117  else
118  return "0.0";
119 
120 }
121 
122 
123 
128 
130 {
131  // Customised Streamer for KVFAZIARawEvent.
132  // This is just the automatic Streamer with the addition of a call to the Clear()
133  // method before reading a new object (avoid memory leaks with lists of parameters).
134 
135  if (R__b.IsReading()) {
136  Clear();
138  }
139  else {
141  }
142 }
143 
144 
int Int_t
char Char_t
const char Option_t
char name[80]
Obsolete raw data class for FAZIA.
void Copy(TObject &obj) const
TClonesArray * fSignals
array where signals are storred
KVNameValueList * fValues
list of values
KVSignal * AddNewSignal(KVString name, KVString title)
KVFAZIARawEvent()
Default constructor.
void Clear(Option_t *="")
Info("Clear","IsCalled");.
virtual ~KVFAZIARawEvent()
Destructor.
Int_t fNumber
event number
const Char_t * GetFPGAEnergy(Int_t blk, Int_t qua, Int_t tel, TString signaltype, Int_t idx=0)
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Clear(Option_t *opt="")
const Char_t * GetStringValue(const Char_t *name) const
Bool_t HasParameter(const Char_t *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
Bool_t IsReading() const
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void Clear(Option_t *option="") override
TObject * ConstructedAt(Int_t idx)
void SetNameTitle(const char *name="", const char *title="") override
Int_t GetEntries() const override
friend friend class TClonesArray
virtual void Streamer(TBuffer &)
static TClass * Class()
virtual void Copy(TObject &object) const
const char * Data() const
void Form(const char *fmt,...)
#define blk(block, i)
ClassImp(TPyArg)