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