| 1 | #ifndef MARS_MJSimulation
|
|---|
| 2 | #define MARS_MJSimulation
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MJob
|
|---|
| 5 | #include "MJob.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MHn;
|
|---|
| 9 | class MArgs;
|
|---|
| 10 | class MParList;
|
|---|
| 11 | class MSequence;
|
|---|
| 12 | class MWriteRootFile;
|
|---|
| 13 | class MWriteFitsFile;
|
|---|
| 14 | class MRawRunHeader;
|
|---|
| 15 |
|
|---|
| 16 | class MJSimulation : public MJob
|
|---|
| 17 | {
|
|---|
| 18 | public:
|
|---|
| 19 | enum Mode_t { kModeData, kModePed, kModeCal, kModePointRun };
|
|---|
| 20 |
|
|---|
| 21 | private:
|
|---|
| 22 | Bool_t fForceMode; // Force execution even if RUNE-section was not foundm
|
|---|
| 23 |
|
|---|
| 24 | Bool_t fCamera; // Switch on/off camera (for fast reflector processing)
|
|---|
| 25 | Bool_t fForceTrigger; // Force the use of the trigger "electronics"
|
|---|
| 26 | Bool_t fWriteFitsFile;
|
|---|
| 27 |
|
|---|
| 28 | Int_t fOperationMode; // Operation mode (data, ped, cal, pointrun)
|
|---|
| 29 | Int_t fRunNumber; // 8 digits run number to be used for the file names
|
|---|
| 30 |
|
|---|
| 31 | TString fFileOut; // Output file name if all runs should be combines
|
|---|
| 32 |
|
|---|
| 33 | Bool_t WriteResult(const MParList &plist, const MSequence &seq, Int_t run);
|
|---|
| 34 | Bool_t CheckEnvLocal();
|
|---|
| 35 |
|
|---|
| 36 | template<class T>
|
|---|
| 37 | void SetupCommonFileStructure(T &write) const;
|
|---|
| 38 |
|
|---|
| 39 | void SetupHist(MHn &hist) const;
|
|---|
| 40 | void SetupHeaderKeys(MWriteFitsFile& write, MRawRunHeader &header) const;
|
|---|
| 41 | void SetupVetoColumns(MWriteFitsFile& write) const;
|
|---|
| 42 |
|
|---|
| 43 | public:
|
|---|
| 44 | MJSimulation(const char *name=NULL, const char *title=NULL);
|
|---|
| 45 |
|
|---|
| 46 | void SetForceMode(Bool_t force=kTRUE) { fForceMode = force; }
|
|---|
| 47 | void SetMode(Int_t mode) { fOperationMode = mode; }
|
|---|
| 48 | void SetWriteFitsFile(Bool_t fits) { fWriteFitsFile = fits; }
|
|---|
| 49 | void SetFileOut(const char *file="") { fFileOut = file; }
|
|---|
| 50 |
|
|---|
| 51 | void SetRunNumber(Int_t n=-1) { fRunNumber = n%100000000; }
|
|---|
| 52 |
|
|---|
| 53 | // Process
|
|---|
| 54 | Bool_t Process(const MArgs &args, const MSequence &seq);
|
|---|
| 55 |
|
|---|
| 56 | ClassDef(MJSimulation, 0) // Job to run the simulation (ceres)
|
|---|
| 57 | };
|
|---|
| 58 |
|
|---|
| 59 | #endif
|
|---|