PandaRoot
PndMQDataDuplicator.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 PndMQDataDuplicator_H_
16 #define PndMQDataDuplicator_H_
17 
18 #include <string>
19 #include <boost/serialization/access.hpp>
20 #include <boost/archive/text_iarchive.hpp>
21 #include <boost/archive/binary_iarchive.hpp>
22 #include <boost/archive/binary_oarchive.hpp>
23 #include <boost/serialization/vector.hpp>
24 
25 #include "FairMQDevice.h"
26 
27 #include "PndSdsDigiTopix4.h"
28 
29 class PndMQDataDuplicator : public FairMQDevice {
30  public:
32  virtual ~PndMQDataDuplicator();
33 
34  template <class Archive>
35  void serialize(Archive &ar, const unsigned int version)
36  {
37  ar &fTopixData;
38  }
39 
40  void SetRateRatio(int channel, int ratio)
41  {
42  if (channel > fRates.size() - 1) {
43  fRates.resize(channel + 1, 0);
44  }
45  fRates[channel] = ratio;
46  }
47 
48  protected:
49  virtual void Run();
50 
51  std::vector<int> fRates;
52 
53 #ifndef __CINT__ // for BOOST serialization
56 #endif // for BOOST serialization
57  std::vector<PndSdsDigiTopix4> fTopixData;
58 };
59 
60 #endif /* PndMQDataDuplicator_H_ */
void SetRateRatio(int channel, int ratio)
std::vector< PndSdsDigiTopix4 > fTopixData
virtual void Run()
void serialize(Archive &ar, const unsigned int version)
friend class boost::serialization::access
virtual ~PndMQDataDuplicator()
std::vector< int > fRates