BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
print_parameter_values.C
Go to the documentation of this file.
1// macro for printing parameter values for selected detector
2void print_parameter_values(const char* pcDetectorName = "")
3{
4 if (pcDetectorName[0] == '\0') {
6 return;
7 }
8
9 TObjArray arrayConditions;
10 UniSearchCondition* searchCondition = new UniSearchCondition(
12 arrayConditions.Add((TObject*)searchCondition);
13
14 TObjArray* pParameterValueArray = UniDetectorParameter::Search(arrayConditions);
15
16 // clean memory for conditions after search
17 arrayConditions.Delete();
18
19 // print run numbers and file path with raw data
20 for (int i = 0; i < pParameterValueArray->GetEntriesFast(); i++) {
21 UniDetectorParameter* pParameterValue = (UniDetectorParameter*)pParameterValueArray->At(i);
22
23 cout << "Parameter: name - " << pParameterValue->GetParameterName() << ", parameter value - "
24 << pParameterValue->GetParameterValue() << " (run " << pParameterValue->GetStartRun() << "-"
25 << pParameterValue->GetEndRun() << ")" << endl;
26 }
27
28 // clean memory after work
29 for (int i = 0; i < pParameterValueArray->GetEntriesFast(); i++)
30 delete (UniRun*)pParameterValueArray->At(i);
31 delete pParameterValueArray;
32
33 cout << "\nMacro finished successfully" << endl;
34}
int i
Definition P4_F32vec4.h:22
Int_t GetEntriesFast() const
void Delete(Option_t *option="") override
TObject * At(Int_t idx) const override
void Add(TObject *obj) override
TString GetParameterName()
get parameter name of the current parameter value
unsigned char * GetParameterValue()
get parameter value of the current detector parameter
static TObjArray * Search(UniSearchCondition &search_condition)
get parameters' values corresponding to the specified single condition and set owner for search_condi...
int GetEndRun()
get end run of the current detector parameter
static int PrintAll()
print all detector parameters
int GetStartRun()
get start run of the current detector parameter
UniRun.h Class for the table: run_.
Definition UniRun.h:21
void print_parameter_values(const char *pcDetectorName="")