Project
Loading...
Searching...
No Matches
DOFSet.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALG_DOFSET_H
17#define ALG_DOFSET_H
18
19#include <TNamed.h>
20#include "Framework/Logger.h"
21
22namespace o2
23{
24namespace align
25{
26class Controller;
27
28class DOFSet : public TNamed
29{
30 public:
31 DOFSet() = default;
32 DOFSet(const char* symname, Controller* ctr);
33 ~DOFSet() override = default;
34
35 const float* getParVals() const;
36 const float* getParErrs() const;
37 const int* getParLabs() const;
38
39 float getParVal(int par) const { return getParVals()[par]; }
40 float getParErr(int par) const { return getParErrs()[par]; }
41 int getParLab(int par) const { return getParLabs()[par]; }
42 void getParValGeom(double* delta) const;
43 //
44 int getNDOFs() const { return mNDOFs; }
45 int getNDOFsFree() const { return mNDOFsFree; }
46 int getNCalibDOFs() const { return mNCalibDOFs; }
47 int getNCalibDOFsFree() const { return mNCalibDOFsFree; }
48 int getFirstParGloID() const { return mFirstParGloID; }
49 int getParGloID(int par) const { return mFirstParGloID + par; }
50
51 void setNDOFs(int n) { mNDOFs = n; }
52 void setNDOFsFree(int n) { mNDOFsFree = n; }
53 void setNCalibDOFs(int n) { mNCalibDOFs = n; }
56 //
57 void setParVals(int npar, double* vl, double* er);
58 void setParVal(int par, double v = 0) { getParVals()[par] = v; }
59 void setParErr(int par, double e = 0) { getParErrs()[par] = e; }
60 void setParLab(int par, int lab)
61 {
62 getParLabs()[par] = lab;
63 LOGP(debug, "Assign label {} to DOF{}/{} of {}", lab, par, mNDOFs, GetName());
64 }
65
66 protected:
67 auto getController() { return mController; }
68 float* getParVals();
69 float* getParErrs();
70 int* getParLabs();
71 bool varsSet() const { return mFirstParGloID != -1; }
72
74 int mNDOFs = 0; // number of DOFs
75 int mNDOFsFree = 0; // numer of DOFs free
76 int mNCalibDOFs = 0; // number of calibDOFs
77 int mNCalibDOFsFree = 0; // number of calibDOFs free
78 int mFirstParGloID = -1; // ID of the 1st parameter in the global results array
79
81};
82
83} // namespace align
84} // namespace o2
85
86#endif
std::ostringstream debug
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
void getParValGeom(double *delta) const
void setParLab(int par, int lab)
Definition DOFSet.h:60
void setParVal(int par, double v=0)
Definition DOFSet.h:58
int getParGloID(int par) const
Definition DOFSet.h:49
void setNDOFsFree(int n)
Definition DOFSet.h:52
void setNCalibDOFs(int n)
Definition DOFSet.h:53
const float * getParVals() const
Definition DOFSet.cxx:29
int getNCalibDOFsFree() const
Definition DOFSet.h:47
void setNCalibDOFsFree(int n)
Definition DOFSet.h:54
Controller * mController
Definition DOFSet.h:73
const int * getParLabs() const
Definition DOFSet.cxx:41
int getFirstParGloID() const
Definition DOFSet.h:48
void setFirstParGloID(int id)
Definition DOFSet.h:55
float getParVal(int par) const
Definition DOFSet.h:39
int getNCalibDOFs() const
Definition DOFSet.h:46
int mNCalibDOFsFree
Definition DOFSet.h:77
const float * getParErrs() const
Definition DOFSet.cxx:35
float getParErr(int par) const
Definition DOFSet.h:40
~DOFSet() override=default
void setNDOFs(int n)
Definition DOFSet.h:51
int getNDOFsFree() const
Definition DOFSet.h:45
int getParLab(int par) const
Definition DOFSet.h:41
bool varsSet() const
Definition DOFSet.h:71
ClassDefOverride(DOFSet, 1)
void setParErr(int par, double e=0)
Definition DOFSet.h:59
int getNDOFs() const
Definition DOFSet.h:44
auto getController()
Definition DOFSet.h:67
void setParVals(int npar, double *vl, double *er)
GLdouble n
Definition glcorearb.h:1982
const GLdouble * v
Definition glcorearb.h:832
GLuint id
Definition glcorearb.h:650
void align(gsl::span< ElinkEncoder< BareFormat, CHARGESUM > > elinks)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...