PandaRoot
PndSdsDigiTopix4Header.h
Go to the documentation of this file.
1 // --------------------------------------------------------
2 // ---- PndSdsDigiTopix4Header header file ---
3 // ---- Created 21.11.14 by S.Esch ---
4 // --------------------------------------------------------
5 
11 #ifndef PndSdsDigiTopix4Header_H
12 #define PndSdsDigiTopix4Header_H
13 
14 #include "PndSdsDigiPixel.h"
15 #include "PndDetectorList.h"
16 
17 #include "TObject.h"
18 #include "TString.h"
19 #include <iostream>
20 #include <vector>
21 
22 class PndSdsDigiTopix4Header : public TObject {
23  friend std::ostream &operator<<(std::ostream &out, PndSdsDigiTopix4Header &digi)
24  {
25  out << "PndSdsDigiTopix4Header : Frame Count" << digi.GetFrameCount() << " FE: " << digi.GetFE() << " Chip Address " << digi.GetChipAddress() << " Error Correction Code "
26  << digi.GetECC() << " Frame Count Independent " << digi.GetFrameCountIndependent() << std::endl;
27 
28  return out;
29  }
30 
31  public:
33  PndSdsDigiTopix4Header(UInt_t framecount, Int_t fe, UInt_t chipaddress, UInt_t ecc, UInt_t framecountindependent, Int_t deltaframecount, UInt_t numberofevents,
34  UInt_t numberofeventsinframe);
35 
37  {
38 
40  SetFE(pix.GetFE());
42  SetECC(pix.GetECC());
47  return *this;
48  }
49 
50  UInt_t GetFrameCount() const { return fFrameCount; }
51  UInt_t GetFE() const { return fFE; }
52  UInt_t GetChipAddress() const { return fChipAddress; }
53  UInt_t GetECC() const { return fECC; }
54  UInt_t GetFrameCountIndependent() const { return fFrameCountIndependent; }
55  Int_t GetDeltaFrameCount() const { return fDeltaFrameCount; }
56  UInt_t GetNumberOfEvents() const { return fNumberOfEvents; }
57  UInt_t GetNumberOfEventsInFrame() const { return fNumberOfEvents; }
58 
59  void SetFrameCount(UInt_t fc) { fFrameCount = fc; }
60  void SetFE(Int_t fe) { fFE = fe; }
61  void SetChipAddress(UInt_t ca) { fChipAddress = ca; }
62  void SetECC(UInt_t ecc) { fECC = ecc; }
63  void SetFrameCountIndependent(UInt_t fc) { fFrameCountIndependent = fc; }
64  void SetDeltaFrameCount(Int_t dfc) { fDeltaFrameCount = dfc; }
65  void SetNumberOfEvents(UInt_t noe) { fNumberOfEvents = noe; }
66  void SetNumberOfEventsInFrame(UInt_t noe) { fNumberOfEventsInFrame = noe; }
67 
69 
70  void Print() { std::cout << *this; }
71 
72  private:
73  UInt_t fFrameCount;
74  Int_t fFE;
75  UInt_t fChipAddress;
76  UInt_t fECC;
77  UInt_t fFrameCountIndependent;
78  Int_t fDeltaFrameCount;
79  UInt_t fNumberOfEvents;
80  UInt_t fNumberOfEventsInFrame;
81 
82  ClassDef(PndSdsDigiTopix4Header, 1);
83 };
84 
85 #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)