]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.h
reorganization of TRD PID reference maker classes. Data management has
[u/mrichter/AliRoot.git] / STEER / AliSimulation.h
index 8f5ca97883134a9f0e3ca932017dd6730f3680d3..e268f3e3eff51498f818f37db2336f620aca7c68 100644 (file)
 #include <TNamed.h>
 #include <TString.h>
 #include <TObjArray.h>
-#include "AliQA.h"
+#include "AliQAv1.h"
+#include "AliQAManager.h"
 
 class AliCDBId;
 class AliCDBParam;
 class AliRunLoader;
-class AliQADataMakerSteer ; 
+class AliLegoGenerator;
+class AliLego;
+class AliMagF;
+class AliHLTSimulation;
 
 class AliSimulation: public TNamed {
 public:
   AliSimulation(const char* configFileName = "Config.C",
                const char* name = "AliSimulation", 
                const char* title = "generation, simulation and digitization");
-  AliSimulation(const AliSimulation& sim);
-  AliSimulation& operator = (const AliSimulation& sim);
   virtual ~AliSimulation();
 
-  static AliSimulation *GetInstance() {return fgInstance;}
+  static AliSimulation *Instance() {return fgInstance;}
 
   void           SetNumberOfEvents(Int_t nEvents);
   void           SetConfigFile(const char* fileName);
@@ -62,6 +64,8 @@ public:
                                 Bool_t deleteIntermediateFiles = kFALSE)
                    {fWriteRawData = detectors; fRawDataFileName = fileName;
                   fDeleteIntermediateFiles = deleteIntermediateFiles;};
+  void           SetWriteSelRawData(Bool_t sel = kTRUE)
+                   {fWriteSelRawData = sel;}
   void           SetAlignObjArray(TObjArray *array)
                    {fAlignObjArray = array;
                   fLoadAlignFromCDB = kFALSE;}
@@ -78,35 +82,55 @@ public:
   void SetSpecificStorage(const char* calibType, const char* uri);
 
   virtual Bool_t Run(Int_t nEvents = 0);
+  virtual Bool_t RunLego(const char *setup="Config.C",Int_t nc1=60,Float_t c1min=2,Float_t c1max=178,
+                        Int_t nc2=60,Float_t c2min=0,Float_t c2max=360,Float_t rmin=0,
+                        Float_t rmax=430,Float_t zmax=10000, AliLegoGenerator* gener=NULL, Int_t nev = -1);
 
   virtual Bool_t RunSimulation(Int_t nEvents = 0);
   virtual Bool_t RunSDigitization(const char* detectors = "ALL");
-  virtual Bool_t RunTrigger(const char* descriptors ="" );
+  virtual Bool_t RunTrigger(const char* descriptors ="", const char* detectors = "ALL");
   virtual Bool_t WriteTriggerRawData();
   virtual Bool_t RunDigitization(const char* detectors = "ALL",
                                 const char* excludeDetectors = "");
   virtual Bool_t RunHitsDigitization(const char* detectors = "ALL");
   virtual Bool_t WriteRawData(const char* detectors = "ALL",
                              const char* fileName = NULL,
-                             Bool_t deleteIntermediateFiles = kFALSE);
+                             Bool_t deleteIntermediateFiles = kFALSE,
+                             Bool_t selrawdata = kFALSE);
   virtual Bool_t WriteRawFiles(const char* detectors = "ALL");
-  virtual Bool_t ConvertRawFilesToDate(const char* dateFileName = "raw.date");
+  virtual Bool_t ConvertRawFilesToDate(const char* dateFileName = "raw.date",
+                                      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 = "");
 
   // 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;}
+  virtual  void  FinishRun();
 
   //Quality Assurance
   Int_t       GetDetIndex(const char * detector);
-  const Int_t GetQACycles(const char * detector) { return fQACycles[GetDetIndex(detector)] ; }
-  void        SetQACycles(const char * detector, const Int_t cycles) { fQACycles[GetDetIndex(detector)] = cycles ; }
+  void        SetQACycles(AliQAv1::DETECTORINDEX_t det, const Int_t cycles) {  AliQAManager::QAManager()->SetCycleLength(det, cycles) ; }
   Bool_t      RunQA() ;
-  void        SetQA(const Bool_t val) { fRunQA = val ; } 
-  
+  Bool_t      SetRunQA(TString detAndAction="ALL:ALL") ; 
+  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();
+
 private:
+
+  AliSimulation(const AliSimulation&); // Not implemented
+  AliSimulation& operator = (const AliSimulation&); // Not implemented
+
   void                  InitCDB();
   void                  InitRunNumber();
   void                  SetCDBLock();
@@ -128,6 +152,7 @@ private:
   TString        fWriteRawData;       // write raw data for these detectors
   TString        fRawDataFileName;    // file name for the raw data file
   Bool_t         fDeleteIntermediateFiles; // delete intermediate raw data files
+  Bool_t         fWriteSelRawData;    // write detectors raw data in a separate file accoring to the trigger cluster
   Bool_t         fStopOnError;        // stop or continue on errors
 
   Int_t          fNEvents;            // number of events
@@ -136,30 +161,38 @@ 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
-  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
+  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
+  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
+  Bool_t     fEmbeddingFlag;      // Flag for embedding
+  AliLego       *fLego;              //! Pointer to aliLego object if it exists
   
   //QA stuff
   static const Int_t   fgkNDetectors = 15 ;             // number of detectors
   static const char *  fgkDetectorName[fgkNDetectors] ; // names of detectors
-  Int_t                fQACycles[fgkNDetectors] ;       // cycle length (# events) over which QA data are accumulated
-  Bool_t              fRunQA ;                         // Runs the QA at the end of simulation
+  TString              fQADetectors ;                   // list of detectors to be QA'ed       
+  TString              fQATasks ;                       // list of QA tasks to be performed    
+  Bool_t               fRunQA ;                         // Runs the QA at the end of simulation
+  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
 
   //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, 7)  // class for running generation, simulation and digitization
+  ClassDef(AliSimulation, 10)  // class for running generation, simulation and digitization
 };
 
 #endif