ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtCore2.cxx
Go to the documentation of this file.
1 // =================================================
2 // AtCore Class
3 // Original author : Genie Jhang ( geniejhang@majimak.com )
4 // Adapted for AtTPCROOT by Y. Ayyad (ayyadlim@nscl.msu.edu)
5 // =================================================
6 
7 #include "AtCore2.h"
8 
9 #include <FairLogger.h>
10 
11 #include "GETCoboFrame.h"
12 #include "GETLayeredFrame.h"
13 
14 #include <cmath>
15 #include <fstream>
16 #include <iostream>
17 #include <thread>
18 
19 constexpr auto cRED = "\033[1;31m";
20 constexpr auto cYELLOW = "\033[1;33m";
21 constexpr auto cNORMAL = "\033[0m";
22 constexpr auto cGREEN = "\033[1;32m";
23 
25 
27 {
28  Initialize();
29 }
30 
31 AtCore2::AtCore2(std::shared_ptr<AtMap> map) : fMap(map)
32 {
33  Initialize();
34  SetNumTbs(512);
35 }
36 
37 AtCore2::AtCore2(std::shared_ptr<AtMap> map, Int_t numCobos) : fNumCobo(numCobos), fMap(map)
38 {
39  Initialize();
40  SetNumTbs(512);
41 }
42 AtCore2::AtCore2(TString filename, std::shared_ptr<AtMap> map) : fMap(map)
43 {
44 
45  Initialize();
46  AddData(filename);
47  SetNumTbs(512);
48 }
49 
50 AtCore2::AtCore2(TString filename, Int_t numTbs, Int_t windowNumTbs, Int_t windowStartTb)
51 {
52  Initialize();
53  AddData(filename);
54  SetNumTbs(numTbs);
55 }
56 
58 
60 {
61 
62  std::cout << " ======= AtCore2::Initialize "
63  << "\n";
64 
65  fRawEventPtr = new AtRawEvent();
66 
67  fIsNegativePolarity = kTRUE;
68  fPedestalPtr[0] = new AtPedestal();
69  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++)
70  fPedestalPtr[iCobo] = nullptr;
71 
72  fDecoderPtr[0] = new GETDecoder2();
73  // fPadArray = new TClonesArray("AtPad", 10240);
74 
75  fIsData = kFALSE;
76  fFPNSigmaThreshold = 5;
77 
78  fNumTbs = 512;
79 
80  fTargetFrameID = -1;
81  memset(fCurrentEventID, 0, sizeof(Int_t) * fNumCobo);
82 
83  fIsSeparatedData = kFALSE;
84 
85  std::cout << " =========== End of AtCore2 Initialization. Number of Cobo/AsAd : " << fNumCobo << "\n";
86 }
87 
88 // Default coboIdx is 0
89 Bool_t AtCore2::AddData(TString filename, Int_t coboIdx)
90 {
91  return fDecoderPtr[coboIdx]->AddData(filename);
92 }
93 
94 void AtCore2::SetPositivePolarity(Bool_t value)
95 {
96  fIsNegativePolarity = !value;
97 }
98 
99 Bool_t AtCore2::SetData(Int_t value)
100 {
101  fIsData = fDecoderPtr[0]->SetData(value);
102  GETDecoder2::EFrameType frameType = fDecoderPtr[0]->GetFrameType();
103 
104  if (fIsSeparatedData) {
105  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++) {
106  if (fPedestalPtr[iCobo] == nullptr)
107  fPedestalPtr[iCobo] = new AtPedestal();
108 
109  fIsData &= fDecoderPtr[iCobo]->SetData(value);
110  frameType = fDecoderPtr[iCobo]->GetFrameType();
111  /*
112  if (frameType != GETDecoder2::kCobo || frameType != GETDecoder2::kBasic) {
113  std::cout << cRED << "== [AtCore] When using separated data, only accepted are not merged frame data
114  files!" << cNORMAL << std::endl;
115 
116  fIsData = kFALSE;
117  return fIsData;
118  }
119  */
120  fIsData = kTRUE;
121  }
122  }
123 
124  fTargetFrameID = -1;
125  memset(fCurrentEventID, 0, sizeof(Int_t) * fNumCobo);
126 
127  return fIsData;
128 }
129 
131 {
132  fDecoderPtr[0]->SetDiscontinuousData(value);
133  if (fIsSeparatedData)
134  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++)
135  fDecoderPtr[iCobo]->SetDiscontinuousData(value);
136 }
137 
138 Int_t AtCore2::GetNumData(Int_t coboIdx)
139 {
140  return fDecoderPtr[coboIdx]->GetNumData();
141 }
142 
143 TString AtCore2::GetDataName(Int_t ind, Int_t coboIdx)
144 {
145  return fDecoderPtr[coboIdx]->GetDataName(ind);
146 }
147 
148 void AtCore2::SetNumTbs(Int_t value)
149 {
150  fNumTbs = value;
151  fDecoderPtr[0]->SetNumTbs(value);
152 
153  if (fIsSeparatedData)
154  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++)
155  fDecoderPtr[iCobo]->SetNumTbs(value);
156 }
157 
158 void AtCore2::SetFPNPedestal(Double_t sigmaThreshold)
159 {
160  fFPNSigmaThreshold = sigmaThreshold;
161 
162  std::cout << "== [AtCore] Using FPN pedestal is set!" << std::endl;
163 }
164 
165 void AtCore2::ProcessCobo(Int_t coboIdx)
166 {
167 
168  GETCoboFrame *coboFrame = fDecoderPtr[coboIdx]->GetCoboFrame(fTargetFrameID);
169 
170  if (coboFrame == nullptr) {
171  fRawEventPtr->SetIsGood(kFALSE);
172  std::cout << " Null frame! CoboIdx " << coboIdx << "\n";
173  return;
174  }
175 
176  fCurrentEventID[coboIdx] = coboFrame->GetEventID();
177  Int_t numFrames = coboFrame->GetNumFrames();
178 
179  for (Int_t iFrame = 0; iFrame < numFrames; iFrame++) {
180  GETBasicFrame *frame = coboFrame->GetFrame(iFrame);
181 
182  Int_t iCobo = frame->GetCoboID();
183  Int_t iAsad = frame->GetAsadID();
184 
185  for (Int_t iAget = 0; iAget < 4; iAget++) {
186  for (Int_t iCh = 0; iCh < 68; iCh++) {
187 
188  AtPadReference PadRef = {iCobo, iAsad, iAget, iCh};
189  Int_t PadRefNum = fMap->GetPadNum(PadRef);
190  auto PadCenterCoord = fMap->CalcPadCenter(PadRefNum);
191  Bool_t IsInhibited = fMap->IsInhibited(PadRefNum);
192 
193  if (PadRefNum != -1 && !fMap->IsInhibited(PadRefNum)) {
194  AtPad *pad;
195  {
196  std::lock_guard<std::mutex> lk(fRawEventMutex);
197  // pad = new ((*fPadArray)[PadRefNum]) AtPad(PadRefNum);
198  pad = fRawEventPtr->AddPad(PadRefNum);
199  }
200 
201  pad->SetPadCoord(PadCenterCoord);
202  if (PadRefNum == -1)
203  pad->SetValidPad(kFALSE);
204  else
205  pad->SetValidPad(kTRUE);
206 
207  Int_t *rawadc = frame->GetSample(iAget, iCh);
208  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
209  pad->SetRawADC(iTb, rawadc[iTb]);
210 
211  Int_t fpnCh = GetFPNChannel(iCh);
212  Double_t adc[512] = {0};
213  fPedestalPtr[coboIdx]->SubtractPedestal(fNumTbs, frame->GetSample(iAget, fpnCh), rawadc, adc,
214  fFPNSigmaThreshold);
215 
216  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
217  pad->SetADC(iTb, adc[iTb]);
218 
219  pad->SetPedestalSubtracted(kTRUE);
220  }
221  }
222  }
223  }
224 }
225 
226 void AtCore2::ProcessBasicCobo(Int_t coboIdx)
227 {
228 
229  GETBasicFrame *basicFrame = fDecoderPtr[coboIdx]->GetBasicFrame(fTargetFrameID);
230 
231  if (basicFrame == nullptr) {
232  fRawEventPtr->SetIsGood(kFALSE);
233 
234  return;
235  }
236 
237  Int_t iCobo = basicFrame->GetCoboID();
238  Int_t iAsad = basicFrame->GetAsadID();
239 
240  for (Int_t iAget = 0; iAget < 4; iAget++) {
241  for (Int_t iCh = 0; iCh < 68; iCh++) {
242 
243  AtPadReference PadRef = {iCobo, iAsad, iAget, iCh};
244  auto PadRefNum = fMap->GetPadNum(PadRef);
245  auto PadCenterCoord = fMap->CalcPadCenter(PadRefNum);
246  Bool_t IsInhibited = fMap->IsInhibited(PadRefNum);
247 
248  if (PadRefNum != -1 && !fMap->IsInhibited(PadRefNum)) {
249  AtPad *pad = nullptr;
250  {
251  // Ensure the threads aren't both trying to create pads at the same time
252  std::lock_guard<std::mutex> lk(fRawEventMutex);
253  pad = fRawEventPtr->AddPad(PadRefNum);
254  }
255 
256  pad->SetPadCoord(PadCenterCoord);
257  pad->SetValidPad(kTRUE);
258 
259  Int_t *rawadc = basicFrame->GetSample(iAget, iCh);
260 
261  for (Int_t iTb = 0; iTb < fNumTbs; iTb++) {
262  pad->SetRawADC(iTb, rawadc[iTb]);
263  // std::cout<<iTb<<" "<<rawadc[iTb]<<"\n";
264  }
265 
266  Int_t fpnCh = GetFPNChannel(iCh);
267  Double_t adc[512] = {0};
268  fPedestalPtr[coboIdx]->SubtractPedestal(fNumTbs, basicFrame->GetSample(iAget, fpnCh), rawadc, adc,
269  fFPNSigmaThreshold);
270 
271  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
272  pad->SetADC(iTb, adc[iTb]);
273 
274  pad->SetPedestalSubtracted(kTRUE);
275  }
276  }
277  }
278 }
279 
280 Bool_t AtCore2::SetWriteFile(TString filename, Int_t coboIdx, Bool_t overwrite)
281 {
282  return fDecoderPtr[coboIdx]->SetWriteFile(filename, overwrite);
283 }
284 
286 {
287  if (fRawEventPtr == nullptr) {
288  std::cout << "== [AtCore] Call this method after GetRawEvent()!" << std::endl;
289 
290  return;
291  }
292 
293  if (fIsSeparatedData) {
294  for (Int_t iCobo = 0; iCobo < fNumCobo; iCobo++) {
295  fDecoderPtr[iCobo]->GetCoboFrame(fTargetFrameID);
296  fDecoderPtr[iCobo]->WriteFrame();
297  }
298  } else
299  fDecoderPtr[0]->WriteFrame();
300 }
301 
303 {
304 
305  if (!fIsData) {
306  std::cout << cRED << "== [AtCore] Data file is not set!" << cNORMAL << std::endl;
307 
308  return nullptr;
309  }
310 
311  if (fIsSeparatedData) {
312  fRawEventPtr->Clear();
313  // fPadArray->Clear("C");
314 
315  if (frameID == -1)
316  fTargetFrameID++;
317  else
318  fTargetFrameID = frameID;
319 
320  std::thread *cobo = new std::thread[fNumCobo];
321 
322  for (Int_t iCobo = 0; iCobo < fNumCobo; iCobo++) {
323  cobo[iCobo] = std::thread([this](Int_t coboIdx) { this->ProcessBasicCobo(coboIdx); }, iCobo);
324  }
325 
326  for (Int_t iCobo = 0; iCobo < fNumCobo; iCobo++)
327  cobo[iCobo].join();
328 
329  // NB: Do not delete. To be refactored using functors
330  /* for (Int_t iCobo = 0; iCobo < fNumCobo; iCobo++){
331  cobo[iCobo] = std::thread([this](Int_t coboIdx) { this->ProcessCobo(coboIdx); }, iCobo);
332  }*/
333 
334  for (Int_t iCobo = 0; iCobo < fNumCobo; iCobo++)
335  if (fCurrentEventID[0] != fCurrentEventID[iCobo]) {
336  std::cout << "== [AtCore] Event IDs don't match between CoBos! fCurrentEventID[0]: " << fCurrentEventID[0]
337  << " fCurrentEventID[" << iCobo << "]: " << fCurrentEventID[iCobo] << std::endl;
338 
339  fRawEventPtr->SetIsGood(kFALSE);
340  }
341 
342  fRawEventPtr->SetEventID(fCurrentEventID[0]);
343 
344  delete[] cobo;
345 
346  if (fRawEventPtr->GetNumPads() == 0 && fRawEventPtr->IsGood() == kFALSE)
347  return nullptr;
348  else
349  return fRawEventPtr;
350  } else {
351 
352  fRawEventPtr->Clear();
353  // fPadArray->Clear("C");
354 
355  if (frameID == -1)
356  fTargetFrameID++;
357  else
358  fTargetFrameID = frameID;
359 
360  if (dynamic_cast<AtTpcMap *>(fMap.get()) != nullptr) {
361  GETLayeredFrame *layeredFrame = fDecoderPtr[0]->GetLayeredFrame(fTargetFrameID);
362  if (layeredFrame == nullptr)
363  return nullptr;
364  ProcessLayeredFrame(layeredFrame);
365  } else if (dynamic_cast<AtTpcProtoMap *>(fMap.get()) != nullptr) {
366  GETBasicFrame *basicFrame = fDecoderPtr[0]->GetBasicFrame(fTargetFrameID);
367  if (basicFrame == nullptr)
368  return nullptr;
369  ProcessBasicFrame(basicFrame);
370  }
371 
372  return fRawEventPtr;
373  }
374 
375  return nullptr;
376 }
377 
379 {
380  return fRawEventPtr->GetEventID();
381 }
382 
383 Int_t AtCore2::GetNumTbs(Int_t coboIdx)
384 {
385  return fDecoderPtr[coboIdx]->GetNumTbs();
386 }
387 
389 {
390  fIsSeparatedData = value;
391 
392  if (fIsSeparatedData) {
393  std::cout << cYELLOW << "== [AtCore] You set the decoder to analyze seperated data files." << std::endl;
394  std::cout << " Make sure to call this method right after the instance created!" << cNORMAL
395  << std::endl;
396 
397  for (Int_t iCobo = 1; iCobo < fNumCobo; iCobo++) {
398  fDecoderPtr[iCobo] = new GETDecoder2();
399  }
400  }
401 }
402 
403 Int_t AtCore2::GetFPNChannel(Int_t chIdx)
404 {
405  Int_t fpn = -1;
406 
407  if (chIdx < 17)
408  fpn = 11;
409  else if (chIdx < 34)
410  fpn = 22;
411  else if (chIdx < 51)
412  fpn = 45;
413  else
414  fpn = 56;
415 
416  return fpn;
417 }
418 
419 void AtCore2::SetPseudoTopologyFrame(Int_t asadMask, Bool_t check)
420 {
421  for (Int_t i = 0; i < fNumCobo; i++)
422  fDecoderPtr[i]->SetPseudoTopologyFrame(asadMask, check);
423 }
424 
426 {
427 
428  fRawEventPtr->SetEventID(layeredFrame->GetEventID());
429 
430  Int_t numFrames = layeredFrame->GetNItems();
431  for (Int_t iFrame = 0; iFrame < numFrames; iFrame++) {
432  GETBasicFrame *frame = layeredFrame->GetFrame(iFrame);
433 
434  Int_t iCobo = frame->GetCoboID();
435  Int_t iAsad = frame->GetAsadID();
436 
437  for (Int_t iAget = 0; iAget < 4; iAget++) {
438  for (Int_t iCh = 0; iCh < 68; iCh++) {
439 
440  AtPadReference PadRef = {iCobo, iAsad, iAget, iCh};
441  Int_t PadRefNum = fMap->GetPadNum(PadRef);
442  auto PadCenterCoord = fMap->CalcPadCenter(PadRefNum);
443 
444  if (PadRefNum != -1) {
445  AtPad *pad;
446  {
447  std::lock_guard<std::mutex> lk(fRawEventMutex);
448  // AtPad *pad = new ((*fPadArray)[PadRefNum]) AtPad(PadRefNum);
449  pad = fRawEventPtr->AddPad(PadRefNum);
450  }
451 
452  pad->SetPadCoord(PadCenterCoord);
453 
454  if (PadRefNum == -1)
455  pad->SetValidPad(kFALSE);
456  else
457  pad->SetValidPad(kTRUE);
458 
459  Int_t *rawadc = frame->GetSample(iAget, iCh);
460  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
461  pad->SetRawADC(iTb, rawadc[iTb]);
462 
463  Int_t fpnCh = GetFPNChannel(iCh);
464  Double_t adc[512] = {0};
465  Bool_t good = fPedestalPtr[0]->SubtractPedestal(fNumTbs, frame->GetSample(iAget, fpnCh), rawadc, adc,
466  fFPNSigmaThreshold);
467 
468  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
469  pad->SetADC(iTb, adc[iTb]);
470 
471  pad->SetPedestalSubtracted(kTRUE);
472  fRawEventPtr->SetIsGood(good);
473  }
474  }
475  }
476  }
477 }
478 
480 {
481 
482  Int_t iCobo = basicFrame->GetCoboID();
483  Int_t iAsad = basicFrame->GetAsadID();
484 
485  for (Int_t iAget = 0; iAget < 4; iAget++) {
486  for (Int_t iCh = 0; iCh < 68; iCh++) {
487 
488  AtPadReference PadRef = {iCobo, iAsad, iAget, iCh};
489  Int_t PadRefNum = fMap->GetPadNum(PadRef);
490  auto PadCenterCoord = fMap->CalcPadCenter(PadRefNum);
491 
492  if (PadRefNum != -1) {
493  // AtPad *pad = new ((*fPadArray)[PadRefNum]) AtPad(PadRefNum);
494  AtPad *pad;
495  if (fMap->IsAuxPad(PadRef)) {
496  std::lock_guard<std::mutex> lk(fRawEventMutex);
497  pad = fRawEventPtr->AddAuxPad(fMap->GetAuxName(PadRef)).first;
498  } else {
499  std::lock_guard<std::mutex> lk(fRawEventMutex);
500  pad = fRawEventPtr->AddPad(PadRefNum);
501  }
502 
503  pad->SetPadCoord(PadCenterCoord);
504 
505  if (PadRefNum == -1)
506  pad->SetValidPad(kFALSE);
507  else
508  pad->SetValidPad(kTRUE);
509 
510  Int_t *rawadc = basicFrame->GetSample(iAget, iCh);
511  for (Int_t iTb = 0; iTb < fNumTbs; iTb++) {
512  // std::cout<<" iTb "<<iTb<<" "<<rawadc[iTb]<<"\n";
513  pad->SetRawADC(iTb, rawadc[iTb]);
514  }
515 
516  Int_t fpnCh = GetFPNChannel(iCh);
517  Double_t adc[512] = {0};
518  Bool_t good = fPedestalPtr[0]->SubtractPedestal(fNumTbs, basicFrame->GetSample(iAget, fpnCh), rawadc, adc,
519  fFPNSigmaThreshold);
520 
521  for (Int_t iTb = 0; iTb < fNumTbs; iTb++)
522  pad->SetADC(iTb, adc[iTb]);
523 
524  pad->SetPedestalSubtracted(kTRUE);
525  fRawEventPtr->SetIsGood(good);
526  }
527  }
528  }
529 }
530 
531 void AtCore2::SetNumCobo(Int_t numCobo)
532 {
533  fNumCobo = numCobo;
534 }
ClassImp
ClassImp(AtCore2)
GETCoboFrame::GetEventID
Int_t GetEventID()
Definition: GETCoboFrame.cxx:19
AtCore2::ProcessBasicFrame
void ProcessBasicFrame(GETBasicFrame *basicFrame)
Definition: AtCore2.cxx:479
AtCore2::WriteData
void WriteData()
Definition: AtCore2.cxx:285
GETLayerHeader::GetNItems
UInt_t GetNItems()
Definition: GETLayerHeader.cxx:23
GETCoboFrame::GetNumFrames
Int_t GetNumFrames()
Definition: GETCoboFrame.cxx:30
AtCore2::ProcessBasicCobo
void ProcessBasicCobo(Int_t coboIdx)
Definition: AtCore2.cxx:226
AtRawEvent::Clear
void Clear(Option_t *opt=nullptr) override
Copy everything but the data (pads, aux pads, and MCPointMap) to this event.
Definition: AtRawEvent.cxx:39
AtPad::SetValidPad
void SetValidPad(Bool_t val=kTRUE)
Definition: AtPad.h:82
GETDecoder2::GetFrameType
EFrameType GetFrameType()
Definition: GETDecoder2.cxx:338
GETDecoder2::GetBasicFrame
GETBasicFrame * GetBasicFrame(Int_t frameID=-1)
Return specific frame of the given frame number. If frameID is -1, this method returns next frame.
Definition: GETDecoder2.cxx:357
AtCore2::GetEventID
Int_t GetEventID()
Returns the current event ID.
Definition: AtCore2.cxx:378
AtPad::SetPadCoord
void SetPadCoord(const XYPoint &point)
Definition: AtPad.h:87
cYELLOW
constexpr auto cYELLOW
Definition: AtCore2.cxx:20
AtCore2
Definition: AtCore2.h:26
AtCore2::SetNumCobo
void SetNumCobo(Int_t numCobo)
Definition: AtCore2.cxx:531
AtPad::SetRawADC
void SetRawADC(const rawTrace &val)
Definition: AtPad.h:89
AtPad::SetPedestalSubtracted
void SetPedestalSubtracted(Bool_t val=kTRUE)
Definition: AtPad.h:86
GETDecoder2::GetDataName
TString GetDataName(Int_t index)
Return the filename of data at index.
Definition: GETDecoder2.cxx:323
AtCore2::SetData
Bool_t SetData(Int_t value)
Definition: AtCore2.cxx:99
AtTpcProtoMap
Definition: AtTpcProtoMap.h:26
GETBasicFrameHeader::GetCoboID
UInt_t GetCoboID()
Definition: GETBasicFrameHeader.cxx:35
AtPad::SetADC
void SetADC(const trace &val)
Definition: AtPad.h:91
AtBaseEvent::SetEventID
void SetEventID(ULong_t evtid)
Definition: AtBaseEvent.h:60
AtBaseEvent::SetIsGood
void SetIsGood(Bool_t value)
Definition: AtBaseEvent.h:61
GETBasicFrame
Definition: GETBasicFrame.h:14
AtCore2.h
AtRawEvent
Definition: AtRawEvent.h:34
GETDecoder2::GetLayeredFrame
GETLayeredFrame * GetLayeredFrame(Int_t frameID=-1)
Definition: GETDecoder2.cxx:526
GETLayerHeader::GetEventID
UInt_t GetEventID()
Definition: GETLayerHeader.cxx:27
GETDecoder2::SetNumTbs
void SetNumTbs(Int_t value=512)
Setting the number of time buckets.
Definition: GETDecoder2.cxx:179
GETDecoder2::WriteFrame
void WriteFrame()
Write current frame.
Definition: GETDecoder2.cxx:665
GETDecoder2
Definition: GETDecoder2.h:38
AtCore2::GetNumData
Int_t GetNumData(Int_t coboIdx=0)
Definition: AtCore2.cxx:138
AtCore2::GetFPNChannel
Int_t GetFPNChannel(Int_t chIdx)
Definition: AtCore2.cxx:403
AtBaseEvent::AddAuxPad
std::pair< AtAuxPad *, bool > AddAuxPad(std::string auxName)
Add new auxilary pad (AtAuxPad) to event.
Definition: AtBaseEvent.cxx:44
AtCore2::ProcessLayeredFrame
void ProcessLayeredFrame(GETLayeredFrame *layeredFrame)
Definition: AtCore2.cxx:425
AtTpcMap
Definition: AtTpcMap.h:19
GETLayeredFrame::GetFrame
GETBasicFrame * GetFrame(Int_t index)
Definition: GETLayeredFrame.cxx:22
AtCore2::SetWriteFile
Bool_t SetWriteFile(TString filename, Int_t coboIdx=0, Bool_t overwrite=kFALSE)
Definition: AtCore2.cxx:280
AtCore2::SetFPNPedestal
void SetFPNPedestal(Double_t sigmaThreshold=5)
Definition: AtCore2.cxx:158
GETCoboFrame::GetFrame
GETBasicFrame * GetFrame(Int_t index)
Definition: GETCoboFrame.cxx:38
AtCore2::AddData
Bool_t AddData(TString filename, Int_t coboIdx=0)
Definition: AtCore2.cxx:89
AtCore2::AtCore2
AtCore2()
Definition: AtCore2.cxx:26
GETDecoder2::GetNumData
Int_t GetNumData()
Return the number of data added in the list.
Definition: GETDecoder2.cxx:318
AtCore2::SetPseudoTopologyFrame
void SetPseudoTopologyFrame(Int_t asadMask, Bool_t check=kFALSE)
Definition: AtCore2.cxx:419
AtCore2::SetNumTbs
void SetNumTbs(Int_t value)
Definition: AtCore2.cxx:148
GETDecoder2::GetNumTbs
Int_t GetNumTbs()
Return the number of time buckets.
Definition: GETDecoder2.cxx:334
GETCoboFrame.h
AtCore2::GetNumTbs
Int_t GetNumTbs(Int_t coboIdx=0)
Returns the number of time buckets of the data.
Definition: AtCore2.cxx:383
GETBasicFrameHeader::GetAsadID
UInt_t GetAsadID()
Definition: GETBasicFrameHeader.cxx:39
GETDecoder2::SetData
Bool_t SetData(Int_t index)
Set the data file to the class.
Definition: GETDecoder2.cxx:210
AtBaseEvent::IsGood
Bool_t IsGood() const
Definition: AtBaseEvent.h:70
AtPedestal
Definition: AtPedestal.h:27
AtCore2::SetDiscontinuousData
void SetDiscontinuousData(Bool_t value=kTRUE)
Definition: AtCore2.cxx:130
AtCore2::ProcessCobo
void ProcessCobo(Int_t coboIdx)
Definition: AtCore2.cxx:165
AtCore2::~AtCore2
~AtCore2()
Definition: AtCore2.cxx:57
AtCore2::GetDataName
TString GetDataName(Int_t index, Int_t coboIdx=0)
Definition: AtCore2.cxx:143
cRED
constexpr auto cRED
Definition: AtCore2.cxx:19
AtCore2::Initialize
void Initialize()
Definition: AtCore2.cxx:59
AtCore2::GetRawEvent
AtRawEvent * GetRawEvent(Long64_t eventID=-1)
Returns STRawEvent object filled with the data.
Definition: AtCore2.cxx:302
AtRawEvent::AddPad
AtPad * AddPad(Ts &&...params)
Create a new pad in this event.
Definition: AtRawEvent.h:82
AtBaseEvent::GetEventID
ULong_t GetEventID() const
Definition: AtBaseEvent.h:67
GETLayeredFrame.h
GETDecoder2::SetWriteFile
Bool_t SetWriteFile(TString filename, Bool_t overwrite=kFALSE)
Set the file for writing frame.
Definition: GETDecoder2.cxx:627
AtCore2::SetUseSeparatedData
void SetUseSeparatedData(Bool_t value=kTRUE)
Definition: AtCore2.cxx:388
GETDecoder2::GetCoboFrame
GETCoboFrame * GetCoboFrame(Int_t frameID=-1)
Definition: GETDecoder2.cxx:419
GETBasicFrame::GetSample
Int_t * GetSample(Int_t agetIdx, Int_t chIdx)
Definition: GETBasicFrame.cxx:14
AtRawEvent::GetNumPads
Int_t GetNumPads() const
Definition: AtRawEvent.h:122
AtCore2::SetPositivePolarity
void SetPositivePolarity(Bool_t value=kTRUE)
Definition: AtCore2.cxx:94
cNORMAL
constexpr auto cNORMAL
Definition: AtCore2.cxx:21
AtPad
Container class for AtPadBase objects.
Definition: AtPad.h:38
cGREEN
constexpr auto cGREEN
Definition: AtCore2.cxx:22
GETLayeredFrame
Definition: GETLayeredFrame.h:16
AtPadReference
Definition: AtPadReference.h:20
GETCoboFrame
Definition: GETCoboFrame.h:14
GETDecoder2::AddData
Bool_t AddData(TString filename)
Add the data file to the list of rawdata.
Definition: GETDecoder2.cxx:184
GETDecoder2::EFrameType
EFrameType
Frame type enumerator.
Definition: GETDecoder2.h:48
GETDecoder2::SetDiscontinuousData
void SetDiscontinuousData(Bool_t value=kTRUE)
Definition: GETDecoder2.cxx:289
AtPedestal::SubtractPedestal
Bool_t SubtractPedestal(Int_t numTbs, Int_t *fpn, Int_t *rawADC, Double_t *dest, Double_t rmsCut=5, Bool_t signalNegativePolarity=kFALSE, Int_t startTb=3, Int_t averageTbs=10)
Definition: AtPedestal.cxx:25