REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Loading...
Searching...
No Matches
TRestHaloMetadata.cxx
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see https://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see https://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23 #include "TRestHaloMetadata.h"
24
25ClassImp(TRestHaloMetadata)
26
27TRestHaloMetadata::TRestHaloMetadata() {
28 // default initialization handled in member declarations
29}
30
31TRestHaloMetadata::~TRestHaloMetadata() {}
32
34 // print generic metadata info
36 // print the haloscope-specific fields
37 RESTMetadata << "=== Halo Metadata ===\n";
38 RESTMetadata << " Experiment : " << fExperimentName << "\n";
39 RESTMetadata << " Run number : " << fRunNumber << "\n";
40 RESTMetadata << " Start time : " << fStartTime << "\n";
41 RESTMetadata << " Integration time : " << fIntegrationTime << " s\n";
42 RESTMetadata << " Frames/spectrum : " << fFramesPerSpectrum << "\n";
43 RESTMetadata << " RBW : " << fResolutionBandwidth << " Hz\n";
44 RESTMetadata << " Reference power : " << fReferencePowerdBm << " dBm\n";
45 RESTMetadata << " Preamp enabled : " << fPreamplifierEnabled << "\n";
46 RESTMetadata << " Center freq : " << fCenterFrequency << " Hz\n";
47 RESTMetadata << " Num spectra : " << fNumSpectra << "\n";
48 RESTMetadata << " Frequency points : " << fNumFreqPoints << "\n";
49 RESTMetadata << " Attenuation : " << fAttenuation << " dB\n";
50 RESTMetadata << " Notes : " << fNotes << "\n";
51 RESTMetadata << " Calibration file : " << fLastCal << "\n";
52 RESTMetadata << " Standard Deviation: " << fStdDev << "\n";
53 RESTMetadata << " Uncertainties : " << (fUncertaintiesProvided ? "Provided" : "Computed from spectrum") << "\n";
54 // print stored units
55 RESTMetadata << " Stored value unit : " << GetValueUnitString() << "\n";
56}
57
58TString TRestHaloMetadata::GetValueUnitString() const {
59 switch (fValueUnit) {
60 case TRestHaloMetadata::W: return "W";
61 case TRestHaloMetadata::V_RMS:
62 default:
63 return "V_RMS";
64 }
65}
Dedicated metadata for halo/acquisition settings.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
virtual void PrintMetadata()
Implemented it in the derived metadata class to print out specific metadata information.