#include "AliPDG.h"
#include "AliRun.h"
#include "AliStack.h"
+#include "AliAlignObj.h"
#ifdef __APPLE__
//#include "AliTPCTrackHitsInterfaces.h"
#endif
fPDGDB(0), //Particle factory object
fConfigFunction("\0"),
fRandom(0),
+ fIsRootGeometry(kFALSE),
fRunLoader(0x0)
{
//
fPDGDB(0), //Particle factory object
fConfigFunction("\0"),
fRandom(0),
+ fIsRootGeometry(kFALSE),
fRunLoader(0x0)
{
//
fPDGDB(TDatabasePDG::Instance()), //Particle factory object!
fConfigFunction("Config();"),
fRandom(new TRandom3()),
+ fIsRootGeometry(kFALSE),
fRunLoader(0x0)
{
//
fField->ReadField();
}
+//_______________________________________________________________________
+void AliRun::SetRootGeometry(Bool_t flag)
+{
+// Instruct application that the geometry is to be retreived from a root file.
+ fIsRootGeometry = flag;
+ if (flag) gMC->SetRootGeometry();
+}
//_______________________________________________________________________
void AliRun::SetField(Int_t type, Int_t version, Float_t scale,
Float_t maxField, const char* filename)
fNdets++;
}
-
-//_______________________________________________________________________
-Int_t AliRun::GetDebug() const
-{
- AliFatal("Don't use this method any more, use AliDebug instead");
- return AliDebugLevel();
-}
-
-//_______________________________________________________________________
-void AliRun::SetDebug(Int_t level)
-{
- AliFatal("Don't use this method any more, use AliLog instead");
- AliLog::SetClassDebugLevel("AliRun", level);
-}
-
-
// added by Alberto Colla
//_____________________________________________________________________________
/*inline*/ Bool_t AliRun::IsFileAccessible(const char* fnam, EAccessMode mode)
return !gSystem->AccessPathName(str.Data(),mode);
}
+//_____________________________________________________________________________
+Bool_t AliRun::ApplyDisplacements(TClonesArray* AlObjArray)
+{
+ // Read collection of alignment objects (AliAlignObj derived) saved
+ // in the TClonesArray ClArrayName and apply them to the geometry
+ // manager singleton.
+ //
+ Int_t nvols = AlObjArray->GetEntriesFast();
+
+ for(Int_t j=0; j<nvols; j++)
+ {
+ AliAlignObj* alobj = (AliAlignObj*) AlObjArray->UncheckedAt(j);
+ if (alobj->ApplyToGeometry() == kFALSE)
+ return kFALSE;
+ }
+
+ return kTRUE;
+
+}