Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | List of all members
MTCalibPebHypoTool::ROBRequestInstruction Struct Reference

ROB request instruction description. More...

Collaboration diagram for MTCalibPebHypoTool::ROBRequestInstruction:

Public Types

enum  Type {
  INVALID, ADD, GET, ADDGET,
  COL
}
 Type of instruction. More...
 

Public Member Functions

 ROBRequestInstruction (std::string_view str)
 Constructor from string key in the ROBAccessDict property. More...
 
const std::string toString () const
 String form for debug print-outs. More...
 

Public Attributes

enum MTCalibPebHypoTool::ROBRequestInstruction::Type type = INVALID
 
bool isRandom = false
 Flag switching requests of a random sub-sample of the ROB list. More...
 
size_t nRandom = 0
 Size of random request. More...
 

Detailed Description

ROB request instruction description.

Definition at line 49 of file MTCalibPebHypoTool.h.

Member Enumeration Documentation

◆ Type

Type of instruction.

Enumerator
INVALID 
ADD 
GET 
ADDGET 
COL 

Definition at line 55 of file MTCalibPebHypoTool.h.

Constructor & Destructor Documentation

◆ ROBRequestInstruction()

MTCalibPebHypoTool::ROBRequestInstruction::ROBRequestInstruction ( std::string_view  str)

Constructor from string key in the ROBAccessDict property.

Definition at line 312 of file MTCalibPebHypoTool.cxx.

312  {
313  // Work around a bug in clang 9.
314 #if __clang_major__ == 9
315  std::string str (strv.begin(), strv.end());
316 #else
317  const std::string_view& str = strv;
318 #endif
319  if (str.find(":ADD:")!=std::string_view::npos) type = ROBRequestInstruction::ADD;
320  else if (str.find(":GET:")!=std::string_view::npos) type = ROBRequestInstruction::GET;
321  else if (str.find(":ADDGET:")!=std::string_view::npos) type = ROBRequestInstruction::ADDGET;
322  else if (str.find(":COL:")!=std::string_view::npos) type = ROBRequestInstruction::COL;
323  if (size_t pos=str.find(":RND"); pos!=std::string_view::npos) {
324  size_t firstDigit=pos+4;
325  size_t lastDigit=str.find_first_of(":",firstDigit);
326  size_t num = std::stoul(str.substr(firstDigit,lastDigit).data());
327  isRandom = true;
328  nRandom = num;
329  }
330 }

Member Function Documentation

◆ toString()

const std::string MTCalibPebHypoTool::ROBRequestInstruction::toString ( ) const

String form for debug print-outs.

Definition at line 333 of file MTCalibPebHypoTool.cxx.

333  {
334  std::string s;
335  s += "type=";
336  if (type==INVALID) s+="INVALID";
337  else if (type==ADD) s+="ADD";
338  else if (type==GET) s+="GET";
339  else if (type==ADDGET) s+="ADDGET";
340  else if (type==COL) s+="COL";
341  s += ", isRandom=";
342  s += isRandom ? "true" : "false";
343  s += ", nRandom=";
345  return s;
346 }

Member Data Documentation

◆ isRandom

bool MTCalibPebHypoTool::ROBRequestInstruction::isRandom = false

Flag switching requests of a random sub-sample of the ROB list.

Definition at line 57 of file MTCalibPebHypoTool.h.

◆ nRandom

size_t MTCalibPebHypoTool::ROBRequestInstruction::nRandom = 0

Size of random request.

Definition at line 59 of file MTCalibPebHypoTool.h.

◆ type

enum MTCalibPebHypoTool::ROBRequestInstruction::Type MTCalibPebHypoTool::ROBRequestInstruction::type = INVALID

The documentation for this struct was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MTCalibPebHypoTool::ROBRequestInstruction::GET
@ GET
Definition: MTCalibPebHypoTool.h:55
MTCalibPebHypoTool::ROBRequestInstruction::isRandom
bool isRandom
Flag switching requests of a random sub-sample of the ROB list.
Definition: MTCalibPebHypoTool.h:57
MTCalibPebHypoTool::ROBRequestInstruction::ADD
@ ADD
Definition: MTCalibPebHypoTool.h:55
MTCalibPebHypoTool::ROBRequestInstruction::INVALID
@ INVALID
Definition: MTCalibPebHypoTool.h:55
MTCalibPebHypoTool::ROBRequestInstruction::ADDGET
@ ADDGET
Definition: MTCalibPebHypoTool.h:55
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
MTCalibPebHypoTool::ROBRequestInstruction::nRandom
size_t nRandom
Size of random request.
Definition: MTCalibPebHypoTool.h:59
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
MTCalibPebHypoTool::ROBRequestInstruction::COL
@ COL
Definition: MTCalibPebHypoTool.h:55
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
str
Definition: BTagTrackIpAccessor.cxx:11
MTCalibPebHypoTool::ROBRequestInstruction::type
enum MTCalibPebHypoTool::ROBRequestInstruction::Type type