PandaRoot
PndMQHitEventDevice.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
15 #ifndef PndMQHitEventDevice_H_
16 #define PndMQHitEventDevice_H_
17 
18 //#include "FairMQDevice.h"
19 #include "FairMQDevice.h"
21 #include "PndMQHitsEventBuilder.h"
22 
23 #include <boost/serialization/access.hpp>
24 #include <boost/serialization/vector.hpp>
25 #include <boost/serialization/deque.hpp>
26 
27 class PndMQHitEventDevice : public FairMQDevice {
28  public:
30  virtual ~PndMQHitEventDevice();
31 
32  virtual void SetProperty(const int key, const std::string &value);
33  virtual std::string GetProperty(const int key, const std::string &default_ = "");
34  virtual void SetProperty(const int key, const int value);
35  virtual int GetProperty(const int key, const int default_ = 0);
36 
37  template <class Archive>
38  void serialize(Archive &ar, const unsigned int version)
39  {
40  ar &fHitData;
41  ar &fEventData;
42  ar &fSensorsInEvent;
43  }
44 
45  protected:
46  virtual void Run();
47 
48  private:
49 #ifndef __CINT__ // for BOOST serialization
51 #endif // for BOOST serialization
52  std::vector<std::vector<PndSdsHit>> fHitData;
53  // std::vector<PndSdsHit> fHitData;
54  std::vector<std::vector<PndSdsHit>> fEventData;
55  std::vector<std::vector<std::vector<PndSdsHit>>> fDataFromChannels;
56  std::vector<bool> fRunningStatus;
57  bool fGlobalRunningStatus;
58  std::vector<int> fSensorsInEvent;
59 
60  bool fHasBoostSerialization;
61  PndMQHitsEventBuilder *fBuilder;
62 };
63 
64 #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()