AliPhysics  c7b8e89 (c7b8e89)
AliPWGJETrainHelpers Class Reference

Helpers for configure the PWGJE trains. More...

#include <AliPWGJETrainHelpers.h>

Static Public Member Functions

static std::vector< std::string > ExtractAliEnProductionValuesForLEGOTrain ()
 

Detailed Description

Helpers for configure the PWGJE trains.

Set of helper functions to aid in configuration of PWGJE trains.

Author
Raymond Ehlers raymo.nosp@m.nd.e.nosp@m.hlers.nosp@m.@yal.nosp@m.e.edu, Yale University
Date
Nov 09, 2018

Definition at line 17 of file AliPWGJETrainHelpers.h.

Member Function Documentation

std::vector< std::string > AliPWGJETrainHelpers::ExtractAliEnProductionValuesForLEGOTrain ( )
static

Automatically extract AliEn production parameters from environment variables for use with the LEGO train. These parameters will be used to configure the shared global variables on each train.

Usage should look like:

// Determine the variables.
std::vector<std::string> tempVariables = AliPWGJETrainHelpers::ExtractAliEnProductionValuesForLEGOTrain();
// Assign them to their final global variables.
const char* kPeriod = tempVariables.at(0).c_str();
const char* kColType = tempVariables.at(1).c_str();
const bool kMC = (tempVariables.at(2) == "true" ? true : false);
const bool kIsRun2 = (tempVariables.at(3) == "true" ? true : false);

Note that we cannot return the values by taking them by reference in the arguments because that would involve reassigning global variables, which is not allowed.

The returned parameters correspond to:

  • period (std::string): The run period. For example, "LHC15o".
  • collType (std::string): The collision type. Can be "pp", "pPb", "PbPb", etc.
  • mc (bool): True if this is an MC production.
  • isRun2 (bool): True if the run period is in Run 2.
    Returns
    std::vector<std::string> containing {run period, collision type, mc, isRun2}.

Definition at line 27 of file AliPWGJETrainHelpers.cxx.


The documentation for this class was generated from the following files: