PandaRoot
PndSdsDigiTopix4Header.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // --------------------------------------------------------
14 // ---- PndSdsDigiTopix4Header header file ---
15 // ---- Created 21.11.14 by S.Esch ---
16 // --------------------------------------------------------
17 
23 #ifndef PndSdsDigiTopix4Header_H
24 #define PndSdsDigiTopix4Header_H
25 
26 #include "PndSdsDigiPixel.h"
27 #include "PndDetectorList.h"
28 
29 #include "TObject.h"
30 #include "TString.h"
31 #include <iostream>
32 #include <vector>
33 
34 class PndSdsDigiTopix4Header : public TObject {
35  friend std::ostream &operator<<(std::ostream &out, PndSdsDigiTopix4Header &digi)
36  {
37  out << "PndSdsDigiTopix4Header : Frame Count" << digi.GetFrameCount() << " FE: " << digi.GetFE() << " Chip Address " << digi.GetChipAddress() << " Error Correction Code "
38  << digi.GetECC() << " Frame Count Independent " << digi.GetFrameCountIndependent() << std::endl;
39 
40  return out;
41  }
42 
43  public:
45  PndSdsDigiTopix4Header(UInt_t framecount, Int_t fe, UInt_t chipaddress, UInt_t ecc, UInt_t framecountindependent, Int_t deltaframecount, UInt_t numberofevents,
46  UInt_t numberofeventsinframe);
47 
49  {
50 
52  SetFE(pix.GetFE());
54  SetECC(pix.GetECC());
59  return *this;
60  }
61 
62  UInt_t GetFrameCount() const { return fFrameCount; }
63  UInt_t GetFE() const { return fFE; }
64  UInt_t GetChipAddress() const { return fChipAddress; }
65  UInt_t GetECC() const { return fECC; }
66  UInt_t GetFrameCountIndependent() const { return fFrameCountIndependent; }
67  Int_t GetDeltaFrameCount() const { return fDeltaFrameCount; }
68  UInt_t GetNumberOfEvents() const { return fNumberOfEvents; }
69  UInt_t GetNumberOfEventsInFrame() const { return fNumberOfEvents; }
70 
71  void SetFrameCount(UInt_t fc) { fFrameCount = fc; }
72  void SetFE(Int_t fe) { fFE = fe; }
73  void SetChipAddress(UInt_t ca) { fChipAddress = ca; }
74  void SetECC(UInt_t ecc) { fECC = ecc; }
75  void SetFrameCountIndependent(UInt_t fc) { fFrameCountIndependent = fc; }
76  void SetDeltaFrameCount(Int_t dfc) { fDeltaFrameCount = dfc; }
77  void SetNumberOfEvents(UInt_t noe) { fNumberOfEvents = noe; }
78  void SetNumberOfEventsInFrame(UInt_t noe) { fNumberOfEventsInFrame = noe; }
79 
81 
82  void Print() { std::cout << *this; }
83 
84  private:
85  UInt_t fFrameCount;
86  Int_t fFE;
87  UInt_t fChipAddress;
88  UInt_t fECC;
89  UInt_t fFrameCountIndependent;
90  Int_t fDeltaFrameCount;
91  UInt_t fNumberOfEvents;
92  UInt_t fNumberOfEventsInFrame;
93 
94  ClassDef(PndSdsDigiTopix4Header, 1);
95 };
96 
97 #endif
void SetNumberOfEvents(UInt_t noe)
UInt_t GetFrameCountIndependent() const
void SetNumberOfEventsInFrame(UInt_t noe)
friend std::ostream & operator<<(std::ostream &out, PndSdsDigiTopix4Header &digi)
UInt_t GetNumberOfEventsInFrame() const
void SetDeltaFrameCount(Int_t dfc)
Data class to store the header of topix4 frames.
void SetFrameCountIndependent(UInt_t fc)
PndSdsDigiTopix4Header & operator=(const PndSdsDigiTopix4Header &pix)