source: trunk/MagicSoft/Mars/mreport/MReport.h@ 3648

Last change on this file since 3648 was 2892, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1#ifndef MARS_MReport
2#define MARS_MReport
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MTime;
9class MParList;
10
11class MReport : public MParContainer
12{
13private:
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
23public:
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 Int_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.