Belle II Software development
CDCTriggerMLPData::HeaderSet Struct Reference

Public Member Functions

 HeaderSet (std::vector< float > line)
 
void operator= (std::vector< float > line)
 
 HeaderSet (unsigned expert, std::vector< float > relevantID)
 

Public Attributes

float relID [18]
 
unsigned exPert
 

Friends

std::ostream & operator<< (std::ostream &out, const HeaderSet &hset)
 
std::istream & operator>> (std::istream &in, HeaderSet &hset)
 

Detailed Description

Definition at line 29 of file CDCTriggerMLPData.h.

Constructor & Destructor Documentation

◆ HeaderSet() [1/3]

HeaderSet ( )
inline

Definition at line 32 of file CDCTriggerMLPData.h.

32{}

◆ HeaderSet() [2/3]

HeaderSet ( std::vector< float >  line)
inline

Definition at line 33 of file CDCTriggerMLPData.h.

34 {
35 if (line.size() == 19) {
36 exPert = line[0];
37 for (unsigned i = 1; i <= 19; i++) {
38 relID[i] = line[i];
39 }
40 } else {B2ERROR("ERROR! wrong lengthof relID vector!");}
41 }

◆ HeaderSet() [3/3]

HeaderSet ( unsigned  expert,
std::vector< float >  relevantID 
)
inline

Definition at line 53 of file CDCTriggerMLPData.h.

54 {
55 if (relevantID.size() == 18) {
56 for (unsigned i = 0; i < 18; ++i) {relID[i] = relevantID[i];}
57 } else {B2ERROR("ERROR! wrong length of relID vector!");}
58 exPert = expert;
59 }

Member Function Documentation

◆ operator=()

void operator= ( std::vector< float >  line)
inline

Definition at line 42 of file CDCTriggerMLPData.h.

43 {
44 if (line.size() == 19) {
45 exPert = line[0];
46 for (unsigned i = 1; i <= 19; i++) {
47 relID[i] = line[i];
48 }
49 } else {B2ERROR("ERROR! wrong length of relID vector!");}
50
51
52 }

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const HeaderSet hset 
)
friend

Definition at line 60 of file CDCTriggerMLPData.h.

61 {
62 out << hset.exPert << '\t';
63 for (unsigned i = 0; i < 18; ++i) { out << hset.relID[i] << '\t';}
64 return out;
65 }

◆ operator>>

std::istream & operator>> ( std::istream &  in,
HeaderSet hset 
)
friend

Definition at line 66 of file CDCTriggerMLPData.h.

67 {
68 std::string help;
69 std::string helpline;
70 help = "";
71 helpline = "";
72 std::getline(in, helpline, '\n');
73 if (helpline.length() < 2) {return in;}
74 std::stringstream ss(helpline);
75 std::getline(ss, help, '\t');
76
77 hset.exPert = std::stoul(help);
78 for (unsigned i = 0; i < 18; ++i) {
79 help = "";
80 std::getline(ss, help, '\t');
81 hset.relID[i] = std::stof(help);
82 }
83 return in;
84 }

Member Data Documentation

◆ exPert

unsigned exPert

Definition at line 31 of file CDCTriggerMLPData.h.

◆ relID

float relID[18]

Definition at line 30 of file CDCTriggerMLPData.h.


The documentation for this struct was generated from the following file: