#include <TSystem.h>
#include <TVirtualMC.h>
#include <TVirtualMCApplication.h>
+#include <TDatime.h>
#include "AliAlignObj.h"
#include "AliCDBEntry.h"
// run the generation, simulation and digitization
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliSysInfo::AddStamp("Start_Run");
// Load run number and seed from environmental vars
// run the generation and simulation
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
// initialize CDB storage and run number from external environment
// (either CDB manager or AliSimulation setters)
AliPDG::AddParticlesToPdgDataBase();
- gAlice->GetMCApp()->Init();
-
gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField());
+ gAlice->GetMCApp()->Init();
+
//Must be here because some MCs (G4) adds detectors here and not in Config.C
gAlice->InitLoaders();
{
// run the trigger
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
// initialize CDB storage from external environment
// (either CDB manager or AliSimulation setters),
{
// run the generation and simulation
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
// initialize CDB storage and run number from external environment
// (either CDB manager or AliSimulation setters)
AliPDG::AddParticlesToPdgDataBase();
- gAlice->GetMCApp()->Init();
- AliSysInfo::AddStamp("RunSimulation_InitMCApp");
-
gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField());
AliSysInfo::AddStamp("RunSimulation_GetField");
+ gAlice->GetMCApp()->Init();
+ AliSysInfo::AddStamp("RunSimulation_InitMCApp");
+
//Must be here because some MCs (G4) adds detectors here and not in Config.C
gAlice->InitLoaders();
AliRunLoader::Instance()->MakeTree("E");
{
// run the digitization and produce summable digits
static Int_t eventNr=0;
- AliCodeTimerAuto("") ;
+ AliCodeTimerAuto("",0) ;
// initialize CDB storage, run number, set CDB lock
InitCDB();
{
// run the digitization and produce digits from sdigits
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
// initialize CDB storage, run number, set CDB lock
InitCDB();
{
// run the digitization and produce digits from hits
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
// initialize CDB storage, run number, set CDB lock
InitCDB();
// 'selrawdata' flag can be used to enable writing of detectors raw data
// accoring to the trigger cluster.
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliSysInfo::AddStamp("WriteRawData_Start");
TString detStr = detectors;
{
// convert the digits to raw data DDL files
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
AliRunLoader* runLoader = LoadRun("READ");
if (!runLoader) return kFALSE;
// The second argument is not empty when the user decides to write
// the detectors raw data according to the trigger cluster.
- AliCodeTimerAuto("")
+ AliCodeTimerAuto("",0)
char* path = gSystem->Which(gSystem->Getenv("PATH"), "dateStream");
if (!path) {
AliPDG::AddParticlesToPdgDataBase();
- gAlice->GetMCApp()->Init();
-
gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField());
+ gAlice->GetMCApp()->Init();
+
//Must be here because some MCs (G4) adds detectors here and not in Config.C
gAlice->InitLoaders();
AliRunLoader::Instance()->MakeTree("E");
}
Int_t colon = detAndAction.Index(":") ;
fQADetectors = detAndAction(0, colon) ;
- if (fQADetectors.Contains("ALL") )
- fQADetectors = Form("%s %s", fMakeDigits.Data(), fMakeDigitsFromHits.Data()) ;
- fQATasks = detAndAction(colon+1, detAndAction.Sizeof() ) ;
+ if (fQADetectors.Contains("ALL") ){
+ TString tmp = Form("%s %s", fMakeDigits.Data(), fMakeDigitsFromHits.Data()) ;
+ Int_t minus = fQADetectors.Last('-') ;
+ TString toKeep = Form("%s %s", fMakeDigits.Data(), fMakeDigitsFromHits.Data()) ;
+ TString toRemove("") ;
+ while (minus >= 0) {
+ toRemove = fQADetectors(minus+1, fQADetectors.Length()) ;
+ toRemove = toRemove.Strip() ;
+ toKeep.ReplaceAll(toRemove, "") ;
+ fQADetectors.ReplaceAll(Form("-%s", toRemove.Data()), "") ;
+ minus = fQADetectors.Last('-') ;
+ }
+ fQADetectors = toKeep ;
+ }
+ fQATasks = detAndAction(colon+1, detAndAction.Sizeof() ) ;
if (fQATasks.Contains("ALL") ) {
fQATasks = Form("%d %d %d", AliQAv1::kHITS, AliQAv1::kSDIGITS, AliQAv1::kDIGITS) ;
} else {
grpObj->SetRunType("PHYSICS");
grpObj->SetTimeStart(0);
- grpObj->SetTimeEnd(9999);
+ TDatime curtime;
+ grpObj->SetTimeStart(0);
+ grpObj->SetTimeEnd(curtime.Convert());
+ grpObj->SetBeamEnergyIsSqrtSHalfGeV(); // new format of GRP: store sqrt(s)/2 in GeV
const AliGenerator *gen = gAlice->GetMCApp()->Generator();
if (gen) {
- grpObj->SetBeamEnergy(gen->GetEnergyCMS());
+ grpObj->SetBeamEnergy(gen->GetEnergyCMS()/2);
TString projectile;
Int_t a,z;
gen->GetProjectile(projectile,a,z);
grpObj->SetDetectorMask((Int_t)detectorPattern);
grpObj->SetLHCPeriod("LHC08c");
grpObj->SetLHCState("STABLE_BEAMS");
- grpObj->SetLHCLuminosity(0,(AliGRPObject::Stats)0);
- grpObj->SetBeamIntensity(0,(AliGRPObject::Stats)0);
//
AliMagF *field = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
Float_t solenoidField = field ? TMath::Abs(field->SolenoidField()) : 0;