All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
ana::SBNOsc::HistoList Class Reference

#include <HistoList.h>

Inheritance diagram for ana::SBNOsc::HistoList:
ana::SBNOsc::CosmicHistos ana::SBNOsc::CRTHistos ana::SBNOsc::Histograms ana::SBNOsc::InteractionHistos ana::SBNOsc::TrackHistos ana::SBNOsc::TrackProfiles

Public Member Functions

void Scale (double scale)
 
void Add (const HistoList &other)
 
void Write ()
 
void StoreHisto (TH1 *histo)
 
void Merge (const HistoList &merge)
 

Public Attributes

std::vector< TH1 * > fAllHistos
 
std::vector< TDirectory * > fLocations
 

Detailed Description

Definition at line 12 of file HistoList.h.

Member Function Documentation

void ana::SBNOsc::HistoList::Add ( const HistoList other)

Add another set of histograms to this one

Parameters
otherThe set of histograms to add

Definition at line 25 of file HistoList.cc.

25  {
26  for (unsigned i = 0; i < fAllHistos.size(); i++) {
27  fAllHistos[i]->Add(other.fAllHistos[i]);
28  }
29 }
std::vector< TH1 * > fAllHistos
Definition: HistoList.h:34
void ana::SBNOsc::HistoList::Merge ( const HistoList merge)

Definition at line 31 of file HistoList.cc.

31  {
32  for (unsigned i = 0; i < merge.fAllHistos.size(); i++) {
33  fAllHistos.push_back(merge.fAllHistos[i]);
34  fLocations.push_back(merge.fLocations[i]);
35  }
36 }
std::vector< TH1 * > fAllHistos
Definition: HistoList.h:34
std::vector< TDirectory * > fLocations
Definition: HistoList.h:35
void ana::SBNOsc::HistoList::Scale ( double  scale)

Scale all histograms by a set value

Parameters
scaleThe scaing value

Definition at line 16 of file HistoList.cc.

16  {
17  for (TH1 *hist: fAllHistos) hist->Scale(scale);
18 }
std::vector< TH1 * > fAllHistos
Definition: HistoList.h:34
void ana::SBNOsc::HistoList::StoreHisto ( TH1 *  histo)

Definition at line 20 of file HistoList.cc.

20  {
21  fAllHistos.push_back(hist);
22  fLocations.push_back(gDirectory);
23 }
std::vector< TH1 * > fAllHistos
Definition: HistoList.h:34
std::vector< TDirectory * > fLocations
Definition: HistoList.h:35
void ana::SBNOsc::HistoList::Write ( )

Write this set of histograms to disk

Definition at line 9 of file HistoList.cc.

9  {
10  for (unsigned i = 0; i < fAllHistos.size(); i++) {
11  fLocations[i]->cd();
12  fAllHistos[i]->Write();
13  }
14 }
std::vector< TH1 * > fAllHistos
Definition: HistoList.h:34
std::vector< TDirectory * > fLocations
Definition: HistoList.h:35

Member Data Documentation

std::vector<TH1 *> ana::SBNOsc::HistoList::fAllHistos

Definition at line 34 of file HistoList.h.

std::vector<TDirectory *> ana::SBNOsc::HistoList::fLocations

Definition at line 35 of file HistoList.h.


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