FairRoot/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 {
31  public:
33  virtual ~PndMQDataDuplicator();
34 
35  template <class Archive>
36  void serialize(Archive& ar, const unsigned int version)
37  {
38  ar& fTopixData;
39  }
40 
41  void SetRateRatio(int channel, int ratio){
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 
61 #endif /* PndMQDataDuplicator_H_ */
void SetRateRatio(int channel, int ratio)
std::vector< PndSdsDigiTopix4 > fTopixData
void serialize(Archive &ar, const unsigned int version)
friend class boost::serialization::access
std::vector< int > fRates