Added an object array that is supposed to host CDB configuration to be applied on...
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 May 2010 06:38:49 +0000 (06:38 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 May 2010 06:38:49 +0000 (06:38 +0000)
Unlock CDB before setting run number, add some streaming protections just in case (Jens)

ANALYSIS/Tender/AliTender.cxx
ANALYSIS/Tender/AliTender.h

index ce80cf9..9be143f 100644 (file)
@@ -106,9 +106,9 @@ void AliTender::ConnectInputData(Option_t* /*option*/)
   // SetDefault storage. Specific storages must be set by AliTenderSupply::Init()
   fCDB->SetDefaultStorage(fDefaultStorage);
   fRun = fESD->GetRunNumber();
-  fCDB->SetRun(fRun);
   // Unlock CDB
   fCDBkey = fCDB->SetLock(kFALSE, fCDBkey);
+  fCDB->SetRun(fRun);
   TIter next(fSupplies);
   AliTenderSupply *supply;
   while ((supply=(AliTenderSupply*)next())) supply->Init();
index 032fc96..7e65394 100644 (file)
@@ -26,14 +26,15 @@ class AliTender : public AliAnalysisTask {
 
 private:
   Int_t                     fDebug;          // Debug level
-  Int_t                     fRun;            // Current run
-  Bool_t                    fRunChanged;     // Flag for run change.
-  ULong_t                   fCDBkey;         // Key to unlock CDB manager
+  Int_t                     fRun;            //! Current run
+  Bool_t                    fRunChanged;     //! Flag for run change.
+  ULong_t                   fCDBkey;         //! Key to unlock CDB manager
   TString                   fDefaultStorage; // Default CDB storage
-  AliCDBManager            *fCDB;            // Pointer to CDB manager
-  AliESDInputHandler       *fESDhandler;     // Pointer to ESD input handler
-  AliESDEvent              *fESD;            // Pointer to current ESD event
+  AliCDBManager            *fCDB;            //! Pointer to CDB manager
+  AliESDInputHandler       *fESDhandler;     //! Pointer to ESD input handler
+  AliESDEvent              *fESD;            //! Pointer to current ESD event
   TObjArray                *fSupplies;       // Array of tender supplies
+  TObjArray                *fCDBSettings;    // Array with CDB configuration
   
   AliTender(const AliTender &other);
   AliTender& operator=(const AliTender &other);
@@ -52,6 +53,7 @@ public:
   Bool_t                    RunChanged() const {return fRunChanged;}
   // Configuration
   void                      SetDefaultCDBStorage(const char *dbString="local://$ALICE_ROOT/OCDB");
+  void                      SetDebugLevel(Int_t debug) {fDebug = debug;}
 
   // Run control
   virtual void              ConnectInputData(Option_t *option = "");
@@ -59,6 +61,6 @@ public:
   virtual Bool_t            Notify() {return kTRUE;}
   virtual void              Exec(Option_t *option);
     
-  ClassDef(AliTender,1)  // Class describing the tender car for ESD analysis
+  ClassDef(AliTender,2)  // Class describing the tender car for ESD analysis
 };
 #endif