]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.h
attempting to add support for par arhcives in forward
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
index 1e2ae8497925f78eea09ded2eeb99a6f5d5dbfdc..ef6f196953462a4a36ce7a036e913f8b9f193814 100644 (file)
@@ -33,7 +33,7 @@ public:
                const char* title = "generation, simulation and digitization");
   virtual ~AliSimulation();
 
-  static AliSimulation *Instance() {return fgInstance;}
+  static AliSimulation *Instance() {if(!fgInstance) fgInstance=new AliSimulation(); return fgInstance;}
 
   void           SetNumberOfEvents(Int_t nEvents);
   void           SetConfigFile(const char* fileName);
@@ -55,8 +55,6 @@ public:
   void           SetRegionOfInterest(Bool_t flag) {fRegionOfInterest = flag;};
   void           SetMakeDigits(const char* detectors)
                    {fMakeDigits = detectors;};
-  void           SetMakeTrigger(const char* descriptors)
-                   {fMakeTrigger = descriptors;};
   void           SetMakeDigitsFromHits(const char* detectors)
                    {fMakeDigitsFromHits = detectors;};
   void           SetWriteRawData(const char* detectors, 
@@ -66,6 +64,8 @@ public:
                   fDeleteIntermediateFiles = deleteIntermediateFiles;};
   void           SetWriteSelRawData(Bool_t sel = kTRUE)
                    {fWriteSelRawData = sel;}
+  void           SetTriggerConfig(TString conf) {fTriggerConfig=conf;}
+  const Char_t*  GetTriggerConfig() const {return fTriggerConfig.Data();}
   void           SetAlignObjArray(TObjArray *array)
                    {fAlignObjArray = array;
                   fLoadAlignFromCDB = kFALSE;}
@@ -131,6 +131,9 @@ public:
 
   void SetWriteGRPEntry(Bool_t flag = kTRUE) { fWriteGRPEntry = flag; }
   void WriteGRPEntry();
+  void UseVertexFromCDB()   {fUseVertexFromCDB   = kTRUE;}
+  void UseMagFieldFromGRP() {fUseMagFieldFromGRP = kTRUE;} 
+  void SetGRPWriteLocation(char* loc) {fGRPWriteLocation = loc;}
 
 private:
 
@@ -153,7 +156,7 @@ private:
   TString        fLoadAlObjsListOfDets;   // Load alignment data from CDB for these detectors
   TString        fMakeSDigits;        // create sdigits for these detectors
   TString        fMakeDigits;         // create digits for these detectors
-  TString        fMakeTrigger;        // run trigger for these descriptors
+  TString        fTriggerConfig;      // run trigger for these descriptors
   TString        fMakeDigitsFromHits; // create digits from hits for these detectors
   TString        fWriteRawData;       // write raw data for these detectors
   TString        fRawDataFileName;    // file name for the raw data file
@@ -167,21 +170,26 @@ private:
   TObjArray      fEventsPerFile;      // number of events per file for given detectors and data types
 
   TObjArray*     fBkgrdFileNames;     // names of background files for merging
-  TObjArray*      fAlignObjArray;      // array with the alignment objects to be applied to the geometry
+  TObjArray*     fAlignObjArray;      // array with the alignment objects to be applied to the geometry
   Bool_t         fUseBkgrdVertex;     // use vertex from background in case of merging
   Bool_t         fRegionOfInterest;   // digitization in region of interest
 
   TString       fCDBUri;                            //! Uri of the default CDB storage
-  TString       fQARefUri;                        //! Uri of the default QA reference storage
-  TObjArray  fSpecCDBUri;                  //! Array with detector specific CDB storages
+  TString       fQARefUri;                          //! Uri of the default QA reference storage
+  TObjArray      fSpecCDBUri;                        //! Array with detector specific CDB storages
   Int_t           fRun;                                     //! Run number, will be passed to CDB and gAlice!!
   Int_t           fSeed;                        //! Seed for random number generator 
   Bool_t          fInitCDBCalled;               //! flag to check if CDB storages are already initialized
   Bool_t          fInitRunNumberCalled;         //! flag to check if run number is already initialized
   Bool_t          fSetRunNumberFromDataCalled;  //! flag to check if run number is already loaded from run loader
   
-  Bool_t     fEmbeddingFlag;      // Flag for embedding
-  AliLego       *fLego;              //! Pointer to aliLego object if it exists
+  Bool_t         fEmbeddingFlag;       // Flag for embedding
+  AliLego       *fLego;                //! Pointer to aliLego object if it exists
+  // OCDB
+  ULong_t         fKey;                //! current CDB key
+  Bool_t          fUseVertexFromCDB;   // Flag to use Vertex from CDB
+  Bool_t          fUseMagFieldFromGRP; // Use magnetic field settings from GRP
+  TString         fGRPWriteLocation;   // Location to write the GRP entry from simulation
   
   //QA stuff
   static const Int_t   fgkNDetectors = 15 ;             // number of detectors