]>
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 | ||
c82bb898 | 25 | using std::ofstream; |
d08133e6 | 26 | //___________________________________________________________________________ |
27 | class AliXMLCollection : public TGridCollection { | |
28 | ||
29 | public: | |
30 | AliXMLCollection(); | |
31 | AliXMLCollection(const char *localCollectionFile); | |
32 | AliXMLCollection(const AliXMLCollection& collection); | |
33 | ||
34 | virtual ~AliXMLCollection(); | |
35 | ||
36 | //____________________________________________________// | |
37 | Bool_t WriteHeader(); | |
f0f29480 | 38 | Bool_t WriteSummary(Int_t aTotal, Int_t aAccepted, Int_t aRejRun, Int_t aRejLHC, Int_t aRejDet, Int_t aRejEvt); |
d08133e6 | 39 | Bool_t WriteBody(Int_t counter, const char* guid, const char *lfn, const char *turl, TEntryList *fEntryList); |
f0f29480 | 40 | Bool_t WriteBody(Int_t counter, const char* guid, const char *lfn, const char *turl, TEntryList *fEntryListm, Int_t accSum, Int_t rejSum); |
d08133e6 | 41 | Bool_t Export(); |
42 | ||
43 | void SetCollectionName(const char* name) {fCollectionName = name;} | |
44 | ||
45 | //____________________________________________________// | |
26f071d8 | 46 | const char* GetCollectionName() const {return fCollectionName.Data();} |
d08133e6 | 47 | |
48 | //____________________________________________________// | |
49 | void Reset(); | |
50 | TMap *Next(); | |
51 | Bool_t Remove(TMap *map); | |
26f071d8 | 52 | const char *GetTURL(const char *name); |
53 | const char *GetLFN(const char *name); | |
54 | const char *GetGUID(const char *name); | |
f0f29480 | 55 | const char *GetCutSumm(); |
d08133e6 | 56 | TEntryList *GetEventList(const char *filename) const; |
3d456d99 | 57 | TEntryList *GetEntryList(const char *filename) { return GetEventList(filename); } |
26f071d8 | 58 | Bool_t OverlapCollection(TGridCollection * comparator); |
f690bf48 | 59 | Bool_t GetCollectionSummary(Int_t *aTot, Int_t *aAcc, Int_t *aRejRun, Int_t *aRejLHC, Int_t *aRejDet, Int_t *aRejEvt) const; |
d08133e6 | 60 | |
61 | static AliXMLCollection *Open(const char *localcollectionfile); | |
62 | ||
63 | //____________________________________________________// | |
64 | protected: | |
65 | virtual void ParseXML(); | |
66 | ||
67 | TString fXmlFile; // collection XML file | |
68 | TList *fEventList; // list with event file maps | |
69 | TIter *fEventListIter; // event file list iterator | |
70 | TMap *fCurrent; // current event file map | |
71 | TString fCollectionName; //the name of the xml file | |
72 | ofstream fout; // The output stream | |
f0f29480 | 73 | |
74 | // List summary information | |
75 | Int_t fTotalEvents; // Total no. of events in collection | |
76 | Int_t fAcceptedEvents; // No. of accepted events in collection | |
77 | Int_t fRejectedRun; // No. of events rejected by Run cuts | |
78 | Int_t fRejectedLHC; // No. of events rejected by LHC cuts | |
79 | Int_t fRejectedDet; // No. of events rejected by Detector cuts | |
80 | Int_t fRejectedEvt; // No. of events rejected by Event cuts | |
d08133e6 | 81 | |
82 | AliXMLCollection & operator=(const AliXMLCollection & ) {return *this;} | |
83 | ||
84 | ClassDef(AliXMLCollection,0) //(ClassName, ClassVersion) | |
85 | }; | |
86 | //___________________________________________________________________________ | |
87 | ||
88 | #endif |