Updating the AliAnalysisFemtoTask to work with
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleTrigger.h
index 7d88b6c1e6b7d7d975fdf01bdb07bd82316cadb2..827f2104c83581b5532845b25e5fd9f9170bc094 100644 (file)
@@ -9,6 +9,7 @@
 //
 // This class is to deal with DAQ LogBook and DAQ end run notification.
 // It executes AliShuttle for retrieval of conditions data.
+// For more info see AliShuttleTrigger.cxx
 //
 
 #include <TObject.h>
@@ -17,7 +18,6 @@
 #include <TCondition.h>
 
 
-class AliCDBStorage;
 class AliShuttle;
 class AliShuttleConfig;
 
@@ -26,66 +26,54 @@ class DATENotifier;
 
 class TerminateSignalHandler: public TSignalHandler {
        
-       AliShuttleTrigger* fTrigger;
 public:
+       TerminateSignalHandler(): TSignalHandler((ESignals) 0,0), fTrigger(0) { }
        TerminateSignalHandler(AliShuttleTrigger* trigger, ESignals signal):
-               TSignalHandler(signal, kFALSE), fTrigger(trigger) {}
+       TSignalHandler(signal, kFALSE), fTrigger(trigger) {}
 
+       virtual ~TerminateSignalHandler() { }
        virtual Bool_t Notify();
 
+private:
+       TerminateSignalHandler(const TerminateSignalHandler& other);
+       TerminateSignalHandler& operator= (const TerminateSignalHandler& other);
+  
+       AliShuttleTrigger* fTrigger;  // pointer to the current AliShuttleTrigger
+
        ClassDef(TerminateSignalHandler, 0)
 };
 
 class AliShuttleTrigger: public TObject {
+
 public:
-       AliShuttleTrigger(const AliShuttleConfig* config, UInt_t timeout = 5000, Int_t retries = 5);
+       AliShuttleTrigger(const AliShuttleConfig* config);
        ~AliShuttleTrigger();
 
        AliShuttle* GetShuttle() {return fShuttle;}
 
-       Bool_t Collect(Int_t run);
-       Bool_t CollectNew();
-       Bool_t CollectAll();
-       
+       Bool_t Collect(Int_t run = -1);
+
        virtual Bool_t Notify();
        void Terminate();
 
        void Run();
 
 private:
-
-       class DATEEntry: public TObject {
-               Int_t fRun;
-               UInt_t fStartTime;
-               UInt_t fEndTime;
-       public:
-               DATEEntry(Int_t run, UInt_t startTime, UInt_t endTime):
-                       fRun(run), fStartTime(startTime), fEndTime(endTime) {}
-
-               Int_t GetRun() {return fRun;}
-               UInt_t GetStartTime() {return fStartTime;}
-               UInt_t GetEndTime() {return fEndTime;}
-
-               ClassDef(DATEEntry, 0)
-       };
-
-       Bool_t RetrieveDATEEntries(const char* whereClause, TObjArray& entries,
-                       Int_t& lastRun);
-       Bool_t RetrieveConditionsData(const TObjArray& dateEntries);
+       AliShuttleTrigger(const AliShuttleTrigger& other);
+       AliShuttleTrigger& operator= (const AliShuttleTrigger& other);
 
        const AliShuttleConfig* fConfig;
-       //AliCDBStorage* fLocalStorage;
 
-       AliShuttle* fShuttle;
+       AliShuttle* fShuttle;           // Pointer to the actual Shuttle instance
 
-       Bool_t fNotified;
-       Bool_t fTerminate;
+       Bool_t fNotified;               // Notified flag
+       Bool_t fTerminate;              // Terminate flag
 
-       TMutex fMutex;
-       TCondition fCondition;
+       TMutex fMutex;                  // Mutex
+       TCondition fCondition;          // Condition 
 
-       TerminateSignalHandler fQuitSignalHandler;
-       TerminateSignalHandler fInterruptSignalHandler;
+       TerminateSignalHandler* fQuitSignalHandler;             // Quit signal
+       TerminateSignalHandler* fInterruptSignalHandler;        // Interrupt signal
 
 
        ClassDef(AliShuttleTrigger, 0)