MiniballSort
Loading...
Searching...
No Matches
DataPackets.hh
Go to the documentation of this file.
1#ifndef __DATAPACKETS_HH
2#define __DATAPACKETS_HH
3
4#include <memory>
5
6#include "TObject.h"
7#include "TVector.h"
8#include "TGraph.h"
9
10class PatternUnitData : public TObject {
11
12public:
13
14 PatternUnitData( unsigned char _mod, unsigned char _id, unsigned int _val ){
15 mod = _mod;
16 id = _id;
17 val = _val;
18 };
20 mod = 255;
21 id = 255;
22 val = 0;
23 };
25
26 void ClearData();
27
28 // Setters
29 inline void SetPattern( unsigned char _mod, unsigned char _id, unsigned int _val ){
30 mod = _mod;
31 id = _id;
32 val = _val;
33 };
34
35 // Getters
36 inline unsigned char GetModule(){ return mod; };
37 inline unsigned char GetID(){ return id; };
38 inline unsigned int GetValue(){ return val; };
39
40protected:
41
42 unsigned char mod;
43 unsigned char id;
44 unsigned int val;
45
46 ClassDef( PatternUnitData, 1 )
47
48};
49
50class ScalerUnitData : public TObject {
51
52public:
53
54 ScalerUnitData( unsigned char _id, unsigned int _val ){
55 id = _id;
56 val = _val;
57 };
59 id = 255;
60 val = 0;
61 };
63
64 void ClearData();
65
66 // Setters
67 inline void SetScaler( unsigned char _id, unsigned int _val ){
68 id = _id;
69 val = _val;
70 };
71
72 // Getters
73 inline unsigned char GetID(){ return id; };
74 inline unsigned int GetValue(){ return val; };
75
76protected:
77
78 unsigned char id;
79 unsigned int val;
80
81 ClassDef( ScalerUnitData, 1 )
82
83};
84
85class DgfScalerData : public TObject {
86
87public:
88
90 DgfScalerData( unsigned short n ) : fNumberOfDgfChannels(n) {
91 fLiveTime.resize( n, 0 );
92 fFastPeak.resize( n, 0 );
93 };
95
96 void ClearData();
97
98 // Setters
99 inline void SetModule( unsigned short id ) { mod = id; };
100 inline void SetClusterID( unsigned short id ) { clu = id; };
101 inline void SetRealTime( long long time ){ fRealTime = time; };
102 inline void SetRunTime( long long time ) { fRunTime = time; };
103 inline void SetGSLTTime( long long time ) { fGSLTTime = time; };
104 inline void SetNumberOfEvents( unsigned short n ) { fNumberOfEvents = n; };
105 inline void SetLiveTime( unsigned short i, long long time ) {
106 if( i < fNumberOfDgfChannels ) fLiveTime[i] = time;
107 };
108 inline void SetFastPeak( unsigned short i, unsigned int fp ) {
109 if( i < fNumberOfDgfChannels ) fFastPeak[i] = fp;
110 };
111
112 // Getters
113 inline unsigned short GetModule(){ return mod; };
114 inline unsigned short GetCluster(){ return clu; };
115 inline long long GetRealTime(){ return fRealTime; };
116 inline long long GetRunTime() { return fRunTime; };
117 inline long long GetGSLTTime() { return fGSLTTime; };
118 inline unsigned short GetNumberOfEvents() { return fNumberOfEvents; };
119 inline long long GetLiveTime( unsigned short i ) {
120 if( i < fNumberOfDgfChannels ) return fLiveTime[i];
121 else return -1;
122 };
123 inline int SetFastPeak( unsigned short i ) {
124 if( i < fNumberOfDgfChannels ) return fFastPeak[i];
125 else return -1;
126 };
127
128protected:
129
130 unsigned short mod;
131 unsigned short clu;
132
133 long long fRealTime;
134 long long fRunTime;
135 long long fGSLTTime;
136 unsigned short fNumberOfEvents;
137 std::vector<long long> fLiveTime;
138 std::vector<int> fFastPeak;
139
140 unsigned short fNumberOfDgfChannels;
141
142 ClassDef( DgfScalerData, 1 )
143
144};
145
146class AdcData : public TObject {
147
148public:
149
152
153 void ClearData();
154
155 // Setters
156 inline void SetEventID( unsigned long long int id ) { eventid = id; };
157 inline void SetTime( long long t ){ time = t; };
158 inline void SetQshort( unsigned short q ){ Qshort = q; };
159 inline void SetEnergy( float e ){ energy = e; };
160 inline void SetModule( unsigned char m ){ mod = m; };
161 inline void SetChannel( unsigned char c ){ ch = c; };
162 inline void SetThreshold( bool t ){ thres = t; };
163 inline void SetClipped( bool c ){ clipped = c; };
164
165 // Getters
166 inline long long GetTime(){ return time; };
167 inline unsigned char GetModule(){ return mod; };
168 inline unsigned char GetChannel(){ return ch; };
169 inline unsigned long long int GetEventID() { return eventid; };
170 inline unsigned int GetQshort() { return Qshort; };
171 inline float GetEnergy() { return energy; };
172 inline bool IsOverThreshold() { return thres; };
173 inline bool IsClipped() { return clipped; };
174
175protected:
176
177 unsigned long long int eventid;
178 long long time;
179 float energy;
180 unsigned short Qshort;
181 unsigned char mod;
182 unsigned char ch;
183 bool thres;
184 bool clipped;
185
186 ClassDef( AdcData, 1 )
187
188};
189
190class DgfData : public TObject {
191
192public:
193
196
197 // Reset
198 void ClearData();
199
200 // Setters
201 inline void SetEventID( unsigned long long int id ) { eventid = id; };
202 inline void SetHitPattern( unsigned short hp ) { HitPattern = hp; };
203 inline void SetEventTime( long long time ){ EventTime = time; };
204 inline void SetQshort( unsigned short q ){ Qshort = q; };
205 inline void SetEnergy( float e ){ energy = e; };
206 inline void SetRunTime( unsigned short time ){ RunTime = time; };
207 inline void SetFastTriggerTime( unsigned short time ){ FastTriggerTime = time; };
208 inline void SetLongFastTriggerTime( long long time ){ LongFastTriggerTime = time; };
209 inline void SetUserValues( std::vector<unsigned short> q ) { UserValues = q; };
210 inline void SetTrace( std::vector<unsigned short> t ) { trace = t; };
211 inline void AddSample( unsigned short s ) { trace.push_back(s); };
212 inline void SetModule( unsigned char m ){ mod = m; };
213 inline void SetChannel( unsigned char c ){ ch = c; };
214 inline void SetThreshold( bool t ){ thres = t; };
215
216 // Getters
217 inline long long GetTime(){ return GetLongFastTriggerTime(); };
218 inline long long GetEventTime(){ return EventTime; };
219 inline long long GetLongFastTriggerTime(){ return LongFastTriggerTime; };
220 inline unsigned short GetFastTriggerTime(){ return FastTriggerTime; };
221 inline unsigned short GetRunTime(){ return RunTime; };
222 inline unsigned char GetModule(){ return mod; };
223 inline unsigned char GetChannel(){ return ch; };
224 inline unsigned long long int GetEventID() { return eventid; };
225 inline unsigned int GetQshort() { return Qshort; };
226 inline float GetEnergy() { return energy; };
227 inline unsigned short GetHitPattern(){ return HitPattern; };
228 inline std::vector<unsigned short> GetUserValues(){ return UserValues; };
229 inline bool IsOverThreshold() { return thres; };
230 inline unsigned short GetTraceLength() { return trace.size(); };
231 inline std::vector<unsigned short> GetTrace() { return trace; };
232 inline TGraph* GetTraceGraph() {
233 std::vector<int> x, y;
234 std::string title = "Trace for DGF Mod " + std::to_string( GetModule() );
235 title += ", Channel " + std::to_string( GetChannel() );
236 title += ";time [ns];signal";
237 for( unsigned short i = 0; i < GetTraceLength(); ++i ){
238 x.push_back( i * 10 );
239 y.push_back( GetSample(i) );
240 }
241 std::unique_ptr<TGraph> g = std::make_unique<TGraph>(
242 GetTraceLength(), x.data(), y.data() );
243 g.get()->SetTitle( title.data() );
244 return (TGraph*)g.get()->Clone();
245 };
246 inline unsigned short GetSample( unsigned int i = 0 ) {
247 if( i >= trace.size() ) return 0;
248 return trace.at(i);
249 };
250
251
252
253protected:
254
255 //long long int time
256 unsigned long long int eventid;
257 long long EventTime;
258 unsigned short RunTime;
259 float energy;
260 unsigned short Qshort;
261 unsigned short HitPattern;
262 unsigned short FastTriggerTime;
264 unsigned char mod;
265 unsigned char ch;
266 std::vector<unsigned short> UserValues;
267 std::vector<unsigned short> trace;
268 bool thres;
269
270
271 ClassDef( DgfData, 1 )
272
273};
274
275class FebexData : public TObject {
276
277public:
278
280 time = 0;
281 eventid = 0;
282 energy = 0;
283 Qint = 0;
284 Qshort = 0;
285 sfp = 0;
286 board = 0;
287 ch = 0;
288 };
289 FebexData( long long int t, unsigned long long int id,
290 unsigned int qi, unsigned short qs,
291 std::vector<unsigned short> tr,
292 unsigned char s, unsigned char b, unsigned char c,
293 bool th, bool p, bool cl, bool f );
295
296 inline long long int GetTime() { return time; };
297 inline unsigned long long int GetEventID() { return eventid; };
298 inline unsigned short GetTraceLength() { return trace.size(); };
299 inline unsigned short GetQshort() { return Qshort; };
300 inline unsigned int GetQint() { return Qint; };
301 inline unsigned char GetSfp() { return sfp; };
302 inline unsigned char GetBoard() { return board; };
303 inline unsigned char GetChannel() { return ch; };
304 inline float GetEnergy() { return energy; };
305 inline bool IsOverThreshold() { return thres; };
306 inline bool IsPileup() { return pileup; };
307 inline bool IsClipped() { return clipped; };
308 inline bool HasFlag() { return flagbit; };
309 inline std::vector<unsigned short> GetTrace() { return trace; };
310 inline TGraph* GetTraceGraph() {
311 std::vector<int> x, y;
312 std::string title = "Trace for SFP " + std::to_string( GetSfp() );
313 title += ", Board " + std::to_string( GetBoard() ) + ", Channel ";
314 title += std::to_string( GetChannel() ) + ";time [ns];signal";
315 for( unsigned short i = 0; i < GetTraceLength(); ++i ){
316 x.push_back( i * 10 );
317 y.push_back( GetSample(i) );
318 }
319 std::unique_ptr<TGraph> g = std::make_unique<TGraph>(
320 GetTraceLength(), x.data(), y.data() );
321 g.get()->SetTitle( title.data() );
322 return (TGraph*)g.get()->Clone();
323 };
324 inline unsigned short GetSample( unsigned int i = 0 ) {
325 if( i >= trace.size() ) return 0;
326 return trace.at(i);
327 };
328
329 inline void SetTime( long long int t ) { time = t; };
330 inline void SetEventID( unsigned long long int id ) { eventid = id; };
331 inline void SetTrace( std::vector<unsigned short> t ) { trace = t; };
332 inline void AddSample( unsigned short s ) { trace.push_back(s); };
333 inline void SetQshort( unsigned short q ) { Qshort = q; };
334 inline void SetQint( unsigned int q ) { Qint = q; };
335 inline void SetSfp( unsigned char s ){ sfp = s; };
336 inline void SetBoard( unsigned char b ){ board = b; };
337 inline void SetChannel( unsigned char c ) { ch = c; };
338 inline void SetEnergy( float e ){ energy = e; };
339 inline void SetThreshold( bool t ){ thres = t; };
340 inline void SetPileup( bool p ){ pileup = p; };
341 inline void SetClipped( bool cl ){ clipped = cl; };
342 inline void SetFlag( bool f ){ flagbit = f; };
343
344 inline void ClearTrace() { trace.clear(); };
345 void ClearData();
346
347protected:
348
349 long long int time;
350 unsigned long long int eventid;
351 float energy;
352 unsigned int Qint;
353 unsigned short Qshort;
354 std::vector<unsigned short> trace;
355 unsigned char sfp;
356 unsigned char board;
357 unsigned char ch;
358 bool thres;
359 bool pileup;
360 bool clipped;
361 bool flagbit;
362
363
364 ClassDef( FebexData, 7 )
365
366};
367
368class InfoData : public TObject {
369
370public:
371
373 time = 0;
374 eventid = 0;
375 code = 0;
376 sfp = 0;
377 board = 0;
378 };
379 InfoData( long long int t, unsigned long long int id, unsigned char s, unsigned char b, unsigned char m );
381
382 inline long long int GetTime(){ return time; };
383 inline unsigned long long int GetEventID(){ return eventid; };
384 inline unsigned char GetCode(){ return code; };
385 inline unsigned char GetSfp(){ return sfp; };
386 inline unsigned char GetBoard(){ return board; };
387
388 inline void SetTime( long long int t ){ time = t; };
389 inline void SetEventID( unsigned long long int id ){ eventid = id; };
390 inline void SetCode( unsigned char c ){ code = c; };
391 inline void SetSfp( unsigned char s ){ sfp = s; };
392 inline void SetBoard( unsigned char b ){ board = b; };
393
394 void ClearData();
395
396protected:
397
398 long long int time;
399 unsigned long long int eventid;
400 unsigned char code;
401 unsigned char sfp;
402 unsigned char board;
406
407
408 ClassDef( InfoData, 12 )
409
410};
411
412class MiniballDataPackets : public TObject {
413
414public:
415
418
419 MiniballDataPackets( std::shared_ptr<MiniballDataPackets> in ) { SetData(in); };
420 MiniballDataPackets( std::shared_ptr<DgfData> in ){ SetData(in); };
421 MiniballDataPackets( std::shared_ptr<AdcData> in ){ SetData(in); };
422 MiniballDataPackets( std::shared_ptr<FebexData> in ){ SetData(in); };
423 MiniballDataPackets( std::shared_ptr<InfoData> in ){ SetData(in); };
424
425 inline bool IsDgf() const { return dgf_packets.size(); };
426 inline bool IsAdc() const { return adc_packets.size(); };
427 inline bool IsFebex() const { return febex_packets.size(); };
428 inline bool IsInfo() const { return info_packets.size(); };
429
430 void SetData( std::shared_ptr<MiniballDataPackets> in ){
431 if( in->IsDgf() ) SetData( in->GetDgfData() );
432 if( in->IsAdc() ) SetData( in->GetAdcData() );
433 if( in->IsFebex() ) SetData( in->GetFebexData() );
434 if( in->IsInfo() ) SetData( in->GetInfoData() );
435 };
436 void SetData( std::shared_ptr<DgfData> data );
437 void SetData( std::shared_ptr<AdcData> data );
438 void SetData( std::shared_ptr<FebexData> data );
439 void SetData( std::shared_ptr<InfoData> data );
440
441 // These methods are not very safe for access
442 inline std::shared_ptr<DgfData> GetDgfData() const {
443 return std::make_shared<DgfData>( dgf_packets.at(0) );
444 };
445 inline std::shared_ptr<AdcData> GetAdcData() const {
446 return std::make_shared<AdcData>( adc_packets.at(0) );
447 };
448 inline std::shared_ptr<FebexData> GetFebexData() const {
449 return std::make_shared<FebexData>( febex_packets.at(0) );
450 };
451 inline std::shared_ptr<InfoData> GetInfoData() const {
452 return std::make_shared<InfoData>( info_packets.at(0) );
453 };
454
455 // Complicated way to get the time...
456 unsigned long long int GetEventID() const;
457 long long int GetTime() const;
458 UInt_t GetTimeMSB() const;
459 UInt_t GetTimeLSB() const;
460 unsigned char GetSfp() const;
461 unsigned char GetBoard() const;
462 unsigned char GetModule() const;
463 unsigned char GetChannel() const;
464
465 // Sorting function to do time ordering
466 bool operator <( const MiniballDataPackets &rhs ) const {
467 return( GetTime() < rhs.GetTime() );
468 };
469
470 void ClearData();
471
472protected:
473
474 std::vector<DgfData> dgf_packets;
475 std::vector<AdcData> adc_packets;
476 std::vector<FebexData> febex_packets;
477 std::vector<InfoData> info_packets;
478
479 ClassDef( MiniballDataPackets, 5 )
480
481};
482
483
484class MBSInfoPackets : public TObject {
485
486public:
487
489 time = 0;
490 eventid = 0;
491 std::vector<PatternUnitData>().swap(patterns);
492 std::vector<ScalerUnitData>().swap(scalers);
493 std::vector<DgfScalerData>().swap(dgfscalers);
494 };
496
497 void ClearData();
498
499 inline long long int GetTime(){ return time; };
500 inline unsigned long long int GetEventID(){ return eventid; };
501
502 inline void SetTime( long long int t ){ time = t; };
503 inline void SetEventID( unsigned long long int id ){ eventid = id; };
504
505 // Patterns
506 inline void AddPattern( PatternUnitData p ){
507 patterns.push_back(p);
508 };
509 inline void AddPattern( unsigned char _mod, unsigned char _id, unsigned int _val ){
510 PatternUnitData tmp(_mod,_id,_val);
511 AddPattern(tmp);
512 };
513 inline unsigned int GetPatternValue( unsigned char mod, unsigned char id ){
514 unsigned int tmp = 0;
515 for( unsigned int i = 0; i < patterns.size(); i++ ){
516 if( patterns[i].GetModule() == mod && patterns[i].GetID() == id ) {
517 tmp = patterns[i].GetValue();
518 break;
519 }
520 }
521 return tmp;
522 };
523 inline unsigned int GetPatternValue( unsigned char id ){
524 unsigned int tmp = 0;
525 for( unsigned int i = 0; i < patterns.size(); i++ ){
526 if( patterns[i].GetID() == id ) {
527 tmp = patterns[i].GetValue();
528 break;
529 }
530 }
531 return tmp;
532 };
533 inline PatternUnitData GetPattern( unsigned char id ){
534 PatternUnitData tmp;
535 for( unsigned int i = 0; i < patterns.size(); i++ ){
536 if( patterns[i].GetID() == id ) {
537 tmp = patterns[i];
538 break;
539 }
540 }
541 return tmp;
542 };
543
544 // Scalers
545 inline void AddScaler( ScalerUnitData s ){ scalers.push_back(s); };
546 inline void AddScaler( unsigned char _id, unsigned int _val ){
547 ScalerUnitData tmp(_id,_val);
548 AddScaler(tmp);
549 };
550 inline unsigned int GetScalerValue( unsigned char id ){
551 unsigned int tmp = 0;
552 for( unsigned int i = 0; i < scalers.size(); i++ ){
553 if( scalers[i].GetID() == id ) {
554 tmp = scalers[i].GetValue();
555 break;
556 }
557 }
558 return tmp;
559 };
560 inline ScalerUnitData GetScaler( unsigned char id ){
561 ScalerUnitData tmp;
562 for( unsigned int i = 0; i < scalers.size(); i++ ){
563 if( scalers[i].GetID() == id ) {
564 tmp = scalers[i];
565 break;
566 }
567 }
568 return tmp;
569 };
570
571 // DGF Scalers
572 inline void AddDgfScaler( DgfScalerData s ){
573 dgfscalers.push_back(s);
574 };
575 DgfScalerData GetDgfScaler( unsigned char mod ){
576 DgfScalerData tmp;
577 for( unsigned int i = 0; i < dgfscalers.size(); i++ ){
578 if( dgfscalers[i].GetModule() == mod ) {
579 tmp = dgfscalers[i];
580 break;
581 }
582 }
583 return tmp;
584 };
585
586
587 protected:
588
589 long long int time;
590 unsigned long long int eventid;
591 std::vector<PatternUnitData> patterns;
592 std::vector<ScalerUnitData> scalers;
593 std::vector<DgfScalerData> dgfscalers;
594
595 ClassDef( MBSInfoPackets, 4 )
596
597};
598
599
600#endif
unsigned int GetQshort()
bool clipped
is the ADC value over range?
void SetClipped(bool c)
void SetThreshold(bool t)
void SetEnergy(float e)
long long time
unsigned short Qshort
unsigned char GetChannel()
void SetTime(long long t)
bool thres
is the energy over threshold?
float energy
float GetEnergy()
unsigned char mod
module number of ADC
long long GetTime()
unsigned char GetModule()
void ClearData()
bool IsClipped()
void SetQshort(unsigned short q)
void SetEventID(unsigned long long int id)
void SetModule(unsigned char m)
unsigned long long int eventid
void SetChannel(unsigned char c)
bool IsOverThreshold()
unsigned long long int GetEventID()
unsigned char ch
channel number of ADC
void SetRunTime(unsigned short time)
unsigned short HitPattern
unsigned long long int GetEventID()
void SetTrace(std::vector< unsigned short > t)
void SetEventID(unsigned long long int id)
unsigned short GetTraceLength()
void SetThreshold(bool t)
unsigned short Qshort
unsigned short GetHitPattern()
bool IsOverThreshold()
unsigned short RunTime
std::vector< unsigned short > UserValues
unsigned short GetRunTime()
long long LongFastTriggerTime
long long EventTime
void SetUserValues(std::vector< unsigned short > q)
void SetHitPattern(unsigned short hp)
void SetLongFastTriggerTime(long long time)
unsigned char GetChannel()
long long GetEventTime()
TGraph * GetTraceGraph()
bool thres
is the energy over threshold?
long long GetLongFastTriggerTime()
unsigned long long int eventid
std::vector< unsigned short > trace
void SetChannel(unsigned char c)
std::vector< unsigned short > GetTrace()
unsigned char mod
module number of DGF
long long GetTime()
unsigned char ch
channel number of DGF
unsigned short GetSample(unsigned int i=0)
float energy
unsigned short GetFastTriggerTime()
unsigned short FastTriggerTime
void SetFastTriggerTime(unsigned short time)
void SetEnergy(float e)
void AddSample(unsigned short s)
void ClearData()
void SetQshort(unsigned short q)
void SetEventTime(long long time)
std::vector< unsigned short > GetUserValues()
float GetEnergy()
unsigned char GetModule()
void SetModule(unsigned char m)
unsigned int GetQshort()
long long fRunTime
long long GetRealTime()
DgfScalerData(unsigned short n)
long long GetLiveTime(unsigned short i)
std::vector< int > fFastPeak
unsigned short clu
cluster ID
unsigned short GetModule()
unsigned short GetNumberOfEvents()
void SetGSLTTime(long long time)
unsigned short fNumberOfEvents
int SetFastPeak(unsigned short i)
long long GetGSLTTime()
void SetModule(unsigned short id)
unsigned short GetCluster()
std::vector< long long > fLiveTime
void SetNumberOfEvents(unsigned short n)
long long fRealTime
void SetRealTime(long long time)
unsigned short fNumberOfDgfChannels
void SetFastPeak(unsigned short i, unsigned int fp)
void SetClusterID(unsigned short id)
unsigned short mod
DGF module being read.
void SetLiveTime(unsigned short i, long long time)
long long GetRunTime()
long long fGSLTTime
void SetRunTime(long long time)
long long int GetTime()
bool flagbit
additional flag bit from data stream
void SetEventID(unsigned long long int id)
unsigned short GetTraceLength()
void SetTrace(std::vector< unsigned short > t)
void SetQshort(unsigned short q)
bool pileup
pileup flag from data stream
void SetTime(long long int t)
bool IsClipped()
void SetEnergy(float e)
bool IsPileup()
bool IsOverThreshold()
void SetClipped(bool cl)
void SetBoard(unsigned char b)
std::vector< unsigned short > GetTrace()
unsigned short Qshort
Charge from firmware as 16-bit integer.
void AddSample(unsigned short s)
unsigned char sfp
SFP ID of the event.
unsigned int GetQint()
unsigned long long int eventid
void SetSfp(unsigned char s)
unsigned short GetQshort()
void SetChannel(unsigned char c)
long long int time
unsigned short GetSample(unsigned int i=0)
void SetThreshold(bool t)
unsigned char ch
channel ID of the event
unsigned char GetBoard()
std::vector< unsigned short > trace
TGraph * GetTraceGraph()
bool HasFlag()
void SetFlag(bool f)
bool clipped
clipped pulse flag from data stream
void SetQint(unsigned int q)
void SetPileup(bool p)
unsigned char board
board ID of the event
void ClearData()
unsigned long long int GetEventID()
unsigned char GetChannel()
void ClearTrace()
float GetEnergy()
bool thres
is the energy over threshold?
unsigned char GetSfp()
FebexData(long long int t, unsigned long long int id, unsigned int qi, unsigned short qs, std::vector< unsigned short > tr, unsigned char s, unsigned char b, unsigned char c, bool th, bool p, bool cl, bool f)
unsigned int Qint
Charge from firmware as 32-bit integer.
unsigned char GetSfp()
void SetSfp(unsigned char s)
long long int GetTime()
unsigned char GetCode()
void SetBoard(unsigned char b)
long long int time
timestamp of info event
unsigned char GetBoard()
void ClearData()
unsigned char code
code here represents which information timestamp we have
unsigned long long int eventid
timestamp of info event
void SetTime(long long int t)
void SetCode(unsigned char c)
unsigned char sfp
SFP ID of the event.
unsigned long long int GetEventID()
void SetEventID(unsigned long long int id)
unsigned char board
unsigned int GetPatternValue(unsigned char mod, unsigned char id)
std::vector< DgfScalerData > dgfscalers
DGF scaler data.
DgfScalerData GetDgfScaler(unsigned char mod)
PatternUnitData GetPattern(unsigned char id)
unsigned int GetPatternValue(unsigned char id)
unsigned int GetScalerValue(unsigned char id)
long long int time
timestamp of info event
void AddDgfScaler(DgfScalerData s)
unsigned long long int eventid
timestamp of info event
void SetEventID(unsigned long long int id)
ScalerUnitData GetScaler(unsigned char id)
long long int GetTime()
std::vector< ScalerUnitData > scalers
scaler unit data
void AddPattern(PatternUnitData p)
void AddScaler(ScalerUnitData s)
void SetTime(long long int t)
unsigned long long int GetEventID()
std::vector< PatternUnitData > patterns
pattern unit data
void AddPattern(unsigned char _mod, unsigned char _id, unsigned int _val)
void AddScaler(unsigned char _id, unsigned int _val)
unsigned char GetSfp() const
unsigned char GetBoard() const
std::vector< InfoData > info_packets
MiniballDataPackets(std::shared_ptr< InfoData > in)
MiniballDataPackets(std::shared_ptr< FebexData > in)
void SetData(std::shared_ptr< MiniballDataPackets > in)
MiniballDataPackets(std::shared_ptr< MiniballDataPackets > in)
unsigned long long int GetEventID() const
std::vector< FebexData > febex_packets
std::shared_ptr< InfoData > GetInfoData() const
unsigned char GetChannel() const
bool IsInfo() const
std::vector< DgfData > dgf_packets
std::vector< AdcData > adc_packets
bool operator<(const MiniballDataPackets &rhs) const
std::shared_ptr< FebexData > GetFebexData() const
bool IsFebex() const
UInt_t GetTimeLSB() const
std::shared_ptr< DgfData > GetDgfData() const
UInt_t GetTimeMSB() const
MiniballDataPackets(std::shared_ptr< AdcData > in)
MiniballDataPackets(std::shared_ptr< DgfData > in)
std::shared_ptr< AdcData > GetAdcData() const
long long int GetTime() const
unsigned char GetModule() const
unsigned char GetID()
PatternUnitData(unsigned char _mod, unsigned char _id, unsigned int _val)
unsigned char GetModule()
unsigned char id
ID of the channel/pattern being read.
unsigned int val
value of the pattern
void SetPattern(unsigned char _mod, unsigned char _id, unsigned int _val)
unsigned char mod
module number of the pattern being read
unsigned int GetValue()
void SetScaler(unsigned char _id, unsigned int _val)
unsigned char GetID()
ScalerUnitData(unsigned char _id, unsigned int _val)
unsigned int val
value of the pattern
unsigned int GetValue()
unsigned char id
ID of the channel/scaler being read.