PandaRoot
PndMQTopix4Processor.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  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
15  * *
16  * This software is distributed under the terms of the *
17  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
18  * copied verbatim in the file "LICENSE" *
19  ********************************************************************************/
27 #ifndef PndMQTopix4Processor_H_
28 #define PndMQTopix4Processor_H_
29 
30 //#include "FairMQDevice.h"
31 #include "FairMQDevice.h"
33 
34 #include <boost/serialization/access.hpp>
35 #include <boost/serialization/vector.hpp>
36 
37 class PndMQTopix4Processor : public FairMQDevice {
38  public:
39  enum { FE = FairMQDevice::Last, TimeCorr, Last };
40 
42  virtual ~PndMQTopix4Processor();
43 
44  virtual void SetProperty(const int key, const std::string &value);
45  virtual std::string GetProperty(const int key, const std::string &default_ = "");
46  virtual void SetProperty(const int key, const int value);
47  virtual int GetProperty(const int key, const int default_ = 0);
48 
49  void SetFilter(bool val) { fTopixDataReader.SetFilter(val); }
50 
51  template <class Archive>
52  void serialize(Archive &ar, const unsigned int version)
53  {
54  ar &fPndSdsDigiTopix4Vector;
55  ar &fStatusValues;
56  }
57 
58  protected:
59  virtual void Run();
60 
61  private:
62 #ifndef __CINT__ // for BOOST serialization
64 #endif // for BOOST serialization
65  std::vector<PndSdsDigiTopix4> fPndSdsDigiTopix4Vector;
66  std::vector<int> fStatusValues;
67 
68  bool fHasBoostSerialization;
69  int fFE;
70  double fTimeStampCorrection;
71  std::string fTimeCorrStr;
72 
73  PndMvdReadInToPix4TBData fTopixDataReader;
74 };
75 
76 #endif /* FAIRMQEXAMPLE1SINK_H_ */
virtual void Run()
virtual std::string GetProperty(const int key, const std::string &default_="")
friend class boost::serialization::access
void serialize(Archive &ar, const unsigned int version)
virtual void SetProperty(const int key, const std::string &value)
virtual ~PndMQTopix4Processor()