66 class TDSetElement :
public TNamed {
68 typedef std::list<std::pair<TDSetElement*, TString> > FriendsList_t;
71 kHasBeenLookedUp = BIT(15),
84 Long64_t fTDSetOffset;
96 Bool_t HasBeenLookedUp()
const {
return TestBit(kHasBeenLookedUp); }
98 TDSetElement& operator=(
const TDSetElement &);
102 TDSetElement(
const char *file,
const char *objname = 0,
103 const char *dir = 0, Long64_t first = 0, Long64_t num = -1,
104 const char *msd = 0,
const char *dataset = 0);
105 TDSetElement(
const TDSetElement& elem);
106 virtual ~TDSetElement();
108 virtual TList *GetListOfFriends()
const {
return fFriends; }
109 virtual void AddFriend(TDSetElement *friendElement,
const char *alias);
110 virtual void DeleteFriends();
111 const char *GetFileName()
const {
return GetName(); }
112 Long64_t GetFirst()
const {
return fFirst; }
113 void SetFirst(Long64_t first) { fFirst = first; }
114 Long64_t GetNum()
const {
return fNum; }
115 Long64_t GetEntries(Bool_t istree = kTRUE, Bool_t openfile = kTRUE);
116 void SetEntries(Long64_t ent) { fEntries = ent; }
117 const char *GetMsd()
const {
return fMsd; }
118 void SetNum(Long64_t num) { fNum = num; }
119 Bool_t GetValid()
const {
return fValid; }
120 const char *GetObjName()
const {
return GetTitle(); }
121 const char *GetDirectory()
const;
122 const char *GetDataSet()
const {
return fDataSet; }
123 void SetDataSet(
const char *dataset) { fDataSet = dataset; }
124 void AddAssocObj(TObject *assocobj);
125 TList *GetListOfAssocObjs()
const {
return fAssocObjList; }
126 TObject *GetAssocObj(Long64_t i, Bool_t isentry = kFALSE);
127 void Print(Option_t *options=
"")
const;
128 Long64_t GetTDSetOffset()
const {
return fTDSetOffset; }
129 void SetTDSetOffset(Long64_t offset) { fTDSetOffset = offset; }
130 void SetEntryList(TObject *aList, Long64_t first = -1, Long64_t num = -1);
131 TObject *GetEntryList()
const {
return fEntryList; }
132 void Validate(Bool_t isTree);
133 void Validate(TDSetElement *elem);
134 void Invalidate() { fValid = kFALSE; }
135 void SetValid() { fValid = kTRUE; }
136 Int_t Compare(
const TObject *obj)
const;
137 Bool_t IsSortable()
const {
return kTRUE; }
138 Int_t Lookup(Bool_t force = kFALSE);
139 void SetLookedUp() { SetBit(kHasBeenLookedUp); }
140 TFileInfo *GetFileInfo(
const char *type =
"TTree");
144 Float_t GetMaxProcTime()
const {
return fMaxProcTime; }
145 void SetMaxProcTime(Float_t mpt) { fMaxProcTime = mpt; }
147 Int_t MergeElement(TDSetElement *elem);
149 ClassDef(TDSetElement,9)
153 class TDSet :
public TNamed {
160 kValidityChecked = BIT(18),
161 kSomeInvalid = BIT(19),
162 kMultiDSet = BIT(20),
169 TProofChain *fProofChain;
171 void SplitEntryList();
173 TDSet(
const TDSet &);
174 void operator=(
const TDSet &);
180 THashList *fElements;
182 TDSetElement *fCurrent;
188 TDSet(
const char *name,
const char *objname =
"*",
189 const char *dir =
"/",
const char *type = 0);
190 TDSet(
const TChain &chain, Bool_t withfriends = kTRUE);
193 virtual Bool_t Add(
const char *file,
const char *objname = 0,
194 const char *dir = 0, Long64_t first = 0,
195 Long64_t num = -1,
const char *msd = 0);
196 virtual Bool_t Add(TDSet *set);
197 virtual Bool_t Add(TCollection *fileinfo,
const char *meta = 0,
198 Bool_t availableOnly = kFALSE, TCollection *badlist = 0);
199 virtual Bool_t Add(TFileInfo *fileinfo,
const char *meta = 0);
200 virtual void AddFriend(TDSet *friendset,
const char *alias);
202 virtual Long64_t Process(TSelector *selector, Option_t *option =
"",
203 Long64_t nentries = -1,
204 Long64_t firstentry = 0,
206 virtual Long64_t Process(
const char *selector, Option_t *option =
"",
207 Long64_t nentries = -1,
208 Long64_t firstentry = 0,
210 virtual Long64_t Draw(
const char *varexp,
const char *selection,
211 Option_t *option =
"", Long64_t nentries = -1,
212 Long64_t firstentry = 0);
213 virtual Long64_t Draw(
const char *varexp,
const TCut &selection,
214 Option_t *option =
"", Long64_t nentries = -1,
215 Long64_t firstentry = 0);
216 virtual void Draw(Option_t *opt) { Draw(opt,
"",
"", -1, 0); }
218 Int_t ExportFileList(
const char *filepath, Option_t *opt =
"");
220 void Print(Option_t *option=
"")
const;
222 void SetObjName(
const char *objname);
223 void SetDirectory(
const char *dir);
225 Bool_t IsTree()
const {
return fIsTree; }
226 Bool_t IsValid()
const {
return !fType.IsNull(); }
227 Bool_t ElementsValid();
228 const char *GetType()
const {
return fType; }
229 const char *GetObjName()
const {
return fObjName; }
230 const char *GetDirectory()
const {
return fDir; }
231 TList *GetListOfElements()
const {
return (TList *)fElements; }
232 Int_t GetNumOfFiles();
234 Int_t Remove(TDSetElement *elem, Bool_t deleteElem = kTRUE);
236 virtual void Reset();
237 virtual TDSetElement *Next(Long64_t totalEntries = -1);
238 TDSetElement *Current()
const {
return fCurrent; };
240 static Long64_t GetEntries(Bool_t isTree,
const char *filename,
241 const char *path, TString &objname);
243 void AddInput(TObject *obj);
245 TObject *GetOutput(
const char *name);
246 TList *GetOutputList();
247 virtual void StartViewer();
249 virtual TTree *GetTreeHeader(TProof *proof);
250 virtual void SetEntryList(TObject *aList);
251 TObject *GetEntryList()
const {
return fEntryList; }
253 void Validate(TDSet *dset);
255 void Lookup(Bool_t removeMissing = kFALSE, TList **missingFiles = 0);
258 void SetSrvMaps(TList *srvmaps = 0);
260 void SetWriteV3(Bool_t on = kTRUE);