]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliPreprocessor.cxx
Increasing Class version
[u/mrichter/AliRoot.git] / STEER / AliPreprocessor.cxx
index 6ee2c8a884fc05277f933ad639169dec10aa8c3d..1aebad72bdcc1c270eb2b242d91d8df3fd9eaf78 100644 (file)
 
 /*
 $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
+
+Revision 1.12  2007/04/05 08:05:55  acolla
+Conversion from online to offline detector name in StoreReferenceFile
+
+Revision 1.11  2007/04/04 10:29:18  jgrosseo
+1) Storing of files to the Grid is now done _after_ your preprocessors succeeded. This is transparent, which means that you can still use the same functions (Store, StoreReferenceData) to store files to the Grid. However, the Shuttle first stores them locally and transfers them after the preprocessor finished. The return code of these two functions has changed from UInt_t to Bool_t which gives you the success of the storing.
+In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
+
+2) The meaning of the return code of the preprocessor has changed. 0 is now success and any other value means failure. This value is stored in the log and you can use it to keep details about the error condition.
+
+3) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
+
+4) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
+
+5) New function AliPreprocessor::ProcessDCS(). If you do not need to have DCS data in all cases, you can skip the processing by implemting this function and returning kFALSE under certain conditions. E.g. if there is a certain run type.
+If you always need DCS data (like before), you do not need to implement it.
+
+6) The run type has been added to the monitoring page
+
 Revision 1.9  2007/02/28 10:42:58  acolla
 Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
 AliPreprocessor::GetRunType() function.
@@ -193,6 +231,40 @@ Bool_t AliPreprocessor::StoreReferenceData(const char* pathLevel2, const char* p
   return fShuttle->StoreReferenceData(AliCDBPath(offlineDetName, pathLevel2, pathLevel3), object,
                metaData);
 }
+    
+//______________________________________________________________________________________________
+Bool_t AliPreprocessor::StoreReferenceFile(const char* localFile, const char* gridFileName)
+{
+       //
+       // Stores a file directly (without opening it) in the reference storage in the Grid
+       //
+       // The file is stored under the following location: 
+       // <base folder of reference storage>/<DET>/<RUN#>_<gridFileName>
+       // where <gridFileName> is the second parameter given to the function
+       //
+       // The call is delegated to AliShuttleInterface
+       
+       const char* offlineDetName = AliShuttleInterface::GetOfflineDetName(GetName());
+       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)
@@ -210,12 +282,23 @@ const char* AliPreprocessor::GetFile(Int_t system, const char* id, const char* s
 TList* AliPreprocessor::GetFileSources(Int_t system, const char* id)
 {
   // Returns a list of sources in a given system that saved a file with the given id
+  // if id is not given all sources are returned
   //
   // The call is delegated to AliShuttleInterface
 
   return fShuttle->GetFileSources(system, GetName(), id);
 }
 
+//______________________________________________________________________________________________
+TList* AliPreprocessor::GetFileIDs(Int_t system, const char* source)
+{
+  // Returns a list of ids in a given system that saved a file with the given source
+  //
+  // The call is delegated to AliShuttleInterface
+
+  return fShuttle->GetFileIDs(system, GetName(), source);
+}
+
 //______________________________________________________________________________________________
 void AliPreprocessor::Log(const char* message)
 {
@@ -247,7 +330,7 @@ AliCDBEntry* AliPreprocessor::GetFromOCDB(const char* pathLevel2, const char* pa
   if (!offlineDetName) return 0;
 
   return dynamic_cast<AliCDBEntry*>
-       (fShuttle->GetFromOCDB(AliCDBPath(offlineDetName, pathLevel2, pathLevel3)));
+       (fShuttle->GetFromOCDB(GetName(), AliCDBPath(offlineDetName, pathLevel2, pathLevel3)));
 }
 
 //______________________________________________________________________________________________
@@ -257,5 +340,16 @@ const char* AliPreprocessor::GetRunType()
   //
   // The call is delegated to AliShuttleInterface
 
-  return fShuttle->GetRunType(GetName());
+  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();
+
 }