CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CDFRunInfo.h
Go to the documentation of this file.
1 #ifndef CDFRunInfo_hh_included
2 #define CDFRunInfo_hh_included 1
3 
4 #include <map>
5 #include <string>
6 #include <TFile.h>
7 
15 class CDFRunInfo {
16 public:
17  CDFRunInfo();
18  CDFRunInfo(TFile* fromFile);
19 
21  const char* get(const char* key) const;
23  int getInt(const char* key) const;
25  double getDouble(const char* key) const;
27  inline int getSize() const { return m_mapData.size(); }
29  int getKeys(const char** buffer, int nbufs);
31  bool hasKey(const char* key) const;
32 
34  void setInfo(const char* key, const char* value);
36  void print() const;
37 
38  void store(TFile* toFile);
39 
40 private:
41  bool load(TFile* fromFile);
42  static const char* RootVariableName;
43  std::map<std::string, std::string> m_mapData;
44 };
45 
46 #endif // CDFRunInfo_hh_included
Per-run or per-file information.
Definition: CDFRunInfo.h:15
std::map< std::string, std::string > m_mapData
Definition: CDFRunInfo.h:43
bool hasKey(const char *key) const
test for thr presence of given key
Definition: CDFRunInfo.cc:42
void setInfo(const char *key, const char *value)
add some information to the run info
Definition: CDFRunInfo.cc:47
void store(TFile *toFile)
Definition: CDFRunInfo.cc:67
void print() const
print all information to the terminal
Definition: CDFRunInfo.cc:77
double getDouble(const char *key) const
Get a run info item by name and convert it to a double.
Definition: CDFRunInfo.cc:26
tuple key
prepare the HTCondor submission files and eventually submit them
static const char * RootVariableName
Definition: CDFRunInfo.h:42
int getSize() const
get the number of items
Definition: CDFRunInfo.h:27
int getKeys(const char **buffer, int nbufs)
fill the given array with key name pointers
Definition: CDFRunInfo.cc:33
int getInt(const char *key) const
Get a run info item by name and convert it to an integer.
Definition: CDFRunInfo.cc:19
bool load(TFile *fromFile)
Definition: CDFRunInfo.cc:49