EntryMgr

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
//   COCOA class header file
//Id:  EntryMgr.h
//CAT: Model
//
//   Manages the parameters of the input file (variables that are given a value to be reused in the file)
//
//   History: v1.0  11/11/01   Pedro Arce
#ifndef EntryMgr_h
#define EntryMgr_h

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include <vector>
class EntryData;

class EntryMgr {
private:
  EntryMgr() {}

public:
  static EntryMgr* getInstance();
  ALIbool readEntryFromReportOut(const std::vector<ALIstring>& wl);

  ALIdouble getDimOutLengthVal() const { return dimOutLengthVal; }
  ALIdouble getDimOutLengthSig() const { return dimOutLengthSig; }
  ALIdouble getDimOutAngleVal() const { return dimOutAngleVal; }
  ALIdouble getDimOutAngleSig() const { return dimOutAngleSig; }

  EntryData* findEntryByShortName(const ALIstring& optoName, const ALIstring& entryName = "");
  EntryData* findEntryByLongName(const ALIstring& optoName, const ALIstring& entryName = "");
  EntryData* findEntryByName(const ALIstring& optoName, const ALIstring& entryName = "") {
    return findEntryByLongName(optoName, entryName);
  }

  ALIstring extractShortName(const ALIstring& name);

  ALIint numberOfEntries() { return theEntryData.size(); }
  std::vector<EntryData*> getEntryData() const { return theEntryData; }

  void clearEntryData() { theEntryData.clear(); }

private:
  EntryData* findEntry(const std::vector<ALIstring>& wl);

private:
  static EntryMgr* theInstance;

  ALIdouble dimOutLengthVal, dimOutLengthSig, dimOutAngleVal, dimOutAngleSig;
  std::vector<EntryData*> theEntryData;
};

#endif