ToolDAQFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
DataModel.cpp
Go to the documentation of this file.
1 #include "DataModel.h"
2 
4 
5 ReconInfo * DataModel::GetFilter(std::string name, bool can_create)
6 {
7  if(name.compare("ALL") == 0) {
8  return &(this->RecoInfo);
9  }
10  if(this->RecoInfoMap.find(name) == this->RecoInfoMap.end()) {
11  if(can_create) {
12  this->RecoInfoMap.insert(std::pair<std::string, ReconInfo *>(name, new ReconInfo()));
13  }
14  else {
15  //It makes no sense for certain tools (e.g. ReconDataOut) to create an entry in the map, just to read nothing from it. So don't let it
16  return 0;
17  }
18  }
19  return this->RecoInfoMap[name];
20 }
ReconInfo RecoInfo
Store reconstruction information (vertex time/position, fit likelihoods, optionally direction) ...
Definition: DataModel.h:84
DataModel()
Simple constructor.
Definition: DataModel.cpp:3
ReconInfo * GetFilter(std::string name, bool can_create)
Definition: DataModel.cpp:5
std::map< std::string, ReconInfo * > RecoInfoMap
Store filtered reconstruction information.
Definition: DataModel.h:86