FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MyPodData.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 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 /*
10  * File: MyPodData.h
11  * Author: winckler
12  *
13  * Created on November 24, 2014, 1:46 PM
14  */
15 
16 #ifndef MYPODDATA_H
17 #define MYPODDATA_H
18 
19 // for root types
20 #include <Rtypes.h>
21 #include <iosfwd>
22 
23 namespace boost {
24 namespace serialization {
25 class access;
26 }
27 } // namespace boost
28 #include <boost/serialization/base_object.hpp>
29 
30 namespace MyPodData {
31 
32 class TimeStamp
33 {
34  public:
35  Double_t fTimeStamp;
36  Double_t fTimeStampError;
37 
38  // method to use boost serialization
39  template<class Archive>
40  void serialize(Archive& ar, const unsigned int /*version*/)
41  {
42  ar& fTimeStamp;
43  ar& fTimeStampError;
44  }
46 };
47 
48 class Digi : public TimeStamp
49 {
50  public:
51  Int_t fX;
52  Int_t fY;
53  Int_t fZ;
54 
55  // method to use boost serialization
56  template<class Archive>
57  void serialize(Archive& ar, const unsigned int /*version*/)
58  {
59  ar& boost::serialization::base_object<TimeStamp>(*this);
60  ar& fX;
61  ar& fY;
62  ar& fZ;
63  }
65 };
66 
67 class Hit : public TimeStamp
68 {
69  public:
70  Int_t detID;
71  Int_t mcindex;
72  Double_t posX;
73  Double_t posY;
74  Double_t posZ;
75  Double_t dposX;
76  Double_t dposY;
77  Double_t dposZ;
78 
79  // method to use boost serialization
80  template<class Archive>
81  void serialize(Archive& ar, const unsigned int /*version*/)
82  {
83  ar& boost::serialization::base_object<TimeStamp>(*this);
84  ar& detID;
85  ar& mcindex;
86  ar& posX;
87  ar& posY;
88  ar& posZ;
89  ar& dposX;
90  ar& dposY;
91  ar& dposZ;
92  }
94 };
95 } // namespace MyPodData
96 
97 #endif /* MYPODDATA_H */
void serialize(Archive &ar, const unsigned int)
Definition: MyPodData.h:40
Double_t fTimeStampError
Definition: MyPodData.h:36
Double_t dposY
Definition: MyPodData.h:76
Double_t posY
Definition: MyPodData.h:73
void serialize(Archive &ar, const unsigned int)
Definition: MyPodData.h:81
friend class boost::serialization::access
Definition: MyPodData.h:64
void serialize(Archive &ar, const unsigned int)
Definition: MyPodData.h:57
friend class boost::serialization::access
Definition: MyPodData.h:45
Double_t posZ
Definition: MyPodData.h:74
Double_t posX
Definition: MyPodData.h:72
friend class boost::serialization::access
Definition: MyPodData.h:93
Double_t fTimeStamp
Definition: MyPodData.h:35
Double_t dposZ
Definition: MyPodData.h:77
Int_t mcindex
Definition: MyPodData.h:71
Double_t dposX
Definition: MyPodData.h:75