]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Interface for setting up custom monitoring lib policy (Requested by Jens).
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 23 Oct 2011 11:52:54 +0000 (11:52 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 23 Oct 2011 11:52:54 +0000 (11:52 +0000)
RAW/AliRawReaderDateOnline.cxx
RAW/AliRawReaderDateOnline.h

index 71d42bb9e2261b48add75ef33d5bfe81ec9a4f0e..531da7824b62181088f3335a57d1ed4a26245644 100644 (file)
@@ -40,12 +40,13 @@ ClassImp(AliRawReaderDateOnline)
 
 AliRawReaderDateOnline::AliRawReaderDateOnline(
 #ifdef ALI_DATE
-                                  const char* filename
+                                    const char* filename
 #else
-                                  const char* /* filename */
+                                    const char* /* filename */
 #endif
-                                  ) :
+                                  , const Char_t** customTable) :
   AliRawReaderDate((void*)NULL),
+  fTable(customTable),
   fStop(kFALSE)
 {
 
@@ -77,11 +78,21 @@ AliRawReaderDateOnline::AliRawReaderDateOnline(
   monitorSetNowait();
   monitorSetNoWaitNetworkTimeout(1000);
 
-  const Char_t* table[]  = {"ALL", "few", "*", "*",
-                            "EOR", "yes","*", "*",
-                            NULL, NULL, NULL, NULL};
-  monitorDeclareTableExtended(const_cast<char**>(table));
-
+  if (!fTable) {
+    const Char_t* table[]  = {"ALL", "few", "*", "*",
+                             "EOR", "yes","*", "*",
+                             NULL, NULL, NULL, NULL};
+    monitorDeclareTableExtended(const_cast<char**>(table));
+  }
+  else {
+    AliInfo("Custom monitoring table:");
+    Int_t index = 0;
+    while (fTable[index] != NULL) {
+      AliInfo(Form("%s %s %s %s",fTable[index],fTable[index+1],fTable[index+2],fTable[index+3]));
+      index += 4;
+    }
+    monitorDeclareTableExtended(const_cast<char**>(fTable));
+  }
   // install SIGUSR1 handler to allow clean end-of-events loop
   gSystem->AddSignalHandler(new AliRawReaderDateIntHandler(this));
 
index 23042b30dc61619775d9169b8cdda8c75ff64c9b..6ce1594a1635ecaab530cd26c89d6300c6c82423 100644 (file)
@@ -24,7 +24,7 @@
 
 class AliRawReaderDateOnline: public AliRawReaderDate {
   public :
-    AliRawReaderDateOnline(const char* fileName);
+    AliRawReaderDateOnline(const char* fileName, const Char_t** customTable = NULL);
     virtual ~AliRawReaderDateOnline();
 
     virtual Bool_t   NextEvent();
@@ -64,6 +64,7 @@ class AliRawReaderDateOnline: public AliRawReaderDate {
     AliRawReaderDateOnline(const AliRawReaderDateOnline& rawReader);
     AliRawReaderDateOnline& operator = (const AliRawReaderDateOnline& rawReader);
 
+    const Char_t**   fTable;// custom monitoring table
     Bool_t           fStop; // raw-reader signaled to stop
 
     ClassDef(AliRawReaderDateOnline, 0) // class for reading DATE raw data from shared memory