24 TTimeStamp CreationTT;
38 this->
Type = strdup(HistoryLine.
Type);
78 if (
Type == NULL)
return NULL;
79 else return strdup(
Type);
84 if (Comment == NULL)
return NULL;
85 else return strdup(Comment);
90 if (
History == NULL)
return NULL;
101 cout <<
"Type : " <<
Type << endl;
102 cout <<
"Comment : " << Comment << endl;
103 cout <<
"History : " <<
History << endl;
117 if (this->CreationDate_Sec < static_cast<HistoryLine*>(const_cast<TObject*>(Obj))->CreationDate_Sec) Result = -1;
118 else if (this->CreationDate_Sec > static_cast<HistoryLine*>(const_cast<TObject*>(Obj))->CreationDate_Sec) Result = 1;
119 else if (this->CreationDate_NSec < static_cast<HistoryLine*>(const_cast<TObject*>(Obj))->CreationDate_NSec) Result = -1;
120 else if (this->CreationDate_NSec > static_cast<HistoryLine*>(const_cast<TObject*>(Obj))->CreationDate_NSec) Result = 1;
123 Result = strcmp(this->
Type, static_cast<HistoryLine*>(const_cast<TObject*>(Obj))->
Type);
124 if (Result == 0) Result = strcmp(this->
History, static_cast<HistoryLine*>(const_cast<TObject*>(Obj))->
History);
137 else this->SortOrder = SortOrder;
138 return this->SortOrder;
166 AscendingOrder =
true;
167 return AscendingOrder;
172 AscendingOrder =
false;
173 return AscendingOrder;
178 return AscendingOrder;
183 return !AscendingOrder;
188 TTimeStamp CreationTT(CreationDate_Sec, CreationDate_NSec);
208 if (Comment != NULL)
delete Comment;
213 if (this->Type != NULL)
delete this->
Type;
216 TypeLength = strlen(Type) + 1;
217 this->Type =
new char[TypeLength];
222 this->Type =
new char[1];
229 if (this->Comment != NULL)
delete this->Comment;
231 if (Comment != NULL) {
232 CommentLength = strlen(Comment) + 1;
233 this->Comment =
new char[CommentLength];
234 strcpy(this->Comment, Comment);
238 this->Comment =
new char[1];
239 this->Comment[0] = 0;
245 if (this->History != NULL)
delete this->History;
247 if (History != NULL) {
248 HistoryLength = strlen(History) + 1;
249 this->History =
new char[HistoryLength];
250 strcpy(this->History, History);
254 this->History =
new char[1];
255 this->History[0] = 0;
259 void CWB::HistoryLine::Streamer(TBuffer &R__b)
262 TDatime CreationDatime;
263 TTimeStamp CreationTT;
266 if (R__b.IsReading()) {
267 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
if (R__v) { }
268 TObject::Streamer(R__b);
270 R__b >> HistoryLength;
272 Type =
new char[TypeLength];
273 R__b.ReadFastArray(
Type,TypeLength);
275 History =
new char[HistoryLength];
276 R__b.ReadFastArray(History,HistoryLength);
278 R__b >> CommentLength;
280 Comment =
new char[CommentLength];
281 R__b.ReadFastArray(Comment,CommentLength);
282 R__b >> (Int_t&)SortOrder;
283 R__b >> AscendingOrder;
285 CreationDatime.Streamer(R__b);
286 CreationTT.Set(CreationDatime.GetYear(), CreationDatime.GetMonth(), CreationDatime.GetDay(), CreationDatime.GetHour(), CreationDatime.GetMinute(), CreationDatime.GetSecond(), 0,
true, 0);
287 CreationDate_Sec = CreationTT.GetSec();
288 CreationDate_NSec = CreationTT.GetNanoSec();
291 R__b >> CreationDate_Sec;
292 R__b >> CreationDate_NSec;
293 R__b.CheckByteCount(R__s, R__c, CWB::HistoryLine::IsA());
301 CreationDate_Sec = CreationTT.GetSec();
302 CreationDate_NSec = CreationTT.GetNanoSec();
305 R__c = R__b.WriteVersion(CWB::HistoryLine::IsA(), kTRUE);
306 TObject::Streamer(R__b);
308 R__b << HistoryLength;
309 R__b.WriteFastArray(
Type,TypeLength);
310 R__b.WriteFastArray(History,HistoryLength);
311 R__b << CommentLength;
312 R__b.WriteFastArray(Comment,CommentLength);
313 R__b << (Int_t)SortOrder;
314 R__b << AscendingOrder;
315 R__b << CreationDate_Sec;
316 R__b << CreationDate_NSec;
317 R__b.SetByteCount(R__c, kTRUE);
323 cout << location <<
" " << msgfmt << endl;
bool IsSortOrderInsertion()
#define DEFAULT_SORT_ORDER
char * SetHistoryType(char *Type)
bool SetAscendingSortOrder()
virtual void Browse(TBrowser *b)
bool SetDescendantSortOrder()
char * GetHistoryComment()
void HistoryLineException(int type, const char *location, const char *msgfmt,...)
bool GetDescendantSortOrder()
int Compare(const TObject *Obj) const
SortOrderType GetSortOrder()
SortOrderType SetSortOrder(SortOrderType SortOrder)
bool GetAscendingSortOrder()
TTimeStamp GetCreationTimeStamp()
void SetHistory(char *Type, char *Comment, char *History)
char * SetHistoryStr(char *History)
bool IsSortOrderAlphabetical()
strcpy(RunLabel, RUN_LABEL)
#define DEFAULT_ASCENDING
void HistorySet(char *History)
HistoryLine(char *Type=NULL, char *Comment=NULL, char *History=NULL)
char * SetHistoryComment(char *Comment)
void CommentSet(char *Comment)