Implementation of possibility to run the preprocessors to test the DAs.
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Feb 2009 17:15:03 +0000 (17:15 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Feb 2009 17:15:03 +0000 (17:15 +0000)
Change of the OCDB/Reference path (LHC period dependence removed).

SHUTTLE/AliShuttle.cxx
SHUTTLE/AliShuttleLogbookEntry.cxx
SHUTTLE/AliShuttleLogbookEntry.h

index 96eb853..b47e187 100644 (file)
@@ -1203,6 +1203,9 @@ void AliShuttle::SendMLRunInfo(const char* status)
                runType += fLogbookEntry->GetRunParameter("log");
                runType += ")";
        }
+       if (fLogbookEntry->GetDATestMode()){
+               runType += " (DATest)";
+       }
        TMonaLisaText  mlRunType("SHUTTLE_runtype", runType);
 
        TList mlList;
@@ -1319,21 +1322,27 @@ Bool_t AliShuttle::Process(AliShuttleLogbookEntry* entry)
        // Initialization
        Bool_t hasError = kFALSE;
 
-       // Set the CDB and Reference folders according to the year and LHC period
-       TString lhcPeriod(GetLHCPeriod());
-       if (lhcPeriod.Length() == 0) 
-       {
-               Log("SHUTTLE","Process - LHCPeriod not found in logbook!");
-               return 0; 
-       }       
-       
-       // build cdb paths (repeat each time, LHCperiod might have changed)
-       fgkMainCDB.Form("alien://folder=%s%d/%s/OCDB?user=alidaq?cacheFold=/tmp/OCDBCache", 
-                                       fConfig->GetAlienPath(), GetCurrentYear(), lhcPeriod.Data());
-       
-       fgkMainRefStorage.Form("alien://folder=%s%d/%s/Reference?user=alidaq?cacheFold=/tmp/OCDBCache", 
-                                       fConfig->GetAlienPath(), GetCurrentYear(), lhcPeriod.Data());
-       
+       // Set the CDB and Reference folders according to the year
+
+       // build cdb paths (repeat each time, run might be a DATest run)
+       if (!fLogbookEntry->GetDATestMode()){
+               fgkMainCDB.Form("alien://folder=%s%d/OCDB?user=alidaq?cacheFold=/tmp/OCDBCache", 
+                               fConfig->GetAlienPath(), GetCurrentYear());
+               
+               fgkMainRefStorage.Form("alien://folder=%s%d/Reference?user=alidaq?cacheFold=/tmp/OCDBCache", 
+                                      fConfig->GetAlienPath(), GetCurrentYear());
+       }
+       else {
+               fgkMainCDB.Form("alien://folder=%s%d/DATest/OCDB?user=alidaq?cacheFold=/tmp/OCDBCache",
+                               fConfig->GetAlienPath(), GetCurrentYear());
+               
+               fgkMainRefStorage.Form("alien://folder=%s%d/DATest/Reference?user=alidaq?cacheFold=/tmp/OCDBCache",
+                                      fConfig->GetAlienPath(), GetCurrentYear());
+       }
+
+       AliDebug(2,Form("Main CDB storage = %s",fgkMainCDB.Data()));
+       AliDebug(2,Form("Main Reference storage = %s",fgkMainRefStorage.Data()));
+
        // Loop on detectors in the configuration
        TIter iter(fConfig->GetDetectors());
        TObjString* aDetector = 0;
@@ -1908,6 +1917,11 @@ Bool_t AliShuttle::QueryShuttleLogbook(const char* whereClause,
                if (!entry)
                        continue;
 
+               // DA test mode flag
+               TString daTestModeString(aRow->GetField(2), aRow->GetFieldLength(2)); // field 2 = DA test mode flag 
+               Bool_t daTestMode = (Bool_t)daTestModeString.Atoi();
+               entry->SetDATestMode(daTestMode);
+
                // loop on detectors
                for(UInt_t ii = 0; ii < nCols; ii++)
                        entry->SetDetectorStatus(aResult->GetFieldName(ii), aRow->GetField(ii));
@@ -3461,7 +3475,7 @@ Bool_t AliShuttle::TouchFile()
        }
 
        TString dir;
-       dir.Form("%s%d/%s/SHUTTLE_DONE", fConfig->GetAlienPath(), GetCurrentYear(), GetLHCPeriod());
+       dir.Form("%s%d/SHUTTLE_DONE", fConfig->GetAlienPath(), GetCurrentYear());
        // checking whether directory for touch command exists
        TString commandLs;
        commandLs.Form("ls %s",dir.Data());
index 7862e82..662bddb 100644 (file)
@@ -31,7 +31,8 @@ ClassImp(AliShuttleLogbookEntry)
 AliShuttleLogbookEntry::AliShuttleLogbookEntry() :
 TObject(),
 fRun(-1),
-fRunParameters(0)
+fRunParameters(0),
+fDATestMode(kFALSE)
 {
        //
        // default constructor
@@ -46,7 +47,8 @@ fRunParameters(0)
 AliShuttleLogbookEntry::AliShuttleLogbookEntry(Int_t run, Status* status) :
 TObject(),
 fRun(run),
-fRunParameters(0)
+fRunParameters(0),
+fDATestMode(kFALSE)
 {
        //
        // default constructor
@@ -70,7 +72,8 @@ AliShuttleLogbookEntry::~AliShuttleLogbookEntry() {
 AliShuttleLogbookEntry::AliShuttleLogbookEntry(const AliShuttleLogbookEntry &c) :
 TObject(),
 fRun(c.fRun),
-fRunParameters(0)
+fRunParameters(0),
+fDATestMode(c.fDATestMode)
 {
        //
        // copy constructor
@@ -119,6 +122,7 @@ void AliShuttleLogbookEntry::Copy(TObject& c) const
        }
 
        target.SetDetectorStatus(GetDetectorStatus());
+       target.fDATestMode = fDATestMode;
 }
 
 //______________________________________________________________________________________________
index a9c64fc..c701e57 100644 (file)
@@ -40,6 +40,7 @@ public:
        UInt_t GetEndTime() const {TString tmp(GetRunParameter("DAQ_time_end")); return tmp.Atoi();}
        UInt_t GetTimeCreated() const {TString tmp(GetRunParameter("time_created")); return tmp.Atoi();}
        Bool_t GetECSSuccess() const {TString tmp(GetRunParameter("ecs_success")); return (Bool_t) tmp.Atoi();}
+       Bool_t GetDATestMode() const {return fDATestMode;}
 
 //     void SetRun(Int_t run) {fRun=run;}
 
@@ -56,6 +57,7 @@ public:
        void SetDetectorStatus(UInt_t detPos, Status status);
        void SetDetectorStatus(const char* detCode, const char* statusName);
        void SetDetectorStatus(UInt_t detPos, const char* statusName);
+       void SetDATestMode(Bool_t daTestMode) {fDATestMode = daTestMode;}
 
        const char* GetRunType() const { return GetRunParameter("run_type"); }
 
@@ -69,6 +71,7 @@ private:
        Int_t fRun;                     // Run number
        TMap fRunParameters;            // run parameters written in DAQ logbook
        Status fDetectorStatus[AliShuttleInterface::kNDetectors];       // Detector status array
+       Bool_t fDATestMode;             // flag to set whether we are in the DA Test Mode for the current run
 
        ClassDef(AliShuttleLogbookEntry, 0)
 };