HighLAND
DataQualityCorrection.hxx
1 #ifndef DataQualityCorrection_h
2 #define DataQualityCorrection_h
3 
4 #include "CorrectionBase.hxx"
5 #include <vector>
6 #include <utility>
7 
8 /// This correction changes the data quality flag for certain run periods. The current
9 /// usage is for a period in run 1, when a FEB wasn't working properly (but good
10 /// DQ flags were uploaded to the DB).
11 ///
12 /// The parameters in baseAnalysis.parameters.dat define the run periods for which
13 /// this correction should be applied.
15  public:
16 
17  /// Constructor, which reads in the parameter file to set up the run
18  /// periods for which the correction should be applied.
20 
21  virtual ~DataQualityCorrection() {}
22 
23  /// Apply the variation to all tracks with TPC info.
24  void Apply(AnaSpillC& spill);
25 
26  private:
27 
28  /// Join the base string with the pairing integer.
29  std::string GetParamString(std::string base, int pairing);
30 
31  /// The run periods to apply this correction for. Pairing is starttime-endtime.
32  std::vector<std::pair<int, int> > _time_periods;
33 
34  /// The new DQ flag to apply to the corresponding entry in _time_periods.
35  std::vector<int> _new_values;
36 };
37 
38 #endif
void Apply(AnaSpillC &spill)
Apply the variation to all tracks with TPC info.
All corrections should be registered with the CorrectionManager.