FCCollection.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/FC/FCPoint.h"
4 
5 #include <memory>
6 #include <string>
7 #include <vector>
8 
9 namespace ana
10 {
11  /// Collection of \ref FCPoint. Serializable to/from a file
13  {
14  public:
15  FCCollection();
16 
17  void AddPoint(const FCPoint& p){fPts.push_back(p);}
18 
19  /// \param wildcard Wildcard or single file name
20  void AddFiles(const std::string& wildcard);
21 
22  void SaveToFile(const std::string& fname) const;
23  /// \param wildcard Wildcard or single file name
24  static std::unique_ptr<FCCollection> LoadFromFile(const std::string& wildcard);
25 
26  unsigned int NPoints() const {return fPts.size();}
27  const FCPoint& Point(int n) const {return fPts[n];}
28  protected:
29  std::vector<FCPoint> fPts;
30  };
31 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const char * p
Definition: xmltok.h:285
void AddPoint(const FCPoint &p)
Definition: FCCollection.h:17
std::vector< FCPoint > fPts
Definition: FCCollection.h:29
unsigned int NPoints() const
Definition: FCCollection.h:26
Represents the results of a single Feldman-Cousins pseudo-experiment.
Definition: FCPoint.h:8
void AddFiles(const std::string &wildcard)
std::void_t< T > n
std::vector< std::string > wildcard(const std::string &wildcardString)
Definition: convert.C:9
void SaveToFile(const std::string &fname) const
static std::unique_ptr< FCCollection > LoadFromFile(const std::string &wildcard)
const FCPoint & Point(int n) const
Definition: FCCollection.h:27
Collection of FCPoint. Serializable to/from a file.
Definition: FCCollection.h:12
enum BeamMode string