ATLAS Offline Software
Loading...
Searching...
No Matches
MTCalibPebHypoTool::ROBRequestInstruction Struct Reference

ROB request instruction description. More...

Collaboration diagram for MTCalibPebHypoTool::ROBRequestInstruction:

Public Types

enum  Type { INVALID , GET }
 Type of instruction. More...

Public Member Functions

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

Public Attributes

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

Detailed Description

ROB request instruction description.

Definition at line 49 of file MTCalibPebHypoTool.h.

Member Enumeration Documentation

◆ Type

Constructor & Destructor Documentation

◆ ROBRequestInstruction()

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

Constructor from string key in the ROBAccessDict property.

Definition at line 301 of file MTCalibPebHypoTool.cxx.

301 {
302 if (strv.find(":GET:")!=std::string_view::npos) type = ROBRequestInstruction::GET;
303 if (size_t pos=strv.find(":RND"); pos!=std::string_view::npos) {
304 size_t firstDigit=pos+4;
305 size_t lastDigit=strv.find_first_of(":",firstDigit);
306 size_t num = std::stoul(strv.substr(firstDigit,lastDigit).data());
307 isRandom = true;
308 nRandom = num;
309 }
310}
bool isRandom
Flag switching requests of a random sub-sample of the ROB list.

Member Function Documentation

◆ toString()

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

String form for debug print-outs.

Definition at line 313 of file MTCalibPebHypoTool.cxx.

313 {
314 std::string s;
315 s += "type=";
316 if (type==INVALID) s+="INVALID";
317 else if (type==GET) s+="GET";
318 s += ", isRandom=";
319 s += isRandom ? "true" : "false";
320 s += ", nRandom=";
321 s += std::to_string(nRandom);
322 return s;
323}

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: