#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 "km3net-dataformat/online/JDAQHeader.hh"
#include "JROOT/JRootFileReader.hh"
#include "JROOT/JRootFileWriter.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) | 
|   | 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Author
 - mdejong Auxiliary program to merge time-over-threshold data. 
 
Definition at line 32 of file JMergeCalibrateToT.cc.
   36   using namespace KM3NETDAQ;
 
   44     JParser<> zap(
"Auxiliary program to merge time-over-threshold data.");
 
   46     zap[
'f'] = 
make_field(inputFile,         
"input file (output from JCalibrateToT).");
 
   52   catch(
const exception &error) {
 
   53     FATAL(error.what() << endl);
 
   57   gErrorIgnoreLevel = kError;
 
   66     DEBUG(
"Processing " << *
i << endl) ;
 
   68     TFile 
in(
i->c_str(), 
"read");
 
   70     TIter iter(
in.GetListOfKeys());
 
   72     for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
 
   74       if (TString(key->GetName()).EndsWith(
_2SToT)) {
 
   76         TH2* h2 = 
dynamic_cast<TH2*
>(key->ReadObj());
 
   78         map_type::iterator p = zmap.find(h2->GetName());
 
   80         if (p == zmap.end()) {
 
   82           DEBUG(
"Clone " << h2->GetName() << endl);
 
   84           p = zmap.insert(make_pair(h2->GetName(), (TH2*) h2->Clone())).first;
 
   88           DEBUG(
"Add   " << h2->GetName() << endl);
 
   95     for (map_type::iterator 
i = zmap.begin(); 
i != zmap.end(); ++
i) {
 
   96       i->second->SetDirectory(0);
 
  106   for (map_type::iterator 
i = zmap.begin(); 
i != zmap.end(); ++
i) {
 
  108     if (
i->first.EndsWith(
_2SToT)) {
 
  110       TH2D* h2s = (TH2D*) 
i->second;
 
Utility class to parse command line options. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
void copy(const Head &from, JHead &to)
Copy header from from to to. 
 
static const char *const _2SToT
Histogram naming. 
 
std::map< int, range_type > map_type
 
#define DEBUG(A)
Message macros.