Line | |
---|
1 | #ifndef MARS_MReport
|
---|
2 | #define MARS_MReport
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MTime;
|
---|
9 | class MParList;
|
---|
10 |
|
---|
11 | class MReport : public MParContainer
|
---|
12 | {
|
---|
13 | private:
|
---|
14 | const TString fIdentifier; //! Identifier of the subsystem
|
---|
15 | const Bool_t fHasReportTime; //! Intermediate solution for DC currents
|
---|
16 |
|
---|
17 | Byte_t fState; // Status of the subsystem
|
---|
18 | MTime *fTime; //! pointer to the corresponding time stamp
|
---|
19 |
|
---|
20 | ULong_t Hash() const { return fIdentifier.Hash(); }
|
---|
21 | Bool_t InterpreteHeader(TString &str);
|
---|
22 |
|
---|
23 | public:
|
---|
24 | MReport(const char *id, Bool_t time=kTRUE) : fIdentifier(id), fHasReportTime(time), fState(0xff), fTime(0) { }
|
---|
25 |
|
---|
26 | virtual Bool_t SetupReading(MParList &plist);
|
---|
27 | virtual Bool_t InterpreteBody(TString &str);
|
---|
28 |
|
---|
29 | Int_t Interprete(TString &str, const MTime &start, const MTime &stop);
|
---|
30 | Bool_t CheckIdentifier(TString &str) const
|
---|
31 | {
|
---|
32 | if (!str.BeginsWith(fIdentifier))
|
---|
33 | return kFALSE;
|
---|
34 |
|
---|
35 | str.Remove(0, fIdentifier.Length());
|
---|
36 | str = str.Strip(TString::kBoth);
|
---|
37 |
|
---|
38 | return kTRUE;
|
---|
39 | }
|
---|
40 |
|
---|
41 | const TString &GetIdentifier() const { return fIdentifier; }
|
---|
42 |
|
---|
43 | Byte_t GetState() const { return fState; }
|
---|
44 |
|
---|
45 | ClassDef(MReport, 1) // Base class for control reports
|
---|
46 | };
|
---|
47 |
|
---|
48 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.