1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
int filechk(string fname)
{
//TFile f("DQM_V0001_SiStrip_R000062940.root");
TFile f(fname.c_str());
if (f.IsZombie()){
//cout << "File corrupted" << endl;
return -1;
}
else
{
//TH2F* hist;
//hist = (TH2F*)f.FindObjectAny("reportSummaryMap");
TDirectoryFile* hist;
hist = (TDirectoryFile*)f.FindObjectAny("reportSummaryContents");
if (0 == hist)
{
//cout << "File is incomplete" << endl;
return 0;
}
else
{
//cout << "File is OK" << endl;
return 1;
}
}
}
|