X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliPreprocessor.cxx;h=7b36361b85de3ad1cc6aa2c5e963bf52bfe7f9f6;hb=cc545eb95f8b954e34fd3bada0e76ad3180c2cf6;hp=92616346c80b8bf0df82ecf84a65a45d1554c4d9;hpb=4a33bdd9e61f94345997f3a1c011de115d18f197;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliPreprocessor.cxx b/STEER/AliPreprocessor.cxx index 92616346c80..7b36361b85d 100644 --- a/STEER/AliPreprocessor.cxx +++ b/STEER/AliPreprocessor.cxx @@ -15,6 +15,23 @@ /* $Log$ +Revision 1.17 2007/08/28 16:03:30 acolla +Restored to v1.14: + + +Function Bool_t GetHLTStatus() added to preprocessor interface. It will return +the status of HLT read from the run logbook. + +Revision 1.16 2007/08/22 09:20:50 hristov +Updated QA classes (Yves) + +Revision 1.14 2007/05/30 06:35:21 jgrosseo +Adding functionality to the Shuttle/TestShuttle: +o) Function to retrieve list of sources from a given system (GetFileSources with id=0) +o) Function to retrieve list of IDs for a given source (GetFileIDs) +These functions are needed for dealing with the tag files that are saved for the GRP preprocessor +Example code has been added to the TestProcessor in TestShuttle + Revision 1.13 2007/04/12 08:26:33 jgrosseo updated commment @@ -113,8 +130,8 @@ some docs added #include "AliPreprocessor.h" #include -#include #include +#include #include "AliLog.h" #include "AliCDBMetaData.h" @@ -132,7 +149,8 @@ AliPreprocessor::AliPreprocessor(const char* detector, AliShuttleInterface* shut fRun(-1), fStartTime(0), fEndTime(0), - fShuttle(shuttle) + fShuttle(shuttle), + fRunTypes() { SetTitle(Form("AliPreprocessor for %s subdetector.", detector)); @@ -143,6 +161,8 @@ AliPreprocessor::AliPreprocessor(const char* detector, AliShuttleInterface* shut } fShuttle->RegisterPreprocessor(this); + + fRunTypes.SetOwner(kTRUE); } //______________________________________________________________________________________________ @@ -231,6 +251,23 @@ Bool_t AliPreprocessor::StoreReferenceFile(const char* localFile, const char* gr if(!offlineDetName) return 0; return fShuttle->StoreReferenceFile(GetName(), localFile, gridFileName); } + +//______________________________________________________________________________________________ +Bool_t AliPreprocessor::StoreRunMetadataFile(const char* localFile, const char* gridFileName) +{ + // + // Stores Run metadata file to the Grid, in the run folder + // + // Only GRP can call this function. + + TString detName(GetName()); + if (detName != "GRP") + { + Log("StoreRunMetadataFile - Sorry, only Panos has this privilege."); + return kFALSE; + } + return fShuttle->StoreRunMetadataFile(localFile, gridFileName); +} //______________________________________________________________________________________________ const char* AliPreprocessor::GetFile(Int_t system, const char* id, const char* source) @@ -308,3 +345,49 @@ const char* AliPreprocessor::GetRunType() return fShuttle->GetRunType(); } + +//______________________________________________________________________________________________ +Bool_t AliPreprocessor::GetHLTStatus() +{ + // Return HLT status (ON or OFF) + // Converts the HLT status from the status string read in the run logbook (not just a bool) + // The call is delegated to AliShuttleInterface + + return fShuttle->GetHLTStatus(); + +} + +//______________________________________________________________________________________________ +void AliPreprocessor::AddRunType(const char* runType) +{ + // adds the given run type to the list of run types that are processed + // this function should be called in the constructor of the derived preprocessor + + if (!runType) + return; + + fRunTypes.Add(new TObjString(runType)); +} + +//______________________________________________________________________________________________ +Bool_t AliPreprocessor::AliPreprocessor::ProcessRunType() +{ + // searches for the current run type in the list of run types that are processed by this + // preprocessor. The list is populated by AddRunType + + const char* runType = GetRunType(); + + Log(Form("Checking if run type %s is in the list of run types to be processed by this preprocessor...", runType)); + + if (fRunTypes.GetEntries() == 0) + Log("WARNING! There are no run types defined. This preprocessor will never run."); + + if (fRunTypes.FindObject(runType)) + { + Log("Run type found. Processing this run."); + return kTRUE; + } + + Log("Run type not found. Skipping this run."); + return kFALSE; +}