#include <string>
#include <iostream>
#include <filesystem>
#include "TObject.h"
#include "TFile.h"
#include "TError.h"
#include "TKey.h"
#include "TClass.h"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | Example application to make ROOT project.  
  | 
|   | 
◆ main()
      
        
          | int main  | 
          ( | 
          int |           argc,  | 
        
        
           | 
           | 
          char ** |           argv ) | 
        
      
 
Example application to make ROOT project. 
Definition at line 19 of file JRootMakeProject.cc.
   20{
   22 
   23  string    inputFile;
   24  string    path;
   26 
   27  try {
   28 
   29    JParser<> zap(
"Example application to make ROOT project.");
 
   30    
   31    zap[
'f'] = 
make_field(inputFile,  
"input file with streamer information");
 
   32    zap[
'P'] = 
make_field(path,       
"output directory for library")          = 
"./";
 
   34 
   35    zap(argc, argv);
   36  }
   37  catch(const exception &error) {
   38    FATAL(error.what() << endl);
 
   39  }
   40 
   41  gErrorIgnoreLevel = kError;
   42 
   43 
   44  TFile* in = TFile::Open(inputFile.c_str());
   45 
   46  if (in == NULL || !in->IsOpen()) {
   47    FATAL(
"Error opening file " << inputFile << endl);
 
   48  }
   49 
   50  path.append("/ROOT");
   51  
   52  in->MakeProject(path.c_str(), "*", "recreate++");
   53 
   54  in->Close();
   55}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.