CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CTPPSPixelFramePosition.cc
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  *
4  * Authors:
5  * F.Ferro ferro@ge.infn.it
6  *
7  ****************************************************************************/
8 
11 #include <iomanip>
12 
13 using namespace std;
14 
15 //----------------------------------------------------------------------------------------------------
16 
17 std::ostream &operator<<(std::ostream &s, const CTPPSPixelFramePosition &fp) {
18  return s << fp.getFEDId() << ":" << fp.getFMCId() << ":" << fp.getChannelIdx() << ":" << fp.getROC();
19 }
20 
21 //----------------------------------------------------------------------------------------------------
22 
24  edm::LogInfo("printXML") << "\" FEDId=\"" << getFEDId() << "\" FMCId=\"" << getFMCId() << "\" ChannelIdx=\""
25  << getChannelIdx() << "\" ROC=\"" << getROC() << "\"";
26 }
27 
28 //----------------------------------------------------------------------------------------------------
29 
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 |= 0x8;
38  return 0;
39  }
40 
41  if (attribute == "FMC") {
42  setFMCId(v);
43  flag |= 0x4;
44  return 0;
45  }
46 
47  if (attribute == "FEDChannel") {
48  setChannelIdx(v);
49  flag |= 0x2;
50  return 0;
51  }
52 
53  if (attribute == "ROCinChannel") {
54  setROC(v);
55  flag |= 0x1;
56  return 0;
57  }
58 
59  return 1;
60 }
std::ostream & operator<<(std::ostream &out, const std::tuple< Types...> &value)
Definition: Utilities.h:32
void printXML()
prints XML formatted DAQ channel to stdout
unsigned char setXMLAttribute(const std::string &attribute, const std::string &value, unsigned char &flag)
unsigned short getFMCId() const
constexpr uint32_t getROC(uint32_t ww)
Log< level::Info, false > LogInfo
unsigned short getChannelIdx() const
unsigned short getROC() const
unsigned short getFEDId() const
recomended getters and setters