#ifndef HADES_H
#define HADES_H
#include "TObject.h"
#include "TObjString.h"
#include "TClonesArray.h"
#include "TString.h"
#include "TArrayI.h"
#include "TNamed.h"
#include "TBranch.h"
#include "TBrowser.h"
#include "TCollection.h"
#include "TTree.h"
#include "TGlobal.h"
#include "TFile.h"
#include "TError.h"
#include "TStopwatch.h"
#define MAXEVID 16
class HDataSource;
class HldFileOutput;
class HEvent;
class HTree;
class HRuntimeDb;
class HTask;
class HTaskSet;
class HSpectrometer;
class Hades;
class HMessageMgr;
R__EXTERN Hades *gHades;
class Hades : public TObject {
protected:
Size_t fOutputSizeLimit;
Int_t fCycleNumber;
TString fOutputFileName;
Bool_t fFirstEventLoop;
Int_t fSplitLevel;
HDataSource* fDataSource;
HDataSource* fSecondDataSource;
HldFileOutput* fHldOutput;
HEvent* fCurrentEvent;
HTaskSet* fTask;
TFile* fOutputFile;
HSpectrometer* setup;
HTree* fTree;
HRuntimeDb* rtdb;
TObjArray* fTaskList;
UChar_t quiet;
Int_t fCounter;
ErrorHandlerFunc_t oldHdlr;
HMessageMgr* msgHandler;
Int_t reqEvents;
Bool_t enableCloseInput;
TStopwatch fTimer;
static Int_t EventCounter;
static Int_t doEmbedding;
static Bool_t forceNoSkip;
Int_t evIdMap[MAXEVID];
Int_t treeBufferSize;
void recreateOutput (void);
void initTaskSetsIDs(Int_t version);
Int_t getCurrentRunId(HDataSource* source);
public:
Hades(void);
~Hades(void);
static Hades* instance (void) { return (gHades) ? gHades : new Hades; }
Bool_t init (void);
Int_t eventLoop (Int_t nEvents = kMaxInt,Int_t firstEvent = 0, Double_t timeQuota = 1.e+20);
void makeCounter (Int_t counter = 1000) {fCounter = counter;}
void setQuietMode (UChar_t mode=1) { quiet = mode; }
Int_t getNumberOfRequestedEvents(void) { return reqEvents; }
Int_t getEventCounter () { return EventCounter; }
void resetEventCounter () { EventCounter = 0; }
Int_t getEmbeddingMode () { return doEmbedding; }
void setEmbeddingMode (Int_t mode) { doEmbedding = mode; }
Int_t getEmbeddingRealTrackId () { return -500; }
Bool_t getForceNoSkip () { return forceNoSkip; }
void setForceNoSkip (Bool_t noskip = kTRUE){ forceNoSkip = noskip; }
HRuntimeDb* getRuntimeDb (void) { return rtdb; }
HSpectrometer* getSetup (void) { return setup; }
HMessageMgr* getMsg (void) { return msgHandler; }
HEvent*& getCurrentEvent (void);
void setEvent (HEvent *ev);
void setDataSource (HDataSource *dataS);
HDataSource* getDataSource (void) const {return fDataSource; }
void setSecondDataSource (HDataSource *dataS);
void setEnableCloseInput (Bool_t flag = kTRUE){ enableCloseInput = flag; }
HDataSource* getSecondDataSource (void) const { return fSecondDataSource; }
HTask* getTask (const Char_t *taskName);
HTaskSet* getTask (void);
HTaskSet* getTaskSet (Int_t nEvtId);
HTaskSet* getTaskSet (const Char_t *evtTypeName);
Bool_t initTasks ();
Bool_t reinitTasks ();
Bool_t finalizeTasks ();
void closeOutput ();
void setOutputSizeLimit (Size_t l) { fOutputSizeLimit = l; }
void setSplitLevel (Int_t splitLevel);
Int_t getSplitLevel (void);
Int_t getTreeBufferSize () { return treeBufferSize; }
void setTreeBufferSize (Int_t size) { treeBufferSize = size; }
Bool_t setOutputFile (Text_t *name,Option_t *opt,Text_t *title,Int_t comp);
TFile* getOutputFile () { return fOutputFile; }
Bool_t setHldOutput (Text_t*,Text_t* fileSuffix="f_",Option_t* option="NEW");
HldFileOutput* getHldOutput (void) const { return fHldOutput; }
HTree* getTree (void);
Bool_t makeTree (void);
void activateTree (TTree *tree);
Bool_t IsFolder (void) const;
void Browse (TBrowser *b);
Int_t setAlgorithmLayout (Text_t *fileName);
Int_t setEventLayout (Text_t *fileName);
Int_t setConfig (Text_t *fileName);
Int_t mapId (Int_t id);
Bool_t isCalibration ();
Bool_t isReal ();
void printDefinedTaskSets ();
void defineTaskSets ();
ClassDef(Hades,1)
};
#endif // !HADES
Last change: Sat May 22 13:17:53 2010
Last generated: 2010-05-22 13:17
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.