]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
be able to set objects for which alignment to apply
authorConstantin Loizides <cloizides@lbl.gov>
Mon, 16 Dec 2013 21:19:25 +0000 (22:19 +0100)
committerConstantin Loizides <cloizides@lbl.gov>
Mon, 16 Dec 2013 21:19:25 +0000 (22:19 +0100)
PWG/EMCAL/AliEmcalSetupTask.cxx
PWG/EMCAL/AliEmcalSetupTask.h
PWG/EMCAL/macros/AddTaskEmcalSetup.C

index bc84f9b3b43da8f63f1eceb330cce53d3db682f2..5feb5eb1211fbc6e168175501762c683411cc55d 100644 (file)
@@ -25,7 +25,8 @@ AliEmcalSetupTask::AliEmcalSetupTask() :
   AliAnalysisTaskSE(),
   fOcdbPath(),
   fOadbPath("$ALICE_ROOT/OADB/EMCAL"),
-  fGeoPath("."),
+  fGeoPath("$ALICE_ROOT/OADB/EMCAL"),
+  fObjs("GRP ITS TPC TRD EMCAL"),
   fIsInit(kFALSE)
 {
   // Constructor.
@@ -37,6 +38,7 @@ AliEmcalSetupTask::AliEmcalSetupTask(const char *name) :
   fOcdbPath(),
   fOadbPath("$ALICE_ROOT/OADB/EMCAL"),
   fGeoPath("$ALICE_ROOT/OADB/EMCAL"),
+  fObjs("GRP ITS TPC TRD EMCAL"),
   fIsInit(kFALSE)
 {
   // Constructor.
@@ -106,7 +108,8 @@ void AliEmcalSetupTask::UserExec(Option_t *)
     GRPManager.SetMagField();
     AliInfo(Form("Loading geometry from OCDB"));
     AliGeomManager::LoadGeometry();
-    AliGeomManager::ApplyAlignObjsFromCDB("GRP ITS TPC TRD EMCAL");
+    if (!fObjs.IsNull())
+      AliGeomManager::ApplyAlignObjsFromCDB(fObjs);
   }
 
   TGeoManager *geo = AliGeomManager::GetGeometry();
index b07366730f0516f26d2e500395b24705ac5baff6..07c435479f53db199392125b4d42e5e8dbe75254 100644 (file)
@@ -16,22 +16,24 @@ class AliEmcalSetupTask : public AliAnalysisTaskSE {
   AliEmcalSetupTask(const char *name);
   virtual ~AliEmcalSetupTask();
 
-  void UserExec(Option_t *option);
   void SetGeoPath(const char *n)  { fGeoPath  = n; }
   void SetOadbPath(const char *n) { fOadbPath = n; }
   void SetOcdbPath(const char *n) { fOcdbPath = n; }
+  void SetObjs(const char *n)     { fObjs     = n; }
+  void UserExec(Option_t *option);
 
  protected:
   TString            fOcdbPath;        // path to ocdb (def=none)
   TString            fOadbPath;        // path to oadb
   TString            fGeoPath;         // path to geometry
+  TString            fObjs;            // string of objects for alignment to apply
   Bool_t             fIsInit;          //!=true then already initialized 
 
  private:
   AliEmcalSetupTask(const AliEmcalSetupTask&);            // not implemented
   AliEmcalSetupTask &operator=(const AliEmcalSetupTask&); // not implemented
 
-  ClassDef(AliEmcalSetupTask, 2); // Class to setup geometry for EMCal
+  ClassDef(AliEmcalSetupTask, 3); // Class to setup geometry for EMCal
 };
 
 #endif
index f8eb8ea95280a2d4986b6347cdfdfabfaeb72139..0b2ffad84dc6eb9eefe3ac95654222ac9baf1c02 100644 (file)
@@ -3,7 +3,8 @@
 AliEmcalSetupTask* AddTaskEmcalSetup(
   const char *geop = 0,
   const char *oadp = 0,
-  const char *ocdp = 0 
+  const char *ocdp = 0, 
+  const char *objs = 0
 )
 {  
   // Get the pointer to the existing analysis manager via the static access method.
@@ -30,6 +31,7 @@ AliEmcalSetupTask* AddTaskEmcalSetup(
   if (geop) eTask->SetGeoPath(geop);
   if (oadp) eTask->SetOadbPath(oadp);
   if (ocdp) eTask->SetOcdbPath(ocdp);
+  if (objs) eTask->SetObjs(objs);
 
   //-------------------------------------------------------
   // Final settings, pass to manager and set the containers