ATLAS Offline Software
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 314 of file MTCalibPebHypoTool.cxx.

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

Member Function Documentation

◆ toString()

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

String form for debug print-outs.

Definition at line 335 of file MTCalibPebHypoTool.cxx.

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

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
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
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
str
Definition: BTagTrackIpAccessor.cxx:11
MTCalibPebHypoTool::ROBRequestInstruction::type
enum MTCalibPebHypoTool::ROBRequestInstruction::Type type