HighLAND
Public Member Functions | List of all members
DataQualityCorrection Class Reference

#include <DataQualityCorrection.hxx>

Inheritance diagram for DataQualityCorrection:
CorrectionBase

Public Member Functions

 DataQualityCorrection ()
 
void Apply (AnaSpillC &spill)
 Apply the variation to all tracks with TPC info.
 
- Public Member Functions inherited from CorrectionBase
 CorrectionBase (const CorrectionBase &corr)
 Copy constructor.
 
virtual ~CorrectionBase ()
 Everyone should have a destructor.
 
virtual const char * GetName () const
 Return the name of this correction. This overrides the TObject::GetName() interface.
 
const std::string & Name () const
 Return the name of this correction.
 
void SetName (const std::string &name)
 Set the name of this correction.
 
void Enable ()
 Enable the correction.
 
void Disable ()
 Disable the correction.
 
bool IsEnabled () const
 Is the correction enabled.
 
void SetAppliedInInput (bool ap)
 Set the correction as applied in the input file.
 
bool IsAppliedInInput () const
 Is the correction already applied in the input file ?
 
Int_t GetIndex () const
 Return the index of this correction.
 
void SetIndex (Int_t index)
 Set the index of this correction.
 
 ClassDef (CorrectionBase, 2)
 

Additional Inherited Members

- Protected Attributes inherited from CorrectionBase
std::string _name
 The name of this correction.
 
bool _enabled
 Is the correction enabled?
 
bool _appliedInInput
 Is the correction already applied in the input file ?
 
Int_t _index
 The index of the correction.
 

Detailed Description

This correction changes the data quality flag for certain run periods. The current usage is for a period in run 1, when a FEB wasn't working properly (but good DQ flags were uploaded to the DB).

The parameters in baseAnalysis.parameters.dat define the run periods for which this correction should be applied.

Definition at line 14 of file DataQualityCorrection.hxx.

Constructor & Destructor Documentation

§ DataQualityCorrection()

DataQualityCorrection::DataQualityCorrection ( )

Constructor, which reads in the parameter file to set up the run periods for which the correction should be applied.

Definition at line 7 of file DataQualityCorrection.cxx.

7  : CorrectionBase() {
8 //********************************************************************
9  _time_periods.clear();
10  _new_values.clear();
11 
12  std::string base = "highlandCorrections.DataQuality.";
13  int pairing = 1;
14 
15  // Read in the periods to apply the correction for
16  std::string curr = GetParamString(base + "NewValue.", pairing);
17 
18  while (ND::params().HasParameter(curr)) {
19  int val = ND::params().GetParameterI(curr);
20 
21  if (val != 0 && val != 1) {
22  std::cerr << "Invalid NewValue set for DataQuality correction in parameters file." << std::endl;
23  std::cerr << "Values must be either 0 or 1 - correct highlandIO.parameters.dat!" << std::endl;
24  exit(EXIT_FAILURE);
25  }
26 
27  curr = GetParamString(base + "Time.Lower.", pairing);
28  int lower = ND::params().GetParameterI(curr);
29  curr = GetParamString(base + "Time.Upper.", pairing);
30  int upper = ND::params().GetParameterI(curr);
31  std::pair<int, int> p(lower, upper);
32  _time_periods.push_back(p);
33  _new_values.push_back(val);
34  pairing++;
35  curr = GetParamString(base + "NewValue.", pairing);
36  }
37 
38 }
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
Definition: Parameters.cxx:217
All corrections should be registered with the CorrectionManager.

The documentation for this class was generated from the following files: