return kFALSE;
}
}
+
+//______________________________________________________________________________________________
+const char* AliShuttle::GetTriggerConfiguration()
+{
+ // Receives the trigger configuration from the DAQ logbook for the current run
+
+ // check connection, if needed reconnect
+ if (!Connect(3))
+ return 0;
+
+ TString sqlQuery;
+ sqlQuery.Form("SELECT configFile FROM logbook_trigger_config WHERE run = %d", GetCurrentRun());
+ TSQLResult* result = fServer[3]->Query(sqlQuery);
+ if (!result)
+ {
+ Log("SHUTTLE", Form("ERROR: Can't execute query <%s>!", sqlQuery.Data()));
+ return 0;
+ }
+
+ if (result->GetRowCount() == 0)
+ {
+ Log("SHUTTLE", "ERROR: Trigger configuration not found in logbook_trigger_config");
+ delete result;
+ return 0;
+ }
+
+ TSQLRow* row = result->Next();
+ if (!row)
+ {
+ Log("SHUTTLE", "ERROR: Could not receive logbook_trigger_config data");
+ delete result;
+ return 0;
+ }
+
+ // static, so that pointer remains valid when it is returned to the calling class
+ static TString triggerConfig(row->GetField(0));
+
+ delete row;
+ row = 0;
+
+ delete result;
+ result = 0;
+
+ Log("SHUTTLE", Form("Found trigger configuration: %s", triggerConfig.Data()));
+
+ return triggerConfig;
+}
+
//______________________________________________________________________________________________
void AliShuttle::SetShuttleTempDir(const char* tmpDir)
{
virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path);
virtual const char* GetRunType();
virtual Bool_t GetHLTStatus();
+ virtual const char* GetTriggerConfiguration();
virtual void Log(const char* detector, const char* message);
void SetLogbookEntry(AliShuttleLogbookEntry* entry) {fLogbookEntry=entry;}
void AddInputRunParameter(const char* key, const char* value);
void SetInputRunType(const char* runType) { fRunType = runType; }
void SetInputHLTStatus(Bool_t status) { fHLTStatus = status; }
+ void SetInputTriggerConfiguration(const char* configuration) { fTriggerConfiguration = configuration; }
Bool_t AddInputCDBEntry(AliCDBEntry* entry);
void Process();
virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path);
virtual const char* GetRunType();
virtual Bool_t GetHLTStatus() {return fHLTStatus;}
+ virtual const char* GetTriggerConfiguration() { return fTriggerConfiguration; }
virtual void Log(const char* detector, const char* message);
virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
Bool_t fHLTStatus; // HLT status for current run (on=1/off=0)
TObjArray* fPreprocessors; // list of preprocessors that are to be tested
TMap* fDcsAliasMap; // DCS data for testing
+ TString fTriggerConfiguration; // trigger configuration for testing
private:
Bool_t CopyFileLocally(TString& targetDir, const char* localFile, const char* gridFileName);
TString detName(GetName());
if (detName != "GRP")
{
- Log("StoreRunMetadataFile - Sorry, only Panos has this privilege.");
+ Log("StoreRunMetadataFile - Only GRP can call this function.");
return kFALSE;
}
return fShuttle->StoreRunMetadataFile(localFile, gridFileName);
}
+//______________________________________________________________________________________________
+const char* AliPreprocessor::GetTriggerConfiguration()
+{
+ // Returns the trigger configuration which is read from a table in the DAQ logbook
+ // The call is delegated to AliShuttleInterface
+ // Only GRP can call this function.
+
+ TString detName(GetName());
+ if (detName != "GRP")
+ {
+ Log("GetTriggerConfiguration - Only GRP can call this function.");
+ return 0;
+ }
+
+ return fShuttle->GetTriggerConfiguration();
+}
+
//______________________________________________________________________________________________
void AliPreprocessor::AddRunType(const char* runType)
{
AliCDBEntry* GetFromOCDB(const char* pathLevel2, const char* pathLevel3);
const char* GetRunType();
Bool_t GetHLTStatus();
+ const char* GetTriggerConfiguration();
void Log(const char* message);
void AddRunType(const char* runType);
virtual const char* GetRunParameter(const char* lbEntry) = 0;
virtual const char* GetRunType() = 0;
virtual Bool_t GetHLTStatus() = 0;
+ virtual const char* GetTriggerConfiguration() = 0;
virtual AliCDBEntry* GetFromOCDB(const char* detector, const AliCDBPath& path) = 0;