#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TKey.h"
#include "TString.h"
#include "TMath.h"
#include "JROOT/JRootFileReader.hh"
#include "JSupport/JMeta.hh"
#include "JCalibrate/JCalibrateToT.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Author
 - mdejong Auxiliary program to merge time-over-threshold data. 
 
Definition at line 28 of file JMergeCalibrateToT.cc.
   39     JParser<> zap(
"Auxiliary program to merge time-over-threshold data.");
 
   41     zap[
'f'] = 
make_field(inputFile,         
"input file (output from JCalibrateToT).");
 
   47   catch(
const exception &error) {
 
   48     FATAL(error.what() << endl);
 
   59     DEBUG(
"Processing " << *i << endl) ;
 
   61     TFile in(i->c_str(), 
"read");
 
   63     TIter iter(in.GetListOfKeys());
 
   65     for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
 
   67       TH2* h2 = dynamic_cast<TH2*>(key->ReadObj());
 
   71         map_type::iterator p = zmap.find(h2->GetName());
 
   73         if (p == zmap.end()) {
 
   75           DEBUG(
"Clone " << h2->GetName() << endl);
 
   77           p = zmap.insert(make_pair(h2->GetName(), (TH2*) h2->Clone())).first;
 
   81           DEBUG(
"Add   " << h2->GetName() << endl);
 
   88     for (map_type::iterator i = zmap.begin(); i != zmap.end(); ++i) {
 
   89       i->second->SetDirectory(0);
 
   99   for (map_type::iterator i = zmap.begin(); i != zmap.end(); ++i) {
 
  101     if (i->first.EndsWith(
_2SToT)) {
 
  103       TH2D* h2s = (TH2D*) i->second;