/** CDFMonitoringModule
 *
 * A job module for communicating with the HistoDisplayMain through
 * the CDFMonitoringFwk.
 *
 * It does this by looking for histograms and other TObjects in a
 * particular folder (configurable) managed by HistMan.  The objects
 * will be exported to CDFMonitoringFwk "Server" server and then
 * available via the HistoDisplayMain with the same path name + the
 * name of the object itself.  Other JobCModules can then populate the
 * folder.  
 *
 * Any objects in a folder called "private" will be ignored.  This
 * area may then be used for inter-module communication inter-record
 * storage.
 *
 * The CDFMonitoring::Ana node should be placed after any other nodes
 * that may update histograms in order to assure prompt publishing of
 * changes.
 *
 * This module will also save the contents of the HistMan when input
 * files change.
 *
 * The available configuration parameters are:
 *
 *  folder: (string) set the folder in which to look for publishable
 *  objects.  Default is "Monitoring"
 *
 *  refresh: (integer) set the period for pushing objects to the
 *  Server.  Default is 1 (every time Ana() is entered).
 *
 *  port: (integer) set the port on which to contact the server.
 *  Default is 9050.
 */

#ifndef CDFMONITORINGMODULE_H
#define CDFMONITORINGMODULE_H

#include <JobControl/JobCModule.h>

class MomNavigator;
class CDFMonitoringModuleImp;

class CDFMonitoringModule : public JobCModule {
    CDFMonitoringModuleImp* fImp; // hide implementation
public:
    static const int default_port;
    static const char* default_folder;
    static const int default_refresh;

    CDFMonitoringModule();
    ~CDFMonitoringModule();

    void BeginJob();
    void EndJob();

    void BeginFile();
    void EndFile();

    JobCResult Ana(const MomNavigator *mom);
    const Registry& DefaultConfig() const;

    //ClassDef(CDFMonitoringModule,1)

};


#endif  // CDFMONITORINGMODULE_H
