// physicist1b.cc -- Physicst code in module B for test of step1 // implementation of ErrorLogger mechanism. #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif ZM_USING_NAMESPACE( zmel ) #include "frame1.h" #include "physicist1b.h" #include "ZMutility/iostream" USING( std::cout ) USING( std::endl ) //============================================================================= // // PHYSICIST // //============================================================================= DoPhysics::DoPhysics( const string & name ) : Module( name ) { } void DoPhysics::operator()( Event & event ) { cout << "doing DoPhysics step 1" << endl; event.data *= 3; errlog( ELsuccess, "Did step 1" ) << endmsg; cout << "doing DoPhysics step 2" << endl; for ( int i = 0; i < 6; i += 2 ) { errlog( ELinfo, "i ="); errlog << i; event.data += i; errlog << " data = " << event.data; errlog << endmsg; } event.data = event.data*event.data; errlog( ELsuccess, "Did step 2" ) << endmsg; cout << "data ends up as " << event.data << "\n\n"; } // DoPhysics::operator()( )