CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/JetReco/src/DiscretizedEnergyFlow.cc

Go to the documentation of this file.
00001 #include <cassert>
00002 #include <algorithm>
00003 
00004 #include "DataFormats/JetReco/interface/DiscretizedEnergyFlow.h"
00005 
00006 namespace reco {
00007 
00008 DiscretizedEnergyFlow::DiscretizedEnergyFlow(
00009     const double* data, const char* title,
00010     const double etaMin, const double etaMax, const double phiBin0Edge,
00011     const unsigned nEtaBins, const unsigned nPhiBins)
00012     : title_(title),
00013       etaMin_(etaMin),
00014       etaMax_(etaMax),
00015       phiBin0Edge_(phiBin0Edge),
00016       nEtaBins_(nEtaBins),
00017       nPhiBins_(nPhiBins)
00018 {
00019     assert(data);
00020     assert(title);
00021     const unsigned nbins = nEtaBins*nPhiBins;
00022     data_.resize(nbins);
00023     std::copy(data, data+nbins, data_.begin());
00024 }
00025 
00026 }