Commit 033dd2ab authored by Emilio Depero's avatar Emilio Depero
Browse files

simple script to check corruption of root files

parent 32d09cc3
#include <iostream>
#include <string>
using namespace std;
#include "TFile.h"
int main(int argc, char *argv[]){
if(argc != 2)
{
std::cout << "Usage: ./map_multiplex [inputRootFile]" << std::endl;
std::exit(-1);
}
std::string file(argv[1]);
TFile *root_file = new TFile(file.c_str(),"READ");
//checkfile
if(root_file->IsZombie())
{
std::cout << "root file " << file << " is a zombie\n";
return 1;
}
else
{
std::cout << "root file " << file << " is valid!\n";
return 0;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment