CondFormats
PPSObjects
src
TotemFramePosition.cc
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* This is a part of the TOTEM offline software.
4
* Authors:
5
* Jan Kašpar (jan.kaspar@gmail.com)
6
*
7
****************************************************************************/
8
9
#include "
CondFormats/PPSObjects/interface/TotemFramePosition.h
"
10
11
#include <iomanip>
12
#include <cstdlib>
13
14
using namespace
std
;
15
16
//----------------------------------------------------------------------------------------------------
17
18
std::ostream &
operator<<
(std::ostream &
s
,
const
TotemFramePosition
&
fp
) {
19
return
s
<<
fp
.getFEDId() <<
":"
<<
fp
.getGOHId() <<
":"
<<
fp
.getIdxInFiber();
20
}
21
22
//----------------------------------------------------------------------------------------------------
23
24
void
TotemFramePosition::printXML
() {
25
cout
<<
"\" FEDId=\""
<< getFEDId() <<
"\" GOHId=\""
<< getGOHId() <<
"\" IdxInFiber=\""
<< getIdxInFiber() <<
"\""
;
26
}
27
28
//----------------------------------------------------------------------------------------------------
29
30
unsigned
char
TotemFramePosition::setXMLAttribute
(
const
std::string
&attribute,
31
const
std::string
&
value
,
32
unsigned
char
&
flag
) {
33
unsigned
int
v
= atoi(
value
.c_str());
34
35
if
(attribute ==
"FEDId"
) {
36
setFEDId(
v
);
37
flag
|= 0x1C;
// SubSystem + TOTFED + OptoRx
38
return
0;
39
}
40
41
if
(attribute ==
"SubSystemId"
) {
42
setSubSystemId(
v
);
43
flag
|= 0x10;
44
return
0;
45
}
46
47
if
(attribute ==
"TOTFEDId"
) {
48
setTOTFEDId(
v
);
49
flag
|= 0x8;
50
return
0;
51
}
52
53
if
(attribute ==
"OptoRxId"
) {
54
setOptoRxId(
v
);
55
flag
|= 0x4;
56
return
0;
57
}
58
59
if
(attribute ==
"GOHId"
) {
60
setGOHId(
v
);
61
flag
|= 0x2;
62
return
0;
63
}
64
65
if
(attribute ==
"IdxInFiber"
) {
66
setIdxInFiber(
v
);
67
flag
|= 0x1;
68
return
0;
69
}
70
71
return
1;
72
}
TotemFramePosition::setXMLAttribute
unsigned char setXMLAttribute(const std::string &attribute, const std::string &value, unsigned char &flag)
Definition:
TotemFramePosition.cc:29
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
personalPlayback.fp
fp
Definition:
personalPlayback.py:523
findQualityFiles.v
v
Definition:
findQualityFiles.py:179
std::operator<<
std::ostream & operator<<(std::ostream &out, const std::tuple< Types... > &value)
Definition:
Utilities.h:32
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
TotemFramePosition
Definition:
TotemFramePosition.h:31
TotemFramePosition.h
value
Definition:
value.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
std
Definition:
JetResolutionObject.h:76
TotemFramePosition::printXML
void printXML()
prints XML formatted DAQ channel to stdout
Definition:
TotemFramePosition.cc:23
RemoveAddSevLevel.flag
flag
Definition:
RemoveAddSevLevel.py:117
Generated for CMSSW Reference Manual by
1.8.16