BmnRoot
Loading...
Searching...
No Matches
BmnSsdDigi.h
Go to the documentation of this file.
1
8#ifndef BMNSSDDIGI_H
9#define BMNSSDDIGI_H 1
10
11#include "BmnDigi.h"
12
13#ifndef __CLING__
14#include <boost/serialization/access.hpp>
15#include <boost/serialization/base_object.hpp>
16#endif //__CLING__
17
26class BmnSsdDigi : public BmnDigi
27{
28 public:
31 : BmnDigi()
32 , fAddress(0)
33 , fChannel(0)
34 , fTime(0)
35 , fCharge(0)
36 {}
37
43 BmnSsdDigi(Int_t address, Int_t channel, ULong64_t time, UShort_t charge)
44 : BmnDigi()
45 , fAddress(address)
46 , fChannel(channel)
47 , fTime(time)
48 , fCharge(charge)
49 {}
50
52 virtual ~BmnSsdDigi() {};
53
57 virtual Int_t GetAddress() const { return fAddress; }
58
62 UShort_t GetChannel() const { return fChannel; }
63
67 virtual Double_t GetCharge() const { return Double_t(fCharge); }
68
72 virtual Int_t GetSystemId() const { return kSSD; }
73
77 virtual Double_t GetTime() const { return Double_t(fTime); }
78
79 template<class Archive>
80 void serialize(Archive& ar, const unsigned int /*version*/)
81 {
82 ar & fAddress;
83 ar & fTime;
84 ar & fCharge;
85 }
86
88 virtual std::string ToString() const;
89
90 private:
91#ifndef __CLING__ // for BOOST serialization
93#endif // for BOOST serialization
94
95 Int_t fAddress;
96 UShort_t fChannel;
97 Long64_t fTime;
98 UShort_t fCharge;
99
100 ClassDef(BmnSsdDigi, 6);
101};
102
103#endif
@ kSSD
Base class for persistent representation of digital information.
Definition BmnDigi.h:44
Data class for a single-channel message in the SSD.
Definition BmnSsdDigi.h:27
UShort_t GetChannel() const
Channel number in module @value Channel number.
Definition BmnSsdDigi.h:62
virtual std::string ToString() const
BmnSsdDigi(Int_t address, Int_t channel, ULong64_t time, UShort_t charge)
Definition BmnSsdDigi.h:43
virtual Double_t GetTime() const
Definition BmnSsdDigi.h:77
virtual Int_t GetAddress() const
Definition BmnSsdDigi.h:57
void serialize(Archive &ar, const unsigned int)
Definition BmnSsdDigi.h:80
virtual Double_t GetCharge() const
Definition BmnSsdDigi.h:67
virtual ~BmnSsdDigi()
Definition BmnSsdDigi.h:52
virtual Int_t GetSystemId() const
Definition BmnSsdDigi.h:72
friend class boost::serialization::access
Definition BmnSsdDigi.h:92