PandaRoot
PndMQHitEventDevice.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 PndMQHitEventDevice_H_
28 #define PndMQHitEventDevice_H_
29 
30 //#include "FairMQDevice.h"
31 #include "FairMQDevice.h"
33 #include "PndMQHitsEventBuilder.h"
34 
35 #include <boost/serialization/access.hpp>
36 #include <boost/serialization/vector.hpp>
37 #include <boost/serialization/deque.hpp>
38 
39 class PndMQHitEventDevice : public FairMQDevice {
40  public:
42  virtual ~PndMQHitEventDevice();
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  template <class Archive>
50  void serialize(Archive &ar, const unsigned int version)
51  {
52  ar &fHitData;
53  ar &fEventData;
54  ar &fSensorsInEvent;
55  }
56 
57  protected:
58  virtual void Run();
59 
60  private:
61 #ifndef __CINT__ // for BOOST serialization
63 #endif // for BOOST serialization
64  std::vector<std::vector<PndSdsHit>> fHitData;
65  // std::vector<PndSdsHit> fHitData;
66  std::vector<std::vector<PndSdsHit>> fEventData;
67  std::vector<std::vector<std::vector<PndSdsHit>>> fDataFromChannels;
68  std::vector<bool> fRunningStatus;
69  bool fGlobalRunningStatus;
70  std::vector<int> fSensorsInEvent;
71 
72  bool fHasBoostSerialization;
73  PndMQHitsEventBuilder *fBuilder;
74 };
75 
76 #endif /* FAIRMQEXAMPLE1SINK_H_ */
friend class boost::serialization::access
virtual std::string GetProperty(const int key, const std::string &default_="")
virtual void SetProperty(const int key, const std::string &value)
void serialize(Archive &ar, const unsigned int version)
virtual ~PndMQHitEventDevice()
virtual void Run()