Public Member Functions | Protected Attributes | List of all members
caldp::AttenHistsMap Class Reference

AttenHists for many channels. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-25/CalibrationDataProducts/AttenHists.h"

Public Member Functions

AttenHistsGetHists (const geo::OfflineChan &c)
 
AttenHistsGetHists (int plane, int cell)
 
std::map< int, std::vector< TH2F * > > GetAllHistsByPlane ()
 Intended for writing out/drawing all the histograms. More...
 
AttenHistsMapoperator+= (const AttenHistsMap &rhs)
 
void Clear ()
 

Protected Attributes

std::map< geo::OfflineChan, AttenHistsfMap
 

Detailed Description

AttenHists for many channels.

Definition at line 77 of file AttenHists.h.

Member Function Documentation

void caldp::AttenHistsMap::Clear ( )
inline

Definition at line 115 of file AttenHists.h.

Referenced by calib::CosmicCalib::endSubRun().

116  {
117  fMap.clear();
118  }
std::map< geo::OfflineChan, AttenHists > fMap
Definition: AttenHists.h:121
std::map<int, std::vector<TH2F*> > caldp::AttenHistsMap::GetAllHistsByPlane ( )
inline

Intended for writing out/drawing all the histograms.

Definition at line 92 of file AttenHists.h.

References it, NDAPDHVSetting::plane, runNovaSAM::ret, caldp::AttenHists::WPE, caldp::AttenHists::WPE_corr, caldp::AttenHists::WPE_corr_traj, caldp::AttenHists::WPE_corr_xy, caldp::AttenHists::WPE_corr_xy_truth, and caldp::AttenHists::WPE_corr_z.

Referenced by calib::CosmicCalib::endJob(), and calib::MakeAttenuationProfiles::endJob().

93  {
94  std::map<int, std::vector<TH2F*>> ret;
95  for(auto& it: fMap){
96  const int plane = it.first.Plane();
97  const AttenHists& hs = it.second;
98 
99  ret[plane].push_back(hs.WPE);
100  ret[plane].push_back(hs.WPE_corr);
101  ret[plane].push_back(hs.WPE_corr_xy);
102  ret[plane].push_back(hs.WPE_corr_z);
103  ret[plane].push_back(hs.WPE_corr_traj);
104  ret[plane].push_back(hs.WPE_corr_xy_truth);
105  }
106  return ret;
107  }
set< int >::iterator it
std::map< geo::OfflineChan, AttenHists > fMap
Definition: AttenHists.h:121
AttenHists& caldp::AttenHistsMap::GetHists ( const geo::OfflineChan c)
inline
AttenHists& caldp::AttenHistsMap::GetHists ( int  plane,
int  cell 
)
inline

Definition at line 86 of file AttenHists.h.

87  {
88  return fMap[geo::OfflineChan(plane, cell)];
89  }
std::map< geo::OfflineChan, AttenHists > fMap
Definition: AttenHists.h:121
A (plane, cell) pair.
Definition: OfflineChan.h:17
AttenHistsMap& caldp::AttenHistsMap::operator+= ( const AttenHistsMap rhs)
inline

Definition at line 109 of file AttenHists.h.

References fMap, and it.

110  {
111  for(auto& it: rhs.fMap) fMap[it.first] += it.second;
112  return *this;
113  }
set< int >::iterator it
std::map< geo::OfflineChan, AttenHists > fMap
Definition: AttenHists.h:121

Member Data Documentation

std::map<geo::OfflineChan, AttenHists> caldp::AttenHistsMap::fMap
protected

Definition at line 121 of file AttenHists.h.

Referenced by operator+=().


The documentation for this class was generated from the following file: