]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.h
Some of the coding violations corrected
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
index a53d2fa16f0444f0504c4e27e3f07b93547cb1f9..6239ff5ed31cb701c81370a51b26d1531edd2f46 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);
@@ -102,7 +102,7 @@ public:
                                       const char* rootFileName = "");
   virtual Bool_t ConvertDateToRoot(const char* dateFileName = "raw.date",
                                   const char* rootFileName = "raw.root");
-  virtual Bool_t ConvertRaw2SDigits(const char* rawDirectory, const char* esdFile = "");
+  virtual Bool_t ConvertRaw2SDigits(const char* rawDirectory, const char* esdFile = "", Int_t N=-1);
 
   // Sets the name of the file from which the geometry is loaded
   virtual void SetGeometryFile(const Char_t* filename) {fGeometryFile=filename;}
@@ -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:
 
@@ -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