Protections for coverity: DIVIDE_BY_ZERO
[u/mrichter/AliRoot.git] / JETAN / AliJetFinder.h
1 #ifndef ALIJETFINDER_H
2 #define ALIJETFINDER_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6  
7 //---------------------------------------------------------------------
8 // Jet finder base class
9 // manages the search for jets 
10 // Authors: jgcn@mda.cinvestav.mx
11 //          andreas.morsch@cern.ch
12 //          magali.estienne@subatech.in2p3.fr
13 //---------------------------------------------------------------------
14
15 //#include <Riostream.h>
16 //#include <vector>
17
18 #include <TObject.h>
19 #include "AliAODJet.h"
20 #include "AliJetHeader.h"
21 #include "AliJetReader.h"
22 #include "AliAODJetEventBackground.h"
23
24 class TChain;
25 class TTree;
26 class AliAODEvent;
27 class AliJetReaderHeader;
28
29 class AliJetFinder : public TObject 
30 {
31  public:
32   AliJetFinder();
33   virtual ~AliJetFinder();
34
35   // Getters
36   virtual AliJetReader *GetReader() const {return fReader;}
37   virtual AliJetHeader *GetHeader() const {return fHeader;}
38   virtual AliAODJetEventBackground* GetEventBackground() const {return fAODEvBkg;}
39   // Setters
40   virtual void          SetJetReader(AliJetReader* r) {fReader=r;}
41   virtual void          SetJetHeader(AliJetHeader* h) {fHeader=h;}
42   virtual void          SetEventBackground(AliAODJetEventBackground* bkg) {fAODEvBkg = bkg;}
43   // Others
44   virtual void          AddJet(AliAODJet jet);
45   virtual void          WriteRHeaderToFile();  
46   // the following have to be implemented for each specific finder
47   virtual void          Init() {}
48   virtual void          InitTask(TChain* /*tree*/) {}
49   virtual void          Reset() {fNAODjets = 0;}
50   virtual void          FindJets() {}
51   virtual void          FindJetsC(){}
52   virtual void          WriteJHeaderToFile() const {}
53   // some methods to allow steering from the outside
54   virtual Bool_t        ProcessEvent();
55   virtual Bool_t        ProcessEvent2();
56   virtual void          ConnectTree(TTree* tree, TObject* data);
57   virtual void          ConnectAOD(const AliAODEvent* aod);
58   virtual void          ConnectAODNonStd(AliAODEvent* aod,const char* bname);
59   virtual void          WriteHeaders();
60
61  protected:
62   AliJetFinder(const AliJetFinder& rJetFinder);
63   AliJetFinder& operator = (const AliJetFinder& rhsf);
64   AliJetReader*             fReader;         //  pointer to reader
65   AliJetHeader*             fHeader;         //  pointer to header
66   TClonesArray*             fAODjets;        //! reconstructed jets
67   Int_t                     fNAODjets;       //! number of reconstructed jets
68   AliAODJetEventBackground* fAODEvBkg;       //! bkg object to be store
69   Int_t                     fDebug;          //  debug option, set through the header
70
71   ClassDef(AliJetFinder,2)
72 };
73
74 #endif