File indexing completed on 2026-06-02 08:51:43
0001 #ifndef KINEMATIC_H
0002 #define KINEMATIC_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <ElementaryUtils/parameters/Parameters.h>
0012 #include <string>
0013 #include <vector>
0014
0015 #include "../BaseObject.h"
0016 #include "channel/ChannelType.h"
0017
0018 namespace ElemUtils {
0019 class Packet;
0020 }
0021
0022 namespace PARTONS {
0023
0024
0025
0026
0027
0028
0029
0030
0031 class Kinematic: public BaseObject {
0032
0033 public:
0034
0035
0036
0037
0038 virtual ~Kinematic();
0039
0040
0041
0042
0043
0044 virtual void configure(const ElemUtils::Parameters ¶meters);
0045
0046 virtual std::string toString() const;
0047
0048
0049
0050
0051
0052 void serialize(ElemUtils::Packet &packet) const;
0053
0054
0055
0056
0057
0058 void unserialize(ElemUtils::Packet &packet);
0059
0060
0061
0062
0063 void serializeIntoStdVector(std::vector<double>& vec) const;
0064
0065
0066
0067
0068 void unserializeFromStdVector(std::vector<double>::const_iterator& it,
0069 const std::vector<double>::const_iterator& end);
0070
0071
0072
0073
0074
0075
0076
0077
0078 ChannelType::Type getChannelType() const;
0079
0080
0081
0082
0083 const std::string& getHashSum() const;
0084
0085
0086
0087
0088
0089 void setHashSum(const std::string& hashSum) const;
0090
0091 protected:
0092
0093
0094
0095
0096
0097 Kinematic(const std::string &className, ChannelType::Type channelType);
0098
0099
0100
0101
0102
0103 Kinematic(const Kinematic &other);
0104
0105
0106
0107
0108 virtual void updateHashSum() const = 0;
0109
0110 private:
0111
0112
0113
0114
0115 ChannelType::Type m_channelType;
0116
0117
0118
0119
0120 mutable std::string m_hashSum;
0121 };
0122
0123
0124
0125
0126 ElemUtils::Packet& operator <<(ElemUtils::Packet& packet, Kinematic& kinematic);
0127
0128
0129
0130
0131 ElemUtils::Packet& operator >>(ElemUtils::Packet& packet, Kinematic& kinematic);
0132
0133 }
0134
0135 #endif