T2LifeROOTFileManager.h
Go to the documentation of this file.
1 #ifndef _sdet_T2LifeROOTFileManager_h_
2 #define _sdet_T2LifeROOTFileManager_h_
3 
4 #include <det/ValidityStamp.h>
5 
6 
7 class TTree;
8 
9 namespace sdet {
10 
95 
96  public:
98  virtual ~T2LifeROOTFileManager() { }
99 
101 
103  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
104  VMANAGER_GETDATA_NOTFOUND(std::string)
105  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
106  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
107  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
108  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int>>)
109  VMANAGER_GETDATA_NOTFOUND(std::vector<double>)
110  VMANAGER_GETDATA_NOTFOUND(std::vector<int>)
111  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
112  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
113  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
114  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase)
115  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
116 
117  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
118 
119  void Init(const std::string& configLink);
120 
121  private:
122  Status GetOkFlag(int& returnData,
123  const std::string& componentProperty,
124  const std::string& componentName,
125  const IndexMap& componentIndex) const;
126 
127  int GetStationIndex(const IndexMap& componentIndex) const;
128  bool ReadData() const;
129 
131 
133  std::string fFileName;
134 
135  TTree* fDataTree = nullptr;
136 
137  // number of pixels per telescope (as used in AugerUpTime-tree)
138  //static const unsigned int kNPixelPerTel = 440;
139 
140  // data cache
141  mutable det::ValidityStamp fDataValidity;
142  mutable std::vector<unsigned int> fStationList;
143 
144  // index map
145  static const double fgSearchMapBinning;
146  typedef std::pair<unsigned int, unsigned int> IndexEntry;
147  typedef std::map<unsigned int, IndexEntry> Index;
148  typedef std::map<unsigned int, IndexEntry>::iterator IndexIterator;
149  typedef std::map<unsigned int, IndexEntry>::const_iterator ConstIndexIterator;
150  Index fIndex;
151 
152  };
153 
154 }
155 
156 
157 #endif
Class to manage Sd life time ROOT files.
std::map< unsigned int, IndexEntry >::const_iterator ConstIndexIterator
Interface for detector managers.
Definition: VManager.h:115
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
VMANAGER_GETDATA_HANDLE_DENIED int fVerbosity
std::vector< unsigned int > fStationList
static const double fgSearchMapBinning
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
std::map< unsigned int, IndexEntry >::iterator IndexIterator
void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
std::map< unsigned int, IndexEntry > Index
Status GetOkFlag(int &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
int GetStationIndex(const IndexMap &componentIndex) const
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127
std::pair< unsigned int, unsigned int > IndexEntry

, generated on Tue Sep 26 2023.