Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TProofQueryResult.cxx
Go to the documentation of this file.
1 // @(#)root/proof:$Id$
2 // Author: G Ganis Sep 2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /** \class TProofQueryResult
13 \ingroup proofkernel
14 
15 TQueryResult version adapted to PROOF neeeds
16 
17 */
18 
19 #include "TDSet.h"
20 #include "TError.h"
21 #include "TList.h"
22 #include "TProofQueryResult.h"
23 #include "TSystem.h"
24 
25 
26 ClassImp(TProofQueryResult);
27 
28 ////////////////////////////////////////////////////////////////////////////////
29 /// Main constructor.
30 
31 TProofQueryResult::TProofQueryResult(Int_t sn, const char *opt, TList *inlist,
32  Long64_t ent, Long64_t fst, TDSet *dset,
33  const char *sel, TObject *elist)
34  : TQueryResult(sn, opt, inlist, ent, fst, sel)
35 {
36  fNumWrks = -1;
37  fStartLog = -1;
38 
39  // Add data sets and event lists to the input list
40  if (fInputList && dset)
41  fInputList->Add(dset);
42  if (fInputList && elist)
43  fInputList->Add(elist);
44 }
45 
46 ////////////////////////////////////////////////////////////////////////////////
47 /// Call when running starts.
48 
49 void TProofQueryResult::SetRunning(Int_t startlog, const char *par, Int_t nwrks)
50 {
51  Info("SetRunning", "nwrks: %d", nwrks);
52 
53  fStatus = kRunning;
54  fNumWrks = nwrks;
55  fStart.Set();
56  fEnd.Set(fStart.Convert()-1);
57  fParList = (par && (strlen(par) > 0)) ? par : "-";
58  fStartLog = startlog;
59 
60  // Add header to log file
61  fLogFile->AddLine("+++");
62  fLogFile->AddLine(Form("+++ Start processing query # %d (log file offset: %d)",
63  fSeqNum, startlog));
64  fLogFile->AddLine("+++");
65 }