You are here

The INPUT list

The input list is a list of TObject which is made available at running time on each participating node and in the TSelector object (fInput member). This list is meant to provide a way to provide relevant information for the query and can therefore be used to control the job.

  1. Adding / Removing objects to / from the input list
  2. Working with parameters
  3. Working with large input objects
  4. List of parameters already used by PROOF

 

1. Adding / Removing objects to / from the input list

PROOF provides the following API to handle generic input objects: 

void TProof::AddInput(TObject *obj)
Purpose Provide a hook to add an object to the input list
obj Object to be added; though not mandatory, it is recommended that this object is named, so that it can be easily searched for by name.
void TProof::ClearInput()
Purpose Clear the input list
TList *TProof::GetInputList()
Purpose Get a pointer to the input list

 

2. Working with parameters

One of the main usage of the input list is to set parameters for the selector. PROOF provides and interface to automatically add or retrieve TParameter objects to / from the input list:

void TProof::SetParameter(const char *name, const char *par)

void TProof::SetParameter(const char *name, Int_t par)

void TProof::SetParameter(const char *name, Long_t par)

void TProof::SetParameter(const char *name, Long64_t par)

void TProof::SetParameter(const char *name, Double_t par)

Purpose Provide a way to add named parameters of the specified type
name Name of the parameter
par Value of the parameter

TObject *TProof::GetParameter(const char *name)

Purpose Provide a way to get a named parameter from the input list; the returned object must be cast to the relevant TParameter<...> implementation
name Name of the parameter

Int_t TProof::GetParameter(TCollection *c, const char *name, TString &par)

Int_t TProof::GetParameter(TCollection *c, const char *name, Int_t &par)

Int_t TProof::GetParameter(TCollection *c, const char *name, Long_t &par)

Int_t TProof::GetParameter(TCollection *c, const char *name, Long64_t &par)

Int_t TProof::GetParameter(TCollection *c, const char *name, Double_t &par)

Purpose Provide a way to retrieve named parameters of the specified type from a generic collection; these methods are static.
name Name of the parameter
par Value of the parameter
Return 0 on success; -1 on error (parameter not found)

 

3. Working with large input objects

When the input objects are large - e.g. TH3 calibration maps - the default way of distributing - i.e. the input list by streaming in the main message - can be very inefficient. PROOF provides an optimized way to distribute these input data constisting in saving these objects into a ROOT file and distributing the file in an optimized way, i.e. compressed, only if any of these objects has changed and only to the unique workers. These objects are available in the nodes via the input list just as the others. The following API is available for theis purpose:

 

void TProof::AddInputData(TObject *obj, Bool_t push)
Purpose Add an object to the input data list
obj Object to be added; though not mandatory, it is recommended that this object is named, so that it can be easily searched for by name.
push If TRUE the input data are sent over even if no apparent change occured to the input data list
void TProof::ClearInputData(TObject *obj)
Purpose Remove object from the input data list
obj Object to be removed; if null, all input data objects are removed
void TProof::ClearInputData(const char *name)
Purpose Remove named object from the input data list
name Name of the object to be removed
void TProof::SetInputDataFile(const char *datafile)
Purpose Set the file to be used to optimally distribute the input data objects. If the file exists the object in the file are added to those in the input data list
datafile Path to the file