Coherent WaveBurst
Reference Guide
CWB Documentation
Main Page
Namespaces
All Classes
Files
gitlab
ROOT
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
SOFT
cWB
library
master_0bc430d
tools
history
History.hh
Go to the documentation of this file.
1
/***************************************************************************
2
History.h - description
3
-------------------
4
begin : lun set 5 2005
5
copyright : (C) 2005 by Stefano Longo
6
email : Stefano.Longo@lnl.infn.it
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef HISTORY_H
19
#define HISTORY_H
20
21
#include "TObject.h"
22
#include "TList.h"
23
#include "TObjString.h"
24
#include "TDatime.h"
25
#include "TTimeStamp.h"
26
#include <iostream>
27
28
#include "
HistoryStage.hh
"
29
#include "
HistoryDefines.hh
"
30
31
#define HEADER_WIDTH 80
32
33
34
using namespace
std
;
35
36
namespace
CWB
{
37
38
class
History
:
public
TObject {
39
public
:
40
History
(
char
** StageNames = NULL,
int
StageNumber = 0,
char
** TypeNames = NULL,
int
TypeNumber = 0,
char
* FilePrefix = NULL,
bool
HistoryModify =
false
);
41
History
(
const
History
&
History
);
42
~History();
43
44
bool
StageAllowed(
char
* Name);
45
bool
StageAlreadyPresent(
char
* Name);
46
47
bool
NameAllowed(
char
* Name);
48
bool
TypeAllowed(
char
* Name);
49
50
void
SetStageNames(
char
** StageNames,
int
StageNumber);
51
void
SetTypeNames(
char
** TypeNames,
int
TypeNumber);
52
53
void
AddLog
(
char
* Stage,
char
* Log, TDatime* Time = NULL);
54
void
AddLog
(
char
* Stage,
char
* Log,
int
Date,
int
Time);
55
56
void
AddHistory
(
char
* Stage,
char
*
Type
,
char
* History, TDatime* Time = NULL);
57
void
AddHistory
(
char
* Stage,
char
* Type,
char
* History,
int
Date,
int
Time);
58
59
void
SetFilePrefix(
char
* FilePrefix);
60
char
* GetFilePrefix();
61
62
char
* GetHistory(
char
* StageName,
char
* Type);
63
TDatime* GetHistoryDatime(
char
* StageName,
char
* Type);
64
65
int
GetLogSize(
char
* Stage);
66
char
* GetLog(
char
* Stage,
int
index
);
67
68
virtual
void
Browse(TBrowser *b);
69
void
Print
();
// *MENU*
70
void
PrintSummary();
// *MENU*
71
void
DumpToTextFile
(
char
* FileName = NULL);
// *MENU*
72
void
DumpToROOTFile(
char
* FileName = NULL);
// *MENU*
73
74
TList* GetStageNames();
75
TList* GetTypeNames();
76
77
bool
SetHistoryModify(
bool
Replace =
true
);
78
bool
GetHistoryModify();
79
80
char
* AddStage(
char
* StageName);
81
char
* RemoveStage(
char
* StageName);
82
83
char
* AddType(
char
* TypeName);
84
char
* RemoveType(
char
* TypeName);
85
86
char
* SetStageComment(
char
* Stage,
char
* Comment = NULL);
87
char
* SetTypeComment(
char
* Stage,
char
* Type,
char
* Comment = NULL);
88
89
char
* GetStageComment(
char
* Stage);
90
char
* GetTypeComment(
char
* Stage,
char
* Type);
91
92
SortOrderType
SetSortOrder(
SortOrderType
SortOrder);
93
SortOrderType
GetSortOrder();
94
95
bool
IsSortOrderInsertion();
96
bool
IsSortOrderDate();
97
bool
IsSortOrderAlphabetical();
98
99
bool
SetAscendingSortOrder();
100
bool
SetDescendantSortOrder();
101
102
bool
GetAscendingSortOrder();
103
bool
GetDescendantSortOrder();
104
105
void
Sort();
106
107
TTimeStamp GetCreationTimeStamp();
108
TTimeStamp GetCreationTimeStamp(
char
* Stage);
109
110
const
CWB::HistoryStage
* GetStage(
char
* Name);
111
112
void
HistoryException(
int
type,
const
char
*location,
const
char
*msgfmt, ...);
113
114
private
:
115
void
Init
();
116
void
Destroy();
117
bool
DuplicateNames(
char
** NameList,
int
NameNumber);
118
void
WriteToFile(
char
* FileName,
bool
SummaryOnly =
false
);
119
int
GetStagePosition(
char
* Name);
120
121
TList
StageNames
;
122
TList
TypeNames
;
123
124
TList
StageList
;
125
TObjString
FilePrefix
;
126
127
bool
HistoryModify
;
128
SortOrderType
SortOrder
;
129
bool
AscendingOrder
;
130
131
long
CreationDate_Sec
;
132
long
CreationDate_NSec
;
133
134
ClassDef(History, 3)
135
};
136
137
}
// end namespace
138
139
#endif
HistoryStage.hh
Init
void Init()
Definition:
ChirpMass.C:280
CWB::History::HistoryModify
bool HistoryModify
Definition:
History.hh:127
CWB
Definition:
ced.hh:24
CWB::History::CreationDate_Sec
long CreationDate_Sec
Definition:
History.hh:131
SortOrderType
SortOrderType
Definition:
HistoryDefines.hh:10
CWB::History::SortOrder
SortOrderType SortOrder
Definition:
History.hh:128
std
STL namespace.
CWB::History::CreationDate_NSec
long CreationDate_NSec
Definition:
History.hh:132
AddLog
history AddLog(job_stage,"START JOB")
HistoryDefines.hh
CWB::History
Definition:
History.hh:38
Print
MDC Print()
DumpToTextFile
ihistory DumpToTextFile(historyFile)
CWB::HistoryStage
Definition:
HistoryStage.hh:37
CWB::History::StageNames
TList StageNames
Definition:
History.hh:121
CWB::History::AscendingOrder
bool AscendingOrder
Definition:
History.hh:129
CWB::History::FilePrefix
TObjString FilePrefix
Definition:
History.hh:125
AddHistory
history AddHistory(job_stage,"WATVERSION", watversion('s'))
index
wavearray< int > index
Definition:
TestEulerCharacteristic.C:5
CWB::History::TypeNames
TList TypeNames
Definition:
History.hh:122
Type
Type
Definition:
FrDisplay.cc:105
CWB::History::StageList
TList StageList
Definition:
History.hh:124