ROOT  6.06/09
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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TProofQueryResult //
15 // //
16 // TQueryResult version adapted to PROOF neeeds. //
17 // //
18 //////////////////////////////////////////////////////////////////////////
19 
20 #include "TDSet.h"
21 #include "TError.h"
22 #include "TList.h"
23 #include "TProofQueryResult.h"
24 #include "TSystem.h"
25 
26 
28 
29 ////////////////////////////////////////////////////////////////////////////////
30 /// Main constructor.
31 
32 TProofQueryResult::TProofQueryResult(Int_t sn, const char *opt, TList *inlist,
33  Long64_t ent, Long64_t fst, TDSet *dset,
34  const char *sel, TObject *elist)
35  : TQueryResult(sn, opt, inlist, ent, fst, sel)
36 {
37  fNumWrks = -1;
38  fStartLog = -1;
39 
40  // Add data sets and event lists to the input list
41  if (fInputList && dset)
42  fInputList->Add(dset);
43  if (fInputList && elist)
44  fInputList->Add(elist);
45 }
46 
47 ////////////////////////////////////////////////////////////////////////////////
48 /// Call when running starts.
49 
50 void TProofQueryResult::SetRunning(Int_t startlog, const char *par, Int_t nwrks)
51 {
52  Info("SetRunning", "nwrks: %d", nwrks);
53 
54  fStatus = kRunning;
55  fNumWrks = nwrks;
56  fStart.Set();
57  fEnd.Set(fStart.Convert()-1);
58  fParList = (par && (strlen(par) > 0)) ? par : "-";
59  fStartLog = startlog;
60 
61  // Add header to log file
62  fLogFile->AddLine("+++");
63  fLogFile->AddLine(Form("+++ Start processing query # %d (log file offset: %d)",
64  fSeqNum, startlog));
65  fLogFile->AddLine("+++");
66 }
double par[1]
Definition: unuranDistr.cxx:38
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.
Definition: TDatime.cxx:179
long long Long64_t
Definition: RtypesCore.h:69
void Set()
Set Date/Time to current time as reported by the system.
Definition: TDatime.cxx:286
EQueryStatus fStatus
Definition: TQueryResult.h:62
Definition: TDSet.h:153
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
int Int_t
Definition: RtypesCore.h:41
TDatime fEnd
Definition: TQueryResult.h:64
TMacro * fLogFile
Definition: TQueryResult.h:71
TDatime fStart
Definition: TQueryResult.h:63
A container class for query results.
Definition: TQueryResult.h:44
A doubly linked list.
Definition: TList.h:47
char * Form(const char *fmt,...)
void SetRunning(Int_t startlog, const char *par, Int_t nwrks)
Call when running starts.
Int_t fNumWrks
Definition: TQueryResult.h:86
Mother of all ROOT objects.
Definition: TObject.h:58
ClassImp(TProofQueryResult) TProofQueryResult
Main constructor.
TString fParList
Definition: TQueryResult.h:75
virtual TObjString * AddLine(const char *text)
Add line with text in the list of lines of this macro.
Definition: TMacro.cxx:137