]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliPreprocessor.cxx
- Implementing functions for the GRP preprocessor to retrieve DA output files from...
[u/mrichter/AliRoot.git] / STEER / AliPreprocessor.cxx
index 7b36361b85de3ad1cc6aa2c5e963bf52bfe7f9f6..0fd756bb6f20bb7bd0edeec016f18b543c9a584e 100644 (file)
@@ -263,7 +263,7 @@ Bool_t AliPreprocessor::StoreRunMetadataFile(const char* localFile, const char*
        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);
@@ -303,13 +303,13 @@ TList* AliPreprocessor::GetFileIDs(Int_t system, const char* source)
 }
 
 //______________________________________________________________________________________________
-void AliPreprocessor::Log(const char* message)
+void AliPreprocessor::Log(const char* message, UInt_t level)
 {
   // Adds a log message to the Shuttle log of this preprocessor
   //
   // The call is delegated to AliShuttleInterface
 
-  fShuttle->Log(GetName(), message);
+  fShuttle->Log(GetName(), message, level);
 }
 
 //______________________________________________________________________________________________
@@ -357,6 +357,55 @@ Bool_t AliPreprocessor::GetHLTStatus()
 
 }
     
+//______________________________________________________________________________________________
+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();
+}
+//______________________________________________________________________________________________
+const char* AliPreprocessor::GetCTPTimeParams()
+{
+       // Returns the CTP timing parameters 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("GetCTPTimeParams - Only GRP can call this function.");
+               return 0;
+       }
+       
+       return fShuttle->GetCTPTimeParams();
+}
+//______________________________________________________________________________________________
+const char* AliPreprocessor::GetTriggerDetectorMask()
+{
+       // Returns the trigger detector mask which is read from a table in the DAQ logbook
+       // The call is delegated to AliShuttleInterface
+       // Only TRI can call this function.
+       
+       TString detName(GetName());
+       if (detName != "TRI") 
+       {
+               Log("GetTriggerDetectorMask - Only TRI can call this function.");
+               return 0;
+       }
+       
+       return fShuttle->GetTriggerDetectorMask();
+}
+
 //______________________________________________________________________________________________
 void AliPreprocessor::AddRunType(const char* runType)
 {
@@ -391,3 +440,61 @@ Bool_t AliPreprocessor::AliPreprocessor::ProcessRunType()
        Log("Run type not found. Skipping this run.");
        return kFALSE;
 }
+//______________________________________________________________________________________________
+UInt_t AliPreprocessor::GetStartTimeDCSQuery()
+{
+       // Return Start Time for the DCS query
+       //
+       // The call is delegated to AliShuttleInterface
+
+       return fShuttle->GetStartTimeDCSQuery();
+}
+//______________________________________________________________________________________________
+UInt_t AliPreprocessor::GetEndTimeDCSQuery()
+{
+       // Return End Time for the DCS query
+       //
+       // The call is delegated to AliShuttleInterface
+
+       return fShuttle->GetEndTimeDCSQuery();
+}
+
+//______________________________________________________________________________________________
+const char* AliPreprocessor::GetForeignFile(const char* detector, Int_t system, const char* id, const char* source)
+{
+       // This function retrieves a file produced from the given detector (different from the 
+       // current one) from the given system (kDAQ, kDCS, kHLT) 
+       // with the given file id
+       // and from the given source in the system.
+       // The function returnes the path to the local file.
+       //
+       // The call is delegated to AliShuttleInterface
+       // The function can be called only from the GRP preprocessor
+       
+       TString detName(GetName());
+       if (detName != "GRP") 
+       {
+               Log("GetForeignFile - Only GRP can call this function.");
+               return 0;
+       }
+       return fShuttle->GetFile(system, detector, id, source);
+}
+
+//______________________________________________________________________________________________
+TList* AliPreprocessor::GetForeignFileSources(const char* detector, Int_t system, const char* id)
+{
+       // Returns the list of sources in a given system that produced the file 
+       // with the given id for the foreign detector specified
+       //
+       // The call is delegated to AliShuttleInterface
+       // The function can be called only from the GRP preprocessor
+
+       TString detName(GetName());
+       if (detName != "GRP") 
+       {
+               Log("GetForeignFileSources - Only GRP can call this function.");
+               return 0;
+       }
+       return fShuttle->GetFileSources(system, detector, id);
+}
+