Logo ROOT   6.14/05
Reference Guide
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 
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 }
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:854
long long Long64_t
Definition: RtypesCore.h:69
void Set()
Set Date/Time to current time as reported by the system.
Definition: TDatime.cxx:288
EQueryStatus fStatus
query status
Definition: TQueryResult.h:54
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:153
int Int_t
Definition: RtypesCore.h:41
TDatime fEnd
time when processing ended
Definition: TQueryResult.h:56
TMacro * fLogFile
file with log messages from the query
Definition: TQueryResult.h:63
TDatime fStart
time when processing started
Definition: TQueryResult.h:55
A container class for query results.
Definition: TQueryResult.h:36
A doubly linked list.
Definition: TList.h:44
TList * fInputList
input list; contains also data sets, entry list, ...
Definition: TQueryResult.h:59
char * Form(const char *fmt,...)
void SetRunning(Int_t startlog, const char *par, Int_t nwrks)
Call when running starts.
Int_t fNumWrks
Number of workers at start.
Definition: TQueryResult.h:78
Int_t fSeqNum
query unique sequential number
Definition: TQueryResult.h:52
#define ClassImp(name)
Definition: Rtypes.h:359
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.
Definition: TDatime.cxx:181
TQueryResult version adapted to PROOF neeeds.
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void Add(TObject *obj)
Definition: TList.h:87
TString fParList
colon-separated list of PAR loaded at fStart
Definition: TQueryResult.h:67
virtual TObjString * AddLine(const char *text)
Add line with text in the list of lines of this macro.
Definition: TMacro.cxx:139