Go to the documentation of this file.00001 #include "CondFormats/RPCObjects/interface/DccSpec.h"
00002 #include <sstream>
00003 #include <iostream>
00004
00005 DccSpec::DccSpec(int id) : theId(id)
00006 { }
00007
00008 std::string DccSpec::print(int depth) const
00009 {
00010
00011 std::ostringstream str;
00012 str << "DccSpec:id=" << id() << std::endl;
00013 depth--;
00014 if (depth >= 0) {
00015 typedef std::vector<TriggerBoardSpec>::const_iterator ITTB;
00016 for (ITTB it = theTBs.begin(); it != theTBs.end(); it++) str << it->print(depth);
00017 }
00018 return str.str();
00019 }
00020
00021 const TriggerBoardSpec * DccSpec::triggerBoard(int channelNumber) const
00022 {
00023
00024
00025
00026 typedef std::vector<TriggerBoardSpec>::const_iterator IT;
00027 for (IT it=theTBs.begin(); it != theTBs.end(); it++) {
00028 if(channelNumber ==it->dccInputChannelNum()) return &(*it);
00029 }
00030 return 0;
00031
00032 }
00033
00034 void DccSpec::add(const TriggerBoardSpec & tb)
00035 {
00036
00037
00038
00039
00040
00041
00042
00043
00044 theTBs.push_back(tb);
00045 }