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
// -*- C++ -*-
//
// Package:     CommonTools/Utils
// Class  :     reco::formula::EvaluatorBase
//
// Implementation:
//     [Notes on implementation]
//
// Original Author:  Christopher Jones
//         Created:  Wed, 23 Sep 2015 16:26:03 GMT
//

// system include files
#include <algorithm>

// user include files
#include "CommonTools/Utils/src/formulaEvaluatorBase.h"

//
// constants, enums and typedefs
//

//
// static data member definitions
//

//
// constructors and destructor
//
reco::formula::EvaluatorBase::EvaluatorBase() : m_precedence(static_cast<unsigned int>(Precedence::kFunction)) {}

reco::formula::EvaluatorBase::EvaluatorBase(Precedence iPrec) : m_precedence(static_cast<unsigned int>(iPrec)) {}

reco::formula::EvaluatorBase::~EvaluatorBase() {}

std::vector<std::string> reco::formula::shiftAST(std::vector<std::string> child) {
  for (auto& c : child) {
    c.insert(c.begin(), '.');
  }
  return child;
}