1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "CalibFormats/SiPixelObjects/interface/PixelTBMChannel.h"
#include <cassert>
using namespace pos;
PixelTBMChannel::PixelTBMChannel(std::string TBMChannel) {
if (TBMChannel == "A")
isChannelB_ = false;
else if (TBMChannel == "B")
isChannelB_ = true;
else {
std::cout << "ERROR in PixelTBMChannel: TBM channel must be A or B, but input value was " << TBMChannel
<< std::endl;
assert(0);
}
}
std::string PixelTBMChannel::string() const {
if (isChannelB_)
return "B";
else
return "A";
}
std::ostream& pos::operator<<(std::ostream& s, const PixelTBMChannel& TBMChannel) {
s << TBMChannel.string();
return s;
}
|