]>
Commit | Line | Data |
---|---|---|
d08133e6 | 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> | |
17 | #include "TGridCollection.h" | |
18 | #include <Riostream.h> | |
19 | #include <TString.h> | |
20 | ||
21 | class TMap; | |
22 | class TIter; | |
23 | class TEntryList; | |
24 | ||
25 | //___________________________________________________________________________ | |
26 | class AliXMLCollection : public TGridCollection { | |
27 | ||
28 | public: | |
29 | AliXMLCollection(); | |
30 | AliXMLCollection(const char *localCollectionFile); | |
31 | AliXMLCollection(const AliXMLCollection& collection); | |
32 | ||
33 | virtual ~AliXMLCollection(); | |
34 | ||
35 | //____________________________________________________// | |
36 | Bool_t WriteHeader(); | |
37 | Bool_t WriteBody(Int_t counter, const char* guid, const char *lfn, const char *turl, TEntryList *fEntryList); | |
38 | Bool_t Export(); | |
39 | ||
40 | void SetCollectionName(const char* name) {fCollectionName = name;} | |
41 | ||
42 | //____________________________________________________// | |
26f071d8 | 43 | const char* GetCollectionName() const {return fCollectionName.Data();} |
d08133e6 | 44 | |
45 | //____________________________________________________// | |
46 | void Reset(); | |
47 | TMap *Next(); | |
48 | Bool_t Remove(TMap *map); | |
26f071d8 | 49 | const char *GetTURL(const char *name); |
50 | const char *GetLFN(const char *name); | |
51 | const char *GetGUID(const char *name); | |
d08133e6 | 52 | TEntryList *GetEventList(const char *filename) const; |
3d456d99 | 53 | TEntryList *GetEntryList(const char *filename) { return GetEventList(filename); } |
26f071d8 | 54 | Bool_t OverlapCollection(TGridCollection * comparator); |
d08133e6 | 55 | |
56 | static AliXMLCollection *Open(const char *localcollectionfile); | |
57 | ||
58 | //____________________________________________________// | |
59 | protected: | |
60 | virtual void ParseXML(); | |
61 | ||
62 | TString fXmlFile; // collection XML file | |
63 | TList *fEventList; // list with event file maps | |
64 | TIter *fEventListIter; // event file list iterator | |
65 | TMap *fCurrent; // current event file map | |
66 | TString fCollectionName; //the name of the xml file | |
67 | ofstream fout; // The output stream | |
68 | ||
69 | AliXMLCollection & operator=(const AliXMLCollection & ) {return *this;} | |
70 | ||
71 | ClassDef(AliXMLCollection,0) //(ClassName, ClassVersion) | |
72 | }; | |
73 | //___________________________________________________________________________ | |
74 | ||
75 | #endif |