KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
GTScalers.cpp
1/***************************************************************************/
2// GTGanilData.cpp - Main Header to ROOTGAnilTape
3// -------------------
4// begin : Thu Jun 14 2001
5// copyright : (C) 2001 by Garp
6// email : patois@ganil.fr
7
8
9#include "Riostream.h"
10#include "GanTape/GEN_TYPE.H"
11#include "GanTape/gan_acq_buf.h"
12
13// Problem (for me?) in gan_acq_buf :
14// What the use of defining struct inside other structs ?
15// Then, theyr definition remain local and I have to do it again here:
16
18
19typedef struct SCALE {
20 UNSINT32 Length; /* Nb bytes utils suivant ce mot */
21 UNSINT32 Nb_channel;
22 UNSINT32 Acq_status;
23 UNSINT32 Reserve[2];
24 union JBUS_SCALE {
25 scale_struct UnScale[NB_MAX_CHANNEL];
26 UNSINT16 Info_jbus [NB_MAX_JBUS];
27 } jbus_scale;
28} scale;
29
30//}
31
32#include <TMath.h>
33#include "GTScalers.h"
34#include "GTOneScaler.h"
35
36using namespace std;
37
39
40
41
42
44 : fScalerArray("GTOneScaler", 256)
45{
46 fNbChannel = -1; // Initialisation Marker
47}
48
49
50
52
56
57
58
60
61void GTScalers::Fill(void* echelle)
62{
63
65 scale* s = (scale*)echelle;
66// cout <<s->Length<<endl;
67// cout <<s->Nb_channel<<endl; // This is number of actual scalers
68// cout <<s->Acq_status<<endl;
69
70 fNbChannel = s->Nb_channel;
71
72 for (Int_t i = 0; i < fNbChannel; i++) {
74 scal->Set(&(s->jbus_scale.UnScale[i]));
75 }
76}
77
78
79
82
84{
85 // Dump scalers value on cout
86
87 cout << "Dumping " << fNbChannel << " scalers" << endl;
88 for (Int_t i = 0; i < fNbChannel; i++) {
89 fScalerArray[i]->ls();
90 }
91}
92
93
94
97
99{
100 // Return a constant pointer to the Scaler Index
101 return ((GTOneScaler*)fScalerArray[index]);
102}
103
104
int Int_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Scaler class for the scaler structure.
Definition GTOneScaler.h:36
void Set(scale_struct *s)
Handle scaler buffers in GANIL DAQ data.
Definition GTScalers.h:34
const GTOneScaler * GetScalerPtr(Int_t index) const
Return a constant pointer to the Scaler Index.
Definition GTScalers.cpp:98
TClonesArray fScalerArray
Array of scalers.
Definition GTScalers.h:49
Int_t fNbChannel
Number of individual scales.
Definition GTScalers.h:48
~GTScalers(void)
Definition GTScalers.cpp:53
void Fill(void *)
Definition GTScalers.cpp:61
void DumpScalers(void)
Dump scalers value on cout.
Definition GTScalers.cpp:83
void Clear(Option_t *option="") override
TObject * ConstructedAt(Int_t idx)
void ls(Option_t *option="") const override
UNSINT32 Reserve[2]
UNSINT32 Length
UNSINT32 Acq_status
union SCALE::JBUS_SCALE jbus_scale
UNSINT32 Nb_channel
ClassImp(TPyArg)
UNSINT16 Info_jbus[NB_MAX_JBUS]
scale_struct UnScale[NB_MAX_CHANNEL]