]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.h
Reset of centrality object.
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
index 8349af1b14949fbeb5c5a064baa67b286ff67cdd..6239ff5ed31cb701c81370a51b26d1531edd2f46 100644 (file)
@@ -15,8 +15,8 @@
 #include <TNamed.h>
 #include <TString.h>
 #include <TObjArray.h>
-#include "AliQA.h"
-#include "AliQADataMakerSteer.h"
+#include "AliQAv1.h"
+#include "AliQAManager.h"
 
 class AliCDBId;
 class AliCDBParam;
@@ -24,6 +24,7 @@ class AliRunLoader;
 class AliLegoGenerator;
 class AliLego;
 class AliMagF;
+class AliHLTSimulation;
 
 class AliSimulation: public TNamed {
 public:
@@ -32,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);
@@ -54,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, 
@@ -65,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;}
@@ -101,10 +102,17 @@ 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;}
+  virtual const Char_t* GetGeometryFile() const {return fGeometryFile.Data();}
+  virtual Bool_t IsGeometryFromFile() const {return !fGeometryFile.IsNull();}
+
 
   // HLT
   void SetRunHLT(const char* options) {fRunHLT=options;}
+  virtual Bool_t CreateHLT();
   virtual Bool_t RunHLT();
   virtual  Bool_t IsLegoRun() const {return (fLego!=0);}
   AliLego* Lego() const {return fLego;}
@@ -112,13 +120,20 @@ public:
 
   //Quality Assurance
   Int_t       GetDetIndex(const char * detector);
-  void        SetQACycles(AliQA::DETECTORINDEX_t det, const Int_t cycles) {  fQASteer->SetCycleLength(det, cycles) ; }
+  void        SetQACycles(AliQAv1::DETECTORINDEX_t det, const Int_t cycles) {  AliQAManager::QAManager()->SetCycleLength(det, cycles) ; }
   Bool_t      RunQA() ;
   Bool_t      SetRunQA(TString detAndAction="ALL:ALL") ; 
-  void        SetQAWriteExpert(AliQA::DETECTORINDEX_t det) { fQASteer->SetWriteExpert(det) ; }
+  void        SetQAWriteExpert(AliQAv1::DETECTORINDEX_t det) { AliQAManager::QAManager()->SetWriteExpert(det) ; }  
+  void        SetQARefDefaultStorage(const char* uri);
+  void        InitQA();
+  void        SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecie = es ; }
+  void        SetWriteQAExpert() { fWriteQAExpertData = kTRUE ; }
 
   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:
 
@@ -141,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
@@ -155,36 +170,45 @@ 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
-  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
   static const char *  fgkDetectorName[fgkNDetectors] ; // names of detectors
   TString              fQADetectors ;                   // list of detectors to be QA'ed       
   TString              fQATasks ;                       // list of QA tasks to be performed    
-  AliQADataMakerSteer * fQASteer ;                      // steering object to run QA
   Bool_t               fRunQA ;                         // Runs the QA at the end of simulation
-  AliRecoParam::EventSpecie_t fEventSpecie ;                   // type of event (see AliRecoParam::EventSpecie_t)
+  AliRecoParam::EventSpecie_t fEventSpecie ;            // type of event (see AliRecoParam::EventSpecie_t)
+  Bool_t               fWriteQAExpertData ;             //! decides wheter or not to write experts QA data; true by default
+
+  TString              fGeometryFile;                   // Geometry file
 
   //HLT
-  TString        fRunHLT;             // HLT options, HLT is disabled if empty, default='default'
+  TString              fRunHLT;       //! HLT options, HLT is disabled if empty, default='default'
+  AliHLTSimulation*    fpHLT;         //! The instance of HLT simulation
 
   Bool_t         fWriteGRPEntry;      // Write or not GRP entry corresponding to the settings in Config.C
 
-  ClassDef(AliSimulation, 8)  // class for running generation, simulation and digitization
+  ClassDef(AliSimulation, 11)  // class for running generation, simulation and digitization
 };
 
 #endif