]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.cxx
- added the pad status regarding the calibration and the saturation to the TObject...
[u/mrichter/AliRoot.git] / STEER / AliSimulation.cxx
index 96df0f0d969d88090de47351713a4589161a134a..e06b9233dfa1ff29b28d9be1438bff6c31f52075 100644 (file)
@@ -640,6 +640,24 @@ Bool_t AliSimulation::Run(Int_t nEvents)
   if (!AliGeomManager::GetGeometry()) {
     // Initialize the geometry manager
     AliGeomManager::LoadGeometry("geometry.root");
+    
+//    // Check that the consistency of symbolic names for the activated subdetectors
+//    // in the geometry loaded by AliGeomManager
+//    AliRunLoader* runLoader = LoadRun("READ");
+//    if (!runLoader) return kFALSE;
+//
+//    TString detsToBeChecked = "";
+//    TObjArray* detArray = runLoader->GetAliRun()->Detectors();
+//    for (Int_t iDet = 0; iDet < detArray->GetEntriesFast(); iDet++) {
+//      AliModule* det = (AliModule*) detArray->At(iDet);
+//      if (!det || !det->IsActive()) continue;
+//      detsToBeChecked += det->GetName();
+//      detsToBeChecked += " ";
+//    } // end loop over detectors
+//    if(!AliGeomManager::CheckSymNamesLUT(detsToBeChecked.Data()))
+    if(!AliGeomManager::CheckSymNamesLUT("ALL"))
+       AliFatalClass("Current loaded geometry differs in the definition of symbolic names!");
+       
     if (!AliGeomManager::GetGeometry()) if (fStopOnError) return kFALSE;
     // Misalign geometry
     if(!MisalignGeometry()) if (fStopOnError) return kFALSE;
@@ -833,6 +851,19 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents)
   // Misalign geometry
 #if ROOT_VERSION_CODE < 331527
   AliGeomManager::SetGeometry(gGeoManager);
+  
+  // Check that the consistency of symbolic names for the activated subdetectors
+  // in the geometry loaded by AliGeomManager
+  TString detsToBeChecked = "";
+  TObjArray* detArray = runLoader->GetAliRun()->Detectors();
+  for (Int_t iDet = 0; iDet < detArray->GetEntriesFast(); iDet++) {
+    AliModule* det = (AliModule*) detArray->At(iDet);
+    if (!det || !det->IsActive()) continue;
+    detsToBeChecked += det->GetName();
+    detsToBeChecked += " ";
+  } // end loop over detectors
+  if(!AliGeomManager::CheckSymNamesLUT(detsToBeChecked.Data()))
+    AliFatalClass("Current loaded geometry differs in the definition of symbolic names!");
   MisalignGeometry(runLoader);
 #endif
 
@@ -1686,9 +1717,15 @@ Bool_t AliSimulation::RunHLT()
   }
 
   // init the HLT simulation
-  if (fRunHLT.CompareTo("default")==0) fRunHLT="";
+  TString options;
+  if (fRunHLT.CompareTo("default")!=0) options=fRunHLT;
+  if (!IsSelected("HLT", fWriteRawData)) {
+    options+=" writerawfiles=";
+  } else {
+    options+=" writerawfiles=HLT";
+  }
   AliHLTSimulationInit_t fctInit=(AliHLTSimulationInit_t)(gSystem->DynFindSymbol(ALIHLTSIMULATION_LIBRARY, ALIHLTSIMULATION_INIT));
-  if (fctInit==NULL || (iResult=(fctInit(pHLT, pRunLoader, fRunHLT.Data())))<0) {
+  if (fctInit==NULL || (iResult=(fctInit(pHLT, pRunLoader, options.Data())))<0) {
     AliError(Form("can not init HLT simulation: error %d (init %p)", iResult, fctInit));
   } else {
     // run the HLT simulation
@@ -1716,14 +1753,18 @@ Bool_t AliSimulation::RunQA()
        AliQADataMakerSteer qas ; 
     qas.SetRunLoader(gAlice->GetRunLoader()) ;
 
-       Bool_t rv =  qas.Run("ALL", AliQA::kHITS) ; 
+       TString detectorsw("") ;  
+       Bool_t rv = kTRUE ; 
+       detectorsw =  qas.Run("ALL", AliQA::kHITS) ; 
 //     qas.Reset() ; 
-       rv *= qas.Run(fMakeSDigits.Data(), AliQA::kSDIGITS) ;   
+       detectorsw += qas.Run(fMakeSDigits.Data(), AliQA::kSDIGITS) ;   
 //     qas.Reset() ; 
-       rv *= qas.Run(fMakeDigits.Data(), AliQA::kDIGITS) ;     
+       detectorsw += qas.Run(fMakeDigits.Data(), AliQA::kDIGITS) ;     
 //     qas.Reset() ; 
-       rv *= qas.Run(fMakeDigitsFromHits.Data(), AliQA::kDIGITS) ; 
-
+       detectorsw += qas.Run(fMakeDigitsFromHits.Data(), AliQA::kDIGITS) ; 
+       
+       if ( detectorsw.IsNull() ) 
+               rv = kFALSE ; 
        return rv ; 
 }
 
@@ -1765,3 +1806,5 @@ void AliSimulation::ProcessEnvironmentVars()
     
     AliInfo(Form("Run number = %d", fRun)); 
 }
+
+