]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliXMLCollection.h
Bug fix
[u/mrichter/AliRoot.git] / STEER / AliXMLCollection.h
CommitLineData
c1b83ab9 1#ifndef ALIXMLCOLLECTION_H
2#define ALIXMLCOLLECTION_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7/* $Id$ */
8
9//-------------------------------------------------------------------------
10// Class AliXMLCollection
11// This is the class that creates XML collections after querying the tags
12//
13// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
14//-------------------------------------------------------------------------
15
16#include <TObject.h>
1ca27a6f 17#include "TGridCollection.h"
c1b83ab9 18#include <Riostream.h>
19#include <TString.h>
20
1ca27a6f 21class TMap;
22class TIter;
1ca27a6f 23class TEntryList;
c1b83ab9 24
25//___________________________________________________________________________
1ca27a6f 26class AliXMLCollection : public TGridCollection {
c1b83ab9 27
28 public:
29 AliXMLCollection();
1ca27a6f 30 AliXMLCollection(const char *localCollectionFile);
31 AliXMLCollection(const AliXMLCollection& collection);
32
33 virtual ~AliXMLCollection();
c1b83ab9 34
35 //____________________________________________________//
36 Bool_t WriteHeader();
5b7be856 37 Bool_t WriteBody(Int_t counter, const char* guid, const char *lfn, const char *turl, TEntryList *fEntryList);
c1b83ab9 38 Bool_t Export();
39
40 void SetCollectionName(const char* name) {fCollectionName = name;}
41
42 //____________________________________________________//
43 const char* GetCollectionName() {return fCollectionName.Data();}
44
1ca27a6f 45 //____________________________________________________//
46 void Reset();
47 TMap *Next();
48 Bool_t Remove(TMap *map);
49 const char *GetTURL(const char *name) const;
50 const char *GetLFN(const char *name) const;
a3d56f81 51 const char *GetGUID(const char *name) const;
1ca27a6f 52 TEntryList *GetEventList(const char *filename) const;
53 Bool_t OverlapCollection(AliXMLCollection * comparator);
54
55 static AliXMLCollection *Open(const char *localcollectionfile);
56
c1b83ab9 57 //____________________________________________________//
58 protected:
1ca27a6f 59 virtual void ParseXML();
60
61 TString fXmlFile; // collection XML file
62 TList *fEventList; // list with event file maps
63 TIter *fEventListIter; // event file list iterator
64 TMap *fCurrent; // current event file map
65 TString fCollectionName; //the name of the xml file
c1b83ab9 66 ofstream fout; // The output stream
67
1ca27a6f 68 AliXMLCollection & operator=(const AliXMLCollection & ) {return *this;}
69
c1b83ab9 70 ClassDef(AliXMLCollection,0) //(ClassName, ClassVersion)
71};
72//___________________________________________________________________________
73
74#endif