#ifdef USE_CDFEDM2 ////////////////////////////////////////////////////////////////////////// // // Component: TowerCorr.cc // Purpose: This class has a correction for a given tower // // Created: 06/16/03 Pierre Savard // ////////////////////////////////////////////////////////////////////////// #include #include "CalorObjects/TowerCorr.hh" #include "ErrorLogger_i/gERRLOG.hh" //const Version_t TowerCorr::_VERSION=1; bool operator == (const TowerCorr& rhs, const TowerCorr& lhs) { return( (rhs.iEta() == lhs.iEta()) && (rhs.iPhi() == lhs.iPhi()) && (rhs.correction() == lhs.correction()) && (rhs.type() == lhs.type())); } void TowerCorr::print(std::ostream& os) const{ // this prints the CalTower data os<< "printing tower "<printTower(os); } void TowerCorr::Streamer (TBuffer & buf){ if (buf.IsReading()) { buf >> _type; buf >> _iEta; buf >> _iPhi; buf >> _corFactor; } else if (buf.IsWriting()) { buf << _type; buf << _iEta; buf << _iPhi; buf << _corFactor; } else { std::cerr << "In TowerCorr::Streamer: TBuffer is in unknown state" << std::endl; } } std::ostream& operator<<(std::ostream& os, const TowerCorr& tc) { os << std::endl; os << "iEta = "<< tc.iEta() << ' '; os << "iPhi = "<< tc.iPhi() << ' '; os << "Tower type = "<< tc.type() << ' '; os << "Correction Factor = "<< tc.correction() << std::endl; return os; } #endif // USE_CDFEDM2