//----------------------- // This Class's Header -- //----------------------- #include "CalorObjects/CESQ.hh" //--------------- // C++ Headers -- //--------------- #include #include "TBuffer.h" #include "ErrorLogger_i/gERRLOG.hh" /************************************************************************** * CESQ Default Constructor * **************************************************************************/ CESQ::CESQ( void ) : _chid(0), _energy(0) { } /************************************************************************** * CesCluster Copy Constructor * **************************************************************************/ CESQ::CESQ( const CESQ& oldcesq ) { _chid = oldcesq._chid; _energy = oldcesq._energy; } /************************************************************************** * CESQ Custom Constructor * **************************************************************************/ CESQ::CESQ( uint2 Chid, uint2 Energy) : _chid(Chid), _energy(Energy) { } /************************************************************************** * CESQ::print * * Print information for strips * **************************************************************************/ void CESQ::print(std::ostream& os) const { os << "Energy " << _energy ; os << " Module " << module() ; os << " Strip Type " << stripType() ; os << " Strip No " << stripNo() ; os << " Side " << i_ew() << "\n"; } //=========================================================================== // Required by Streamable Object //=========================================================================== void CESQ::Streamer(TBuffer& iobuffer) { //--------------------------------------------------------------------------- // Read object from buffer //--------------------------------------------------------------------------- if (iobuffer.IsReading()) { iobuffer >> _chid >> _energy; } //--------------------------------------------------------------------------- // Write object to buffer //--------------------------------------------------------------------------- else if (iobuffer.IsWriting()) { iobuffer << _chid << _energy; } //--------------------------------------------------------------------------- // Unanticipated action //--------------------------------------------------------------------------- else { ERRLOG( ELerror, "CESQ::Streamer()") << "@SUB=CESQ::Streamer" << "NOTHING DONE." << endmsg; } } bool CESQ::postread(EventRecord* p) {return true;} bool CESQ::prewrite(EventRecord* p) {return true;}