Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:43

0001 int filechk(string fname)
0002 {
0003   //TFile f("DQM_V0001_SiStrip_R000062940.root");
0004   TFile f(fname.c_str());
0005 
0006   if (f.IsZombie()){
0007     //cout << "File corrupted" << endl;
0008   return -1;
0009   }
0010   else
0011   {
0012     //TH2F* hist;
0013     //hist = (TH2F*)f.FindObjectAny("reportSummaryMap");
0014     TDirectoryFile* hist;   
0015     hist = (TDirectoryFile*)f.FindObjectAny("reportSummaryContents");
0016     if (0 == hist) 
0017     {
0018       //cout << "File is incomplete" << endl;
0019       return 0;
0020     }
0021     else
0022     {
0023       //cout << "File is OK" << endl;
0024       return 1;
0025     }
0026   }
0027 }