/* $Id$ */
//
-// General configuration class for folders
+// General configuration class for Simulation and Reconstruction
+// Basic driver for AliRoot runs
+// Containing pointers to data elements for AliRoot
//
-#include <TMCProcess.h>
-#include <TStopwatch.h>
#include <TError.h>
+#include <TSystem.h>
class TGeometry;
class TParticle;
Int_t GetEventNrInRun() const {return fEventNrInRun;}
Int_t GetEventsPerRun() const {return fEventsPerRun;}
Int_t GetNdets() const {return fNdets;}
- Int_t GetDebug() const {return fDebug;}
AliModule *GetModule(const char *name) const;
AliDetector *GetDetector(const char *name) const;
Int_t GetModuleID(const char *name) const;
virtual void Init(const char *setup="Config.C") {InitMC(setup);}
Bool_t IsFolder() const {return kTRUE;}
virtual AliLego* Lego() const {return fLego;}
-
+ Bool_t IsRootGeometry() const {return fIsRootGeometry;}
+ void SetRootGeometry(Bool_t flag=kTRUE);
+ const char* GetGeometryFileName() const {return fGeometryFileName.Data();}
+ void SetGeometryFileName(const char *name) {fGeometryFileName = name;}
+ const char* GetTriggerDescriptor() const {return fTriggerDescriptor.Data();}
+ void SetTriggerDescriptor(const char *name) {fTriggerDescriptor = name;}
virtual void ResetDigits();
virtual void ResetSDigits();
virtual void ResetPoints();
Float_t rmax=430,Float_t zmax=10000, AliLegoGenerator* gener=NULL);
virtual Bool_t IsLegoRun() const {return (fLego!=0);}
virtual void RunReco(const char *detector=0, Int_t first = 0, Int_t last = 0);
- virtual void SetDebug(Int_t level=0) {fDebug = level;}
virtual void SetDisplay(AliDisplay *display) {fDisplay = display;}
virtual void SetField(Int_t type=2, Int_t version=1, Float_t scale=1, Float_t maxField=10, const char* filename="$(ALICE_ROOT)/data/field01.dat");
virtual void SetField(AliMagF* magField);
virtual void ResetHits();
virtual AliGenerator* Generator() const;
+
+
+// Added by Alberto Colla
+
+ Bool_t IsFileAccessible(Char_t* name, EAccessMode mode = kFileExists);
+ static Bool_t IsFileAccessible(const char* fnam, EAccessMode mode = kFileExists);
+// Added by Alberto Colla
+
//
// End of MC Application
AliStack *Stack() {return (fRunLoader)?fRunLoader->Stack():0x0;}
AliHeader* GetHeader() {return (fRunLoader)?fRunLoader->GetHeader():0x0;}
- TTree *TreeD() {MayNotUse("TreeD"); return 0x0;}
- TTree *TreeS() {MayNotUse("TreeS"); return 0x0;}
- TTree *TreeR() {MayNotUse("TreeR"); return 0x0;}
+ TTree *TreeD() const {MayNotUse("TreeD"); return 0x0;}
+ TTree *TreeS() const {MayNotUse("TreeS"); return 0x0;}
+ TTree *TreeR() const {MayNotUse("TreeR"); return 0x0;}
void SetRunLoader(AliRunLoader* rloader);
virtual void Announce() const;
virtual void InitLoaders(); //prepares run (i.e. creates getters)
- static void Deprecated(TObject *obj, const char *method,
- const char *replacement) {
- if (obj)
- ::Warning(Form("%s::%s", obj->ClassName(), method),
- "method is depricated\nPlease use: %s", replacement);
- else
- ::Warning(method, "method is depricated\nPlease use: %s", replacement);
- }
+ static void Deprecated(TObject *obj, const char *method, const char *replace)
+ {// Indicates deprecated method
+ if (obj) ::Warning(Form("%s::%s", obj->ClassName(), method),
+ "method is depricated\nPlease use: %s", replace);
+ else ::Warning(method, "method is depricated\nPlease use: %s", replace);
+ }
+
protected:
virtual void Tree2Tree(Option_t *option, const char *detector=0);
Int_t fRun; //! Current run number
Int_t fEvent; //! Current event number (from 1)
Int_t fEventNrInRun; //! Current unique event number in run
Int_t fEventsPerRun; // Number of events per run
- Int_t fDebug; // Debug flag
TObjArray *fModules; // List of Detectors
TGeometry *fGeometry; // Pointer to geometry
AliMC *fMCApp; // Pointer to virtual MC Application
AliDisplay *fDisplay; //! Pointer to event display
- TStopwatch fTimer; // Timer object
AliMagF *fField; // Magnetic Field Map
- TVirtualMC *fMC; //! Pointer to MonteCarlo object
Int_t fNdets; // Number of detectors
Bool_t fInitDone; //! True when initialisation done
AliLego *fLego; //! Pointer to aliLego object if it exists
TString fConfigFunction; // Configuration file to be executed
TRandom *fRandom; // Pointer to the random number generator
TString fBaseFileName; // Name of the base root file
-
+ Bool_t fIsRootGeometry; //! Flag telling if the geometry is loaded from file
+ TString fGeometryFileName; //! Name of the geometry file
+ TString fTriggerDescriptor; // Trigger descriptor identifier
AliRunLoader *fRunLoader; //!run getter - written as a separate object
private:
void Copy(TObject &arun) const;
- ClassDef(AliRun,8) //Supervisor class for all Alice detectors
+ ClassDef(AliRun,11) //Supervisor class for all Alice detectors
};
R__EXTERN AliRun *gAlice;
-
+
#endif