//-------------------------------------------------------------------------- // File and Version Information: // $Id: APPLevel3SenderOutputModule.hh,v 1.23 2001/06/13 19:22:20 ksmcf Exp $ // // Description: // Class APPLevel3SenderOutputModule. This is an online output module // for the AC++ framework. It prepares events for sending in the online // system through either the Level3 framework or to the CSL. // // Environment: // Software developed for CDF II online/offline interface. // // Author List: // Kevin McFarland Original Author // //------------------------------------------------------------------------ #ifndef APPSENDEROUTPUTMODULE_HH #define APPSENDEROUTPUTMODULE_HH //----------------------- // Experiment Headers -- //----------------------- #include "BaBar/Experiment.hh" //---------------------- // Base Class Headers -- //---------------------- #include "Level3Mods/APPLevel3GenericOutputModule.hh" //---------------------- // Collaborating Class Headers -- //---------------------- class AbsEvent; class AppStream; class AppDeferredOutCommand; template class APPList; class TBuffer; #include "Framework/AbsParmGeneral.hh" #include "Framework/AbsParmList.hh" #ifndef TRY_FIXED_SIZE_TYPES_HH #include "Trybos/TRY_Fixed_Size_Types.hh" #endif #ifndef TRY_DATAREP_CONVERTER_HH #include "Trybos/private/TRY_Datarep_Converter.hh" #endif // --------------------- // -- Class Interface -- // --------------------- class APPLevel3SenderOutputModule : public APPLevel3GenericOutputModule { //-------------------- // Instance Members -- //-------------------- public: // Constructors APPLevel3SenderOutputModule(int headerWords, const char* const theName = "Level3SenderOutput", const char* const theDescription = "Standard File Output Module", const int4 exeTag = -1); // Destructor virtual ~APPLevel3SenderOutputModule( ); // Operations: processing input data for set up/shutdown AppResult beginJob( AbsEvent* aJob ); AppResult endJob( AbsEvent* aJob ); AppResult abortJob( AbsEvent* aJob ); // Operations: preparing and sending output data AppResult outputEvent( AbsEvent*& anEvent, const AppStopType& theDispatchStopType); // Operations (online connection) to be overridden virtual AppResult sendFlatEvent( bool sendIt, size_t flatEventLength, errorStatus status )=0; virtual AppResult disconnectOnAbort()=0; // Data structure methods, information accessors (to be overriden) virtual void fillHeaderWords(int4* pHeader, const AppStopType& theDispatchStopType, size_t length, long processId) =0; virtual int headerWords() const =0; virtual long externalMaximumBufferSize() const =0; // Selectors const char* rcsId( ) const; protected: // online member data; used by derived OnlineOutput class int _partitionId; long _processID; int _headerWords; // event representation settings (accessed by derived classes) AbsParmGeneral _maximumOnlineBufferSize; AbsParmGeneral _representationConversion; AbsParmGeneral _offsetLevel3PointerSpace; //INHERITED AbsParmGeneral _makeBigEndian; //INHERITED TRY_Datarep_Converter _senderConverter ; // buffer with online event (accessed by derived classes) int4* _onlineBuffer; long int _onlineBufferSize; private: // output commands AppDeferredOutCommand* _outputCmd; AppDeferredOutCommand* _outCmd; // debugging AbsParmGeneral _isSilent; AbsParmGeneral _onlineBufferHexDump; #ifdef USE_CDFEDM2 TBuffer* _p_buffer; #endif // internal routines void createOnlineBuffer(); }; #endif