]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility for event selection in input event handler.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Dec 2009 17:44:02 +0000 (17:44 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Dec 2009 17:44:02 +0000 (17:44 +0000)
STEER/AliESDInputHandler.cxx
STEER/AliInputEventHandler.cxx
STEER/AliInputEventHandler.h
STEER/STEERBaseLinkDef.h
STEER/libSTEERBase.pkg

index 753e6f09619915f2603dd1fe97728f44a7a436b8..b6da2ddabca688959d52a930964703a3b792619c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "AliESDInputHandler.h"
 #include "AliESDEvent.h"
+#include "AliVCuts.h"
 #include "AliESD.h"
 #include "AliRunTag.h"
 #include "AliEventTag.h"
@@ -110,6 +111,11 @@ Bool_t AliESDInputHandler::BeginEvent(Long64_t entry)
   }
   
   fNewEvent = kTRUE;
+  //
+  // Event selection
+  // 
+  if (fEventCuts)
+    fIsSelected = fEventCuts->IsSelected(fEvent); 
 
   return kTRUE;
 }
index 3cd61adc9d7a5d7bad93edc64e0bf6656979d6f6..83bac6bbd106e1ec53917e49f4769b4ff7c09fe1 100644 (file)
 
 #include "AliInputEventHandler.h"
 #include "AliVEvent.h"
+#include "AliVCuts.h"
 #include "AliLog.h"
 
+
 ClassImp(AliInputEventHandler)
 
 //______________________________________________________________________________
@@ -33,7 +35,9 @@ AliInputEventHandler::AliInputEventHandler() :
     fTree(0),
     fBranches(""),
     fBranchesOn(""),
-    fNewEvent(kTRUE)
+    fNewEvent(kTRUE),
+    fEventCuts(0),
+    fIsSelected(kFALSE)
 {
   // default constructor
 }
@@ -50,7 +54,9 @@ AliInputEventHandler::AliInputEventHandler(const char* name, const char* title):
   fTree(0),
   fBranches(""),
   fBranchesOn(""),
-  fNewEvent(kTRUE)
+  fNewEvent(kTRUE),
+  fEventCuts(0),
+  fIsSelected(kFALSE)
 {
 }
 
index e551f5721de7643db7e07e66db5aa99be5d5f678..b7decb68a79b3c6b46121556978818338382d3c6 100644 (file)
 
 
 class AliVEvent;
+class AliVCuts;
 class AliRunTag;
 
+
 class AliInputEventHandler : public AliVEventHandler {
 
  public:
@@ -35,6 +37,7 @@ class AliInputEventHandler : public AliVEventHandler {
     virtual Bool_t       TerminateIO()                                {return kTRUE;}
     // Setters
     virtual void         SetInputTree(TTree* tree)                    {fTree = tree;}
+    virtual void         SetEventSelection(AliVCuts* cuts)            {fEventCuts = cuts;}
     //
     void SetInactiveBranches(const char* branches) {fBranches   = branches;}
     void SetActiveBranches  (const char* branches) {fBranchesOn = branches;}
@@ -46,6 +49,8 @@ class AliInputEventHandler : public AliVEventHandler {
     virtual Long64_t     GetReadEntry()    const;
     virtual Bool_t       NewEvent()
        {Bool_t ne = fNewEvent; fNewEvent = kFALSE; return ne;}
+    virtual Bool_t       IsEventSelected() 
+        {return fIsSelected;}
  protected:
     void SwitchOffBranches() const;
     void SwitchOnBranches()  const;
@@ -57,7 +62,9 @@ class AliInputEventHandler : public AliVEventHandler {
     TString         fBranches;     //  List of branches to be switched off (separated by space)
     TString         fBranchesOn;   //  List of branches to be switched on  (separated by space)
     Bool_t          fNewEvent;     //  New event flag 
-    ClassDef(AliInputEventHandler, 2);
+    AliVCuts*       fEventCuts;    //  Cuts on the event level
+    Bool_t          fIsSelected;   //  Selection result
+    ClassDef(AliInputEventHandler, 3);
 };
 
 #endif
index f2a9a7ab4f53a54e9b29619c6b0068ef7e4ef95a..9cf10ee5cfecd8df653a6f6a9e134d3fed7858e0 100644 (file)
@@ -17,6 +17,7 @@
 #pragma link C++ class AliVHeader+;
 #pragma link C++ class AliVEventHandler+;
 #pragma link C++ class AliVEventPool+;
+#pragma link C++ class AliVCuts+;
 
 
 #pragma link C++ class AliMixedEvent+;
index 427ef069ae8878144bfd18cc105f8149281d6be7..e491261d83ae75e776d3a02aeb6fd989ba351214 100644 (file)
@@ -8,6 +8,7 @@ SRCS = AliVParticle.cxx \
        AliVHeader.cxx \
        AliVEventHandler.cxx \
        AliVEventPool.cxx \
+       AliVCuts.cxx \
        AliPID.cxx AliLog.cxx \
        AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx \
        AliEventTagCuts.cxx AliRunTagCuts.cxx \