Logo coherent WaveBurst  
Library Reference Guide
Logo
HistoryLogLine.hh
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Stefano Longo, Gabriele Vedovato
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 /***************************************************************************
20  HistoryLogline.h - description
21  -------------------
22  begin : ven set 2 2005
23  copyright : (C) 2005 by Stefano Longo
24  email : Stefano.Longo@lnl.infn.it
25  ***************************************************************************/
26 
27 /***************************************************************************
28  * *
29  * This program is free software; you can redistribute it and/or modify *
30  * it under the terms of the GNU General Public License as published by *
31  * the Free Software Foundation; either version 2 of the License, or *
32  * (at your option) any later version. *
33  * *
34  ***************************************************************************/
35 
36 #ifndef HISTORYLOGLINE_H
37 #define HISTORYLOGLINE_H
38 
39 #include "TObject.h"
40 #include "TDatime.h"
41 #include "HistoryDefines.hh"
42 #include "TTimeStamp.h"
43 #include "TBuffer.h"
44 #include <iostream>
45 #include <string.h>
46 
47 /**
48  *@author Stefano Longo
49  */
50 
51 using namespace std;
52 
53 namespace CWB {
54 
55 class HistoryLogLine : public TObject {
56 public:
57  HistoryLogLine(char* LogStr = NULL, TDatime* Time = NULL);
58  HistoryLogLine(char* LogStr, int Date, int Time);
59  HistoryLogLine(const HistoryLogLine& LogLine);
60  ~HistoryLogLine();
61 
62  void SetLog(char* LogStr, TDatime* Time = NULL);
63  void SetLog(char* LogStr, int Date, int Time);
64  void SetLogTime(int Date, int Time);
65  void SetLogTime(TDatime* Time);
66  char* SetLogStr(char* Log);
67 
68  char* GetLogStr();
69  int GetLogDate();
70  int GetLogTime();
71  TDatime* GetLogDatime();
72 
73  virtual void Browse(TBrowser *b);
74  void Print();
75 
76  bool IsSortable() const;
77  int Compare(const TObject* Obj) const;
78 
79  SortOrderType SetSortOrder(SortOrderType SortOrder);
80  SortOrderType GetSortOrder();
81 
82  bool IsSortOrderInsertion();
83  bool IsSortOrderDate();
84  bool IsSortOrderAlphabetical();
85 
86  bool SetAscendingSortOrder();
87  bool SetDescendantSortOrder();
88 
89  bool GetAscendingSortOrder();
90  bool GetDescendantSortOrder();
91 
92  TTimeStamp GetCreationTimeStamp();
93 
94 private:
95  void Init();
96  void Destroy();
97 
98  int Date, Time; //Date and Time in TDatetime.GetDate/Time() format;
99 
100  int LogLength; //Lengh of log = char number + 1
101  char* Log; //[LogLength]
102 
105 
108 
109  ClassDef(HistoryLogLine, 3)
110 };
111 
112 } // end namespace
113 
114 #endif
void Init()
Definition: ChirpMass.C:284
Definition: ced.hh:42
SortOrderType
STL namespace.
MDC Print()
SortOrderType SortOrder