ATLAS Offline Software
Classes | Functions
iLumiCalc.h File Reference
#include "LumiCalc/LumiCalculator.h"
#include "LumiCalc/CoolQuery.h"
#include "LumiCalc/LumiBlockRangeContainerConverter.h"
#include "GoodRunsLists/TGoodRunsListReader.h"
#include "GoodRunsLists/TGoodRunsList.h"
#include "GoodRunsLists/TGRLCollection.h"
#include "GoodRunsLists/TMsgLogger.h"
#include "CxxUtils/checker_macros.h"
#include "cmdline.h"
#include <TROOT.h>
#include <TStopwatch.h>
#include <TString.h>
#include <TFile.h>
#include <TTree.h>
#include <iomanip>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ProgressBar
 

Functions

bool FileExists (const std::string &strFilename)
 

Function Documentation

◆ FileExists()

bool FileExists ( const std::string &  strFilename)

Definition at line 163 of file iLumiCalc.h.

163  {
164  struct stat stFileInfo;
165  bool blnReturn;
166  int intStat;
167 
168  // Attempt to get the file attributes
169  intStat = stat(strFilename.c_str(),&stFileInfo);
170  if(intStat == 0) {
171  // We were able to get the file attributes
172  // so the file obviously exists.
173 
174 
175  blnReturn = true;
176  } else {
177  // We were not able to get the file attributes.
178  // This may mean that we don't have permission to
179  // access the folder which contains this file. If you
180  // need to do that level of checking, lookup the
181  // return values of stat which will give you
182  // more details on why stat failed.
183  blnReturn = false;
184  }
185 
186  return(blnReturn);
187 }
beamspotman.stat
stat
Definition: beamspotman.py:266