]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliFileTag.cxx
Fixes for macosx
[u/mrichter/AliRoot.git] / STEER / AliFileTag.cxx
CommitLineData
04cb11d4 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id: AliFileTag.cxx 14745 2006-08-04 15:48:44Z panos $ */
17
18//-----------------------------------------------------------------
19// Implementation of the FileTag class
20// This is the class to deal with the tags in the file level
21// Origin: Adam Kisiel, CERN, Adam.Kisiel@cern.ch
22//-----------------------------------------------------------------
23
24#include "AliFileTag.h"
25#include <stdlib.h>
26
27ClassImp(AliFileTag)
28
29//___________________________________________________________________________
30AliFileTag::AliFileTag() :
31 TObject(),
32 fGUID(""),
33 fPath(""),
34 fsize(0),
35 fmd5(""),
36 fturl(""),
37 fEventTags(1000)
38{
39 // AliFileTag default constructor
40
41}
42
43AliFileTag::AliFileTag(const AliFileTag &tag):
44 TObject(tag),
45 fGUID(tag.fGUID),
46 fPath(tag.fPath),
47 fsize(tag.fsize),
48 fmd5(tag.fmd5),
49 fturl(tag.fturl),
50 fEventTags(10000)
51{
52 for (int iev=0; iev<tag.GetNEvents(); iev++)
53 AddEventTag(*(tag.GetEventTag(iev)));
54}
55
56AliFileTag &AliFileTag::operator=(const AliFileTag &tag)
57{
58 if (this != &tag) {
59 TObject::operator=(tag);
60
61 SetGUID(tag.GetGUID());
62 SetPath(tag.GetPath());
63 SetSize(tag.GetSize());
64 SetMD5(tag.GetMD5());
65 SetTURL(tag.GetTURL());
66
67 for (int iev=0; iev<tag.GetNEvents(); iev++)
68 AddEventTag(*(tag.GetEventTag(iev)));
69 }
70
71 return *this;
72}
73
74//___________________________________________________________________________
75AliFileTag::~AliFileTag() {
76 // AliEventTag destructor
77 // fEventTag.Delete();
78 fEventTags.Delete();
79}
80
81//___________________________________________________________________________
82void AliFileTag::AddEventTag(const AliEventTag & EvTag) {
83 //Adds an entry to the event tag TClonesArray
84
85 fEventTags.Add(new AliEventTag(EvTag));
86}
87
88void AliFileTag::CopyFileInfo(const AliFileTag &tag)
89{
90 SetGUID(tag.GetGUID());
91 SetPath(tag.GetPath());
92 SetSize(tag.GetSize());
93 SetMD5(tag.GetMD5());
94 SetTURL(tag.GetTURL());
95}