]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/totEt/AliAnalysisEtSelectionContainer.h
- adding classes to take care of the loading of the correct physics
[u/mrichter/AliRoot.git] / PWG4 / totEt / AliAnalysisEtSelectionContainer.h
1 #ifndef ALIANALYSISETSELECTIONCONTAINER_H
2 #define ALIANALYSISETSELECTIONCONTAINER_H
3
4 #include "TNamed.h"
5 #include <map>
6
7
8 class AliPhysicsSelection;
9
10 class AliAnalysisEtSelectionContainer : public TNamed
11 {
12 public:
13   
14   /** Constructor */
15   AliAnalysisEtSelectionContainer();
16
17   /** Constructor */
18   AliAnalysisEtSelectionContainer(const char *name);
19   
20   /** Destructor */
21   virtual ~AliAnalysisEtSelectionContainer();
22   
23   /** Return the physics selection for the current run */
24   AliPhysicsSelection* GetPhysicsSelection(Int_t runNumber) { return fPhysicsSelectionMap[runNumber]; }
25   
26   /** Return the physics selection for the current run */
27   AliPhysicsSelection* GetDefaultPhysicsSelection() { return fPhysicsSelectionMap[0]; }
28   
29   /** Get the map */
30   std::map<int, AliPhysicsSelection*> GetPhysicsSelectionMap() const { return fPhysicsSelectionMap; }
31   
32   /** Add the default selection to the map */
33   void AddDefaultSelection(AliPhysicsSelection *selection) { fPhysicsSelectionMap.insert(std::pair<int, AliPhysicsSelection*>(0, selection)); }
34   
35   /** Add a physics selection to the map */
36   void AddPhysicsSelection(AliPhysicsSelection *selection, Int_t runNumber) { fPhysicsSelectionMap.insert(std::pair<int, AliPhysicsSelection*>(runNumber, selection)); }
37   
38   /** Copy constructor */
39   AliAnalysisEtSelectionContainer(const AliAnalysisEtSelectionContainer& other);
40   
41   /** Assignment operator */
42   AliAnalysisEtSelectionContainer& operator=(const AliAnalysisEtSelectionContainer& other);
43   
44 private:
45   
46   std::map<int, AliPhysicsSelection*> fPhysicsSelectionMap; // The physics selection map
47
48   ClassDef(AliAnalysisEtSelectionContainer, 1);
49   
50 };
51
52 #endif // ALIANALYSISETSELECTIONCONTAINER_H