#ifndef MARS_MJSimulation
#define MARS_MJSimulation

#ifndef MARS_MJob
#include "MJob.h"
#endif

class MHn;
class MArgs;
class MParList;
class MWriteRootFile;

class MJSimulation : public MJob
{
private:
    Bool_t fForceMode;      // Force execution even if RUNE-section was not foundm

    Bool_t fCamera;         // Switch on/off camera (for fast reflector processing)
    Bool_t fForceTrigger;   // Force the use of the trigger "electronics"

    Bool_t WriteResult(const MParList &plist);
    Bool_t CheckEnvLocal();

    void SetupHist(MHn &hist) const;
    void SetupCommonFileStructure(MWriteRootFile &write) const;

public:
    MJSimulation(const char *name=NULL, const char *title=NULL);

    void SetForceMode(Bool_t force=kTRUE) { fForceMode = force; }

    // Process
    Bool_t Process(const MArgs &args);

    ClassDef(MJSimulation, 0) // Job to run the simulation (ceres)
};

#endif
