Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AlignHists.cxx File Reference

#include "Alignment/AlignHists.h"
#include "TH2.h"
#include "TFile.h"
#include "TSystem.h"
#include <vector>
#include <iostream>

Go to the source code of this file.

Functions

void add2d (TH2D *h1, TH2D *h2)


Function Documentation

void add2d TH2D *  h1,
TH2D *  h2
[static]
 

Definition at line 132 of file AlignHists.cxx.

Referenced by AlignHists::ReadHists().

00133 {
00134     int nx = h2->GetNbinsX(), ny = h2->GetNbinsY();
00135     for (int x=1; x<=nx; ++x) {
00136         for (int y=1; y<=ny; ++y) {
00137             h1->SetBinContent(x,y,
00138                               h1->GetBinContent(x,y) +
00139                               h2->GetBinContent(x,y));
00140             h1->SetEntries(h1->GetEntries()+h2->GetEntries());
00141         }
00142     }
00143 }


Generated on Mon Jun 16 14:59:00 2008 for loon by  doxygen 1.3.9.1