BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/RawEvent/RawEvent-00-03-19/RawEvent/RawData.h
Go to the documentation of this file.
1#ifndef RawData_H
2#define RawData_H
3#include <iostream>
4#include <vector>
5#include <stdint.h>
6#include <functional>
7#include <algorithm>
8#include "GaudiKernel/ContainedObject.h"
9#include "Identifier/Identifier.h"
10#include "GaudiKernel/Kernel.h"
11#include "GaudiKernel/ContainedObject.h"
12#include "GaudiKernel/SmartRefVector.h"
13
14#include "GaudiKernel/ObjectVector.h"
15#include "GaudiKernel/ObjectList.h"
16
17/*
18 *
19 */
20
21class RawData : virtual public ContainedObject {
22public:
23 // Constructor
24 RawData(const Identifier& id, const unsigned int timeChannel=0, const unsigned int chargeChannel=0);
25
26 RawData(const unsigned int id);
27
28 // Set time channel
29 void setTimeChannel(const unsigned int timeChannel);
30
31 // Set charge channel
32 void setChargeChannel(const unsigned int chargeChannel);
33
34 // Set track index
35 void setTrackIndex(const int trackIndex);
36
37 // Get associated id
38 virtual Identifier identify() const;
39
40 // Get associated int id
41 unsigned int getIntId() const;
42
43 // Get time channel
44 unsigned int getTimeChannel() const;
45
46 // Get charge channel
47 unsigned int getChargeChannel() const;
48
49 // Get track index
50 int getTrackIndex() const;
51
52 // Add two signals: if channel is the same, charge adds up, time set to the earliest value
53 RawData &operator+=(const RawData &);
54
55
56 //! Serialize the object for writing
57 virtual StreamBuffer& serialize( StreamBuffer& s ) const;
58 virtual StreamBuffer& serialize( StreamBuffer& s );
59
60 //! Fill the ASCII output stream
61 virtual std::ostream& fillStream( std::ostream& s ) const;
62
63protected:
64 RawData(const RawData &);
65
67
68 const Identifier m_id; //Offline ID for readout channel
69
70 unsigned int m_timeChannel;
71
72 unsigned int m_chargeChannel;
73
74 const unsigned int m_intId;
75
77};
78
79//! Serialize the object for writing
80inline StreamBuffer& RawData::serialize( StreamBuffer& s ) const {
81 ContainedObject::serialize(s);
84 return s;
85}
86
87inline StreamBuffer& RawData::serialize( StreamBuffer& s ) {
88 return serialize(s);
89}
90
91//! Fill the ASCII output stream
92
93inline std::ostream& RawData::fillStream( std::ostream& s ) const {
94 s << "class RawData :" << std::endl
95 << " m_id: " << m_intId
96 << " m_timeChannel: " << m_timeChannel
97 << " m_chargeChannel: " << m_chargeChannel
98 << std::endl;
99 return s;
100}
101
102#endif
XmlRpcServer s
Definition: HelloServer.cpp:11
virtual std::ostream & fillStream(std::ostream &s) const
Fill the ASCII output stream.
unsigned int getIntId() const
Definition: RawData.cxx:20
RawData & operator=(const RawData &)
void setTrackIndex(const int trackIndex)
Definition: RawData.cxx:35
virtual StreamBuffer & serialize(StreamBuffer &s) const
Serialize the object for writing.
virtual Identifier identify() const
Definition: RawData.cxx:15
RawData(const RawData &)
void setChargeChannel(const unsigned int chargeChannel)
Definition: RawData.cxx:30
unsigned int getChargeChannel() const
Definition: RawData.cxx:45
void setTimeChannel(const unsigned int timeChannel)
Definition: RawData.cxx:25
int getTrackIndex() const
Definition: RawData.cxx:50
RawData & operator+=(const RawData &)
Definition: RawData.cxx:54
unsigned int getTimeChannel() const
Definition: RawData.cxx:40