--- /dev/null
+#include "AliAnalysisEtSelectionContainer.h"
+#include "TNamed.h"
+
+ClassImp(AliAnalysisEtSelectionContainer)
+
+AliAnalysisEtSelectionContainer::AliAnalysisEtSelectionContainer() : TNamed("name", "name")
+,fPhysicsSelectionMap()
+{
+
+}
+
+
+AliAnalysisEtSelectionContainer::AliAnalysisEtSelectionContainer(const char *name): TNamed(name, name)
+,fPhysicsSelectionMap()
+{
+
+}
+
+AliAnalysisEtSelectionContainer::AliAnalysisEtSelectionContainer(const AliAnalysisEtSelectionContainer& other):
+ TNamed(other)
+ ,fPhysicsSelectionMap(other.GetPhysicsSelectionMap())
+{
+ // Copy constructor
+}
+
+AliAnalysisEtSelectionContainer& AliAnalysisEtSelectionContainer::operator=(const AliAnalysisEtSelectionContainer& other)
+{
+ // Assignment operator
+ if(this != &other)
+ {
+ fName = other.GetName();
+ fPhysicsSelectionMap = other.GetPhysicsSelectionMap();
+ }
+ return *this;
+}
+
+AliAnalysisEtSelectionContainer::~AliAnalysisEtSelectionContainer()
+{
+ //Destructor
+}
--- /dev/null
+#ifndef ALIANALYSISETSELECTIONCONTAINER_H
+#define ALIANALYSISETSELECTIONCONTAINER_H
+
+#include "TNamed.h"
+#include <map>
+
+
+class AliPhysicsSelection;
+
+class AliAnalysisEtSelectionContainer : public TNamed
+{
+public:
+
+ /** Constructor */
+ AliAnalysisEtSelectionContainer();
+
+ /** Constructor */
+ AliAnalysisEtSelectionContainer(const char *name);
+
+ /** Destructor */
+ virtual ~AliAnalysisEtSelectionContainer();
+
+ /** Return the physics selection for the current run */
+ AliPhysicsSelection* GetPhysicsSelection(Int_t runNumber) { return fPhysicsSelectionMap[runNumber]; }
+
+ /** Return the physics selection for the current run */
+ AliPhysicsSelection* GetDefaultPhysicsSelection() { return fPhysicsSelectionMap[0]; }
+
+ /** Get the map */
+ std::map<int, AliPhysicsSelection*> GetPhysicsSelectionMap() const { return fPhysicsSelectionMap; }
+
+ /** Add the default selection to the map */
+ void AddDefaultSelection(AliPhysicsSelection *selection) { fPhysicsSelectionMap.insert(std::pair<int, AliPhysicsSelection*>(0, selection)); }
+
+ /** Add a physics selection to the map */
+ void AddPhysicsSelection(AliPhysicsSelection *selection, Int_t runNumber) { fPhysicsSelectionMap.insert(std::pair<int, AliPhysicsSelection*>(runNumber, selection)); }
+
+ /** Copy constructor */
+ AliAnalysisEtSelectionContainer(const AliAnalysisEtSelectionContainer& other);
+
+ /** Assignment operator */
+ AliAnalysisEtSelectionContainer& operator=(const AliAnalysisEtSelectionContainer& other);
+
+private:
+
+ std::map<int, AliPhysicsSelection*> fPhysicsSelectionMap; // The physics selection map
+
+ ClassDef(AliAnalysisEtSelectionContainer, 1);
+
+};
+
+#endif // ALIANALYSISETSELECTIONCONTAINER_H
--- /dev/null
+#include "AliAnalysisEtSelectionHandler.h"
+#include "AliAnalysisEtSelectionContainer.h"
+#include "AliPhysicsSelection.h"
+#include "TFile.h"
+#include <iostream>
+
+ClassImp(AliAnalysisEtSelectionHandler);
+
+
+AliAnalysisEtSelectionHandler::AliAnalysisEtSelectionHandler() :
+fSelections(0)
+{
+
+}
+
+AliAnalysisEtSelectionHandler::AliAnalysisEtSelectionHandler(const char* name) :
+fSelections(0)
+{
+ // Constructor
+ TFile *mapFile = TFile::Open(name);
+
+ //mapFile->Open(name);
+ std::cout << name << " " << mapFile << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
+ mapFile->ls();
+ fSelections = dynamic_cast<AliAnalysisEtSelectionContainer*>(mapFile->Get("physicsSelections"));
+
+}
+
+AliAnalysisEtSelectionHandler::~AliAnalysisEtSelectionHandler()
+{
+ // Destructor
+}
+
+AliAnalysisEtSelectionHandler::AliAnalysisEtSelectionHandler(const AliAnalysisEtSelectionHandler& other): TObject(other)
+,fSelections(other.GetSelectionContainer())
+{
+ // Copy constructor
+}
+
+AliAnalysisEtSelectionHandler& AliAnalysisEtSelectionHandler::operator=(const AliAnalysisEtSelectionHandler& /*other*/)
+{
+ // Assignment operator, not properly implemented
+ return *this;
+}
--- /dev/null
+#ifndef ALIANALYSISETSELECTIONHANDLER_H
+#define ALIANALYSISETSELECTIONHANDLER_H
+
+#include "TObject.h"
+#include "AliAnalysisEtSelectionContainer.h"
+
+class AliPhysicsSelection;
+
+class AliAnalysisEtSelectionHandler : public TObject
+{
+
+public:
+ AliAnalysisEtSelectionHandler();
+
+ AliAnalysisEtSelectionHandler(const char *name);
+
+ virtual ~AliAnalysisEtSelectionHandler();
+
+ AliPhysicsSelection* GetPhysicsSelection(Int_t runNumber) { return fSelections->GetPhysicsSelection(runNumber); }
+
+ AliPhysicsSelection* GetDefaultPhysicsSelection() { return fSelections->GetDefaultPhysicsSelection(); }
+
+ AliAnalysisEtSelectionContainer* GetSelectionContainer() const { return fSelections; }
+
+ AliAnalysisEtSelectionHandler(const AliAnalysisEtSelectionHandler& other);
+
+ AliAnalysisEtSelectionHandler& operator=(const AliAnalysisEtSelectionHandler& other);
+
+ private:
+
+ AliAnalysisEtSelectionContainer *fSelections; //! The selection container
+
+
+
+
+ ClassDef(AliAnalysisEtSelectionHandler, 1);
+
+
+};
+
+#endif // ALIANALYSISETSELECTIONHANDLER_H