Implementing functionality so that the detectors can send
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 20 Sep 2010 13:44:40 +0000 (13:44 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 20 Sep 2010 13:44:40 +0000 (13:44 +0000)
an information to MonALISA:

AliPreprocessor::SendToML(const char*);

The information will be tagged with Id $DET_RunCondition
and it should be sent at the beginning of the processing
of a run as a string.

SHUTTLE/AliShuttle.cxx
SHUTTLE/TestShuttle/AliTestShuttle.cxx
SHUTTLE/TestShuttle/AliTestShuttle.h
STEER/AliPreprocessor.cxx
STEER/AliPreprocessor.h
STEER/AliShuttleInterface.h

index b9dc7b5..c4636b0 100644 (file)
@@ -3735,4 +3735,22 @@ UInt_t AliShuttle::GetEndTimeDCSQuery()
 
        return GetCurrentEndTime()+fConfig->GetDCSQueryOffset();
 }
+//______________________________________________________________________________________________
+void AliShuttle::SendMLFromDet(const char* value)
+{
+       // 
+       // Sending an information coming from the current detector to ML
+       //
+       
+       TMonaLisaText  mlText(Form("%s_RunCondition", fCurrentDetector.Data()), value);
+
+       TList mlList;
+       mlList.Add(&mlText);
+
+       TString mlID;
+       mlID.Form("%d", GetCurrentRun());
+       fMonaLisa->SendParameters(&mlList, mlID);
+
+       return;
+}
 
index 7718f95..a47608c 100644 (file)
@@ -701,3 +701,22 @@ UInt_t AliTestShuttle::GetEndTimeDCSQuery()
 
        return fEndTime+fDCSQueryOffset;
 }
+//______________________________________________________________________________________________
+void AliTestShuttle::SendMLFromDet(const char* value)
+{
+       // 
+       // Sending an information coming from the current detector to ML
+       //
+       
+       TMonaLisaText  mlText(Form("%s_RunCondition", fCurrentDetector.Data()), value);
+
+       TList mlList;
+       mlList.Add(&mlText);
+
+       TString mlID;
+       mlID.Form("%d", GetCurrentRun());
+       fMonaLisa->SendParameters(&mlList, mlID);
+
+       return;
+}
+
index 53e8ffb..12681b6 100644 (file)
@@ -69,6 +69,8 @@ class AliTestShuttle : public AliShuttleInterface
     static void SetShuttleTempDir (const char* tmpDir);
     static void SetShuttleLogDir (const char* logDir);
 
+    virtual void SendMLFromDet(const char* value);
+
   protected:
 
     Int_t fRun;             // run that is simulated with the AliTestShuttle
index 0ba065b..c6ccdda 100644 (file)
@@ -509,3 +509,12 @@ TList* AliPreprocessor::GetForeignFileSources(const char* detector, Int_t system
        return fShuttle->GetFileSources(system, detector, id);
 }
 
+//______________________________________________________________________________________________
+void AliPreprocessor::SendToML(const char* value)
+{
+       //
+       // Sending to ML the information coming from the current detector
+       //
+
+       return fShuttle->SendMLFromDet(value);
+}
index dfecb8b..994d8b0 100644 (file)
@@ -64,6 +64,8 @@ class AliPreprocessor : public TNamed
     
     void AddRunType(const char* runType);
 
+    void SendToML(const char*);
+
     Int_t fRun;         // current run
     UInt_t fStartTime;  // starttime of current run
     UInt_t fEndTime;    // endtime of current run
index ddb298d..cacd9a3 100644 (file)
@@ -66,6 +66,8 @@ class AliShuttleInterface : public TObject
     static const char* GetShuttleLogDir() {return fgkShuttleLogDir.Data();}
     static const char* GetShuttleTempDir() {return fgkShuttleTempDir.Data();}
 
+    virtual void SendMLFromDet(const char* value) = 0;
+
   protected:
 
     static const char* fkSystemNames[3];               // names of the systems providing data to the shuttle