00001 #include "Event/ReadoutRpcCrate.h" 00002 #include <ostream> 00003 00004 std::ostream& DayaBay::ReadoutRpcCrate::fillStream(std::ostream& s) const 00005 { 00006 size_t siz = m_channelReadout.size(); 00007 00008 s << "{ " 00009 << siz << " readouts : " << std::endl; 00010 00011 RpcChannelReadouts::const_iterator it, done = m_channelReadout.end(); 00012 for (it=m_channelReadout.begin(); it != done; ++it) { 00013 s << (it->first) << (it->second) << std::endl; 00014 } 00015 s << "}"; 00016 return s; 00017 } 00018 00019 00020 DayaBay::ReadoutRpcCrate::ReadoutRpcCrate(const DayaBay::ReadoutRpcCrate& rh) 00021 : Readout(rh) 00022 { 00023 DayaBay::ReadoutRpcCrate::RpcChannelReadouts channels = rh.channelReadout(); 00024 DayaBay::ReadoutRpcCrate::RpcChannelReadouts::iterator it, done = channels.end(); 00025 for (it = channels.begin(); it != done; ++it) { 00026 it->second.setReadout(this); 00027 } 00028 this->setChannelReadout(channels); 00029 } 00030 00031 DayaBay::ReadoutRpcCrate& DayaBay::ReadoutRpcCrate::operator=(const DayaBay::ReadoutRpcCrate& rh) 00032 { 00033 if (this == &rh) return *this; 00034 00035 (Readout&)(*this) = (Readout&)(rh); 00036 00037 DayaBay::ReadoutRpcCrate::RpcChannelReadouts channels = rh.channelReadout(); 00038 DayaBay::ReadoutRpcCrate::RpcChannelReadouts::iterator it, done = channels.end(); 00039 for (it = channels.begin(); it != done; ++it) { 00040 it->second.setReadout(this); 00041 } 00042 this->setChannelReadout(channels); 00043 00044 return *this; 00045 }