StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTowerEnergyListVariation.cxx
1 // $Id: StjTowerEnergyListVariation.cxx,v 1.1 2008/11/27 07:35:31 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTowerEnergyListVariation.h"
4 
6 
7 using namespace std;
8 
9 StjTowerEnergyList StjTowerEnergyListVariation::operator()(const StjTowerEnergyList &energyList)
10 {
11  StjTowerEnergyList ret;
12 
13  for(StjTowerEnergyList::const_iterator it = energyList.begin(); it != energyList.end(); ++it) {
14  ret.push_back(vary(*it));
15  }
16 
17  return ret;
18 }
19 
20 
21 StjTowerEnergy StjTowerEnergyListVariation::vary(const StjTowerEnergy& energyDeposit)
22 {
23  StjTowerEnergy ret(energyDeposit);
24 
25  for(VarList::iterator var = _varList.begin(); var != _varList.end(); ++var){
26  ret = (**var)(ret);
27  }
28 
29  return ret;
30 }