#ifndef LEVEL3ACCOUNTANT_HH #define LEVEL3ACCOUNTANT_HH (1) //***************************************************************************** // File: Level3Accountant.hh // ---------------------------------------------------------------------------- // Type: Class public interface header // Package: Level3Mods // Class: Level3Accountant // Language: Standard C++ // Project: CDF Run II Offline Software Upgrade // OrigAuth: Kevin McFarland //============================================================================= // RCS Current Revision Record //----------------------------------------------------------------------------- // $Source: /cdf/code/cdfcvs/run2/Level3Mods/Level3Mods/Level3Accountant.hh,v $ // $Revision: 1.7 $ // $Date: 2002/07/29 14:39:41 $ // $Author: ksmcf $ // $State: Exp $ // $Locker: $ //***************************************************************************** //============================================================================= // Declarations and Definitions //============================================================================= #include #include #include #include #include #include #include #include #include #include //============================================= // Forward Declarations of Classes //=========================================== class AppFramework; class AppStream; template class APPList; //***************************************************************************** // Class definition //***************************************************************************** class Level3Accountant { //============================================================================= // Public section //============================================================================= public: //----------------------------------------------------------------------------- // Constructor and Destructor //----------------------------------------------------------------------------- Level3Accountant(bool formTL3 = true, bool formLevel3Results = true, bool monitorCpuTime = true, bool debug = false) ; virtual ~Level3Accountant() ; //----------------------------------------------------------------------------- // prototype interface //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Manipulators //----------------------------------------------------------------------------- // initialize with information from Framework, I/O module std::vector createLedger( AppFramework* theFramework, APPList* theStreams, AbsEvent* anEvent, APPLevel3GenericOutputModule* theLevel3OutputModule = NULL); // fill in information for a given event std::vector countBeans( AppFramework* theFramework, APPList* theStreams, AbsEvent* anEvent, APPLevel3GenericOutputModule* theLevel3OutputModule = NULL); // fill the summary in the end ot run. std::vector closeLedger( AbsEvent* anEvent ); //----------------------------------------------------------------------------- // Tests //----------------------------------------------------------------------------- // print out information void audit( ); //======================================= // Filling Level3ModuleMap Object. //====================================== // fill objects and mapping among them. void fillMapping( AppFramework *framework, APPList* streams, APPLevel3GenericOutputModule* theLevel3OutputModule ); // fill L3Module. void fillModules( AppFramework *framework); // fill L3Path and map between paths and modules void fillPaths( AppFramework *framework, APPLevel3GenericOutputModule* theLevel3OutputModule ); // fill L3Stream and map between streams and paths. void fillStreams( APPList* streams ); //======================================= // Filling Level3ModuleResults Object. //====================================== // fill module results. void fillResult( AppFramework *framework ); void fillStorableObject( AppFramework *framework ); void resetModuleResults(); // reset module results // initialize arrays for run summaries. void initialize( AppFramework *framework ); float writeTimingInfo( AppFramework *framework, std::string modName ); // // fill module results of each event and run summaries for // modules, paths, and pathVsPath. // void fillRunSummary( ); int nEvents() const { return _nEvents; } // number of Events L3Index nPaths() const { return _nPaths; } // number of paths L3Index nModules() const { return _nModules; } // number of modules L3Index nStreams() const { return _nStreams; } // //============================================================================= // Private section //============================================================================= protected: private: bool _formTL3; // create TL3* banks? bool _formLevel3Results; // create Level3Results objects? bool _monitorCpuTime; // monitor Level3 CPU bool _debug; APPStored* _streamTriggerTrail; Level3ModuleMap* _streamTriggerMap; Level3ModuleResults* _streamTriggerResults; Level3ModuleSummary* _streamTriggerSummary; std::vector streamList; // Level3 stream list std::vector pathList; // Level3 path list std::vector moduleList; // Level3 module list L3StreamsToPaths streamPathMap; // mapping between streams and paths L3PathsToModules pathModuleMap; // mapping between paths and modules std::vector moduleResults; // List of module Result std::vector moduleSummaries; // List of module summary std::vector pathSummaries; // list of path summary std::vector pathVsPath; // list of pathVsPath summary long *nPathTrys; long *nPathPasses; float *pathCputime; long *nModuleTrys; long *nModulePasses; float *moduleCputime; long **nPathVsPathTrys; long **nPathVsPathPasses; int _nEvents; // number of Events. L3Index _nPaths; // number of Paths. L3Index _nModules; // number of Modules. L3Index _nStreams; // number of streams }; //***************************************************************************** // The End //***************************************************************************** #endif // LEVEL3ACCOUNTANT_HH