Omicron  4.2.0
An algorithm to detect and characterize transient events in gravitational-wave detectors
Loading...
Searching...
No Matches
OxInit.h
Go to the documentation of this file.
1
6#ifndef __OxInit__
7#define __OxInit__
8#include <GwollumOptions.h>
9
10using namespace std;
11
16class OxInit{
17
18public:
19
38 OxInit(const string aOptionFile);
39
43 virtual ~OxInit(void);
44
52 inline bool GetStatus(void){ return status; };
53
57 inline string GetName(void){ return ox_name; };
58
62 inline string GetOutputDirectory(void){ return ox_outdir; };
63
68 void CloseOutputFile(void);
69
79 bool CreateOutputFile(const unsigned int aTime);
80
86 inline void AttachTree(TTree* aTree){ aTree->SetDirectory(ox_outfile); };
87
88protected:
89
90 bool status;
91 GwollumOptions *ox_opt;
92
100 inline void DefineOption(const string aTag, const string aKey, const int aDefaultValue, const unsigned int aSize){
101 OxInit::ox_opt_text->Add(aTag, aKey, aDefaultValue, aSize);
102 };
103
111 inline void DefineOption(const string aTag, const string aKey, const unsigned int aDefaultValue, const unsigned int aSize){
112 OxInit::ox_opt_text->Add(aTag, aKey, aDefaultValue, aSize);
113 };
114
122 inline void DefineOption(const string aTag, const string aKey, const double aDefaultValue, const unsigned int aSize){
123 OxInit::ox_opt_text->Add(aTag, aKey, aDefaultValue, aSize);
124 };
125
133 inline void DefineOption(const string aTag, const string aKey, const string aDefaultValue, const unsigned int aSize){
134 OxInit::ox_opt_text->Add(aTag, aKey, aDefaultValue, aSize);
135 };
136
144 void AddOptions(void);
145
151 void OverloadOption(const string aTag, const string aKey);
152
153private:
154
156 GwollumOptions *ox_opt_text;
157 string ox_name;
158 string ox_outdir;
159 TFile *ox_outfile;
160
165 void GetOptionsFromOxFiles(void);
166
167 ClassDef(OxInit,0)
168};
169
170
171#endif
172
173
Ox analysis initialization.
Definition OxInit.h:16
bool GetStatus(void)
Returns the class status.
Definition OxInit.h:52
virtual ~OxInit(void)
Destructor of the OxInit class.
Definition OxInit.cc:63
void CloseOutputFile(void)
Closes the current ouput file (if any).
Definition OxInit.cc:71
GwollumOptions * ox_opt_text
List of options extracted from a txt file.
Definition OxInit.h:156
void DefineOption(const string aTag, const string aKey, const string aDefaultValue, const unsigned int aSize)
Defines an option (string).
Definition OxInit.h:133
string GetName(void)
Returns the object name.
Definition OxInit.h:57
string ox_opt_filepath
Path to the option text file.
Definition OxInit.h:155
bool status
Class status.
Definition OxInit.h:90
void GetOptionsFromOxFiles(void)
Gets options from a list of Ox files.
Definition OxInit.cc:227
string GetOutputDirectory(void)
Returns the path to the output directory.
Definition OxInit.h:62
void DefineOption(const string aTag, const string aKey, const unsigned int aDefaultValue, const unsigned int aSize)
Defines an option (unsigned integer).
Definition OxInit.h:111
void DefineOption(const string aTag, const string aKey, const double aDefaultValue, const unsigned int aSize)
Defines an option (double).
Definition OxInit.h:122
TFile * ox_outfile
Output file.
Definition OxInit.h:159
OxInit(const string aOptionFile)
Constructor of the OxInit class.
void DefineOption(const string aTag, const string aKey, const int aDefaultValue, const unsigned int aSize)
Defines an option (integer).
Definition OxInit.h:100
bool CreateOutputFile(const unsigned int aTime)
Creates an ouput file.
Definition OxInit.cc:83
GwollumOptions * ox_opt
List of options.
Definition OxInit.h:91
void OverloadOption(const string aTag, const string aKey)
Overloads an option using the text file as a reference.
Definition OxInit.cc:165
string ox_outdir
Path to the output directory.
Definition OxInit.h:158
string ox_name
Object name.
Definition OxInit.h:157
void AddOptions(void)
Adds options from the text file.
Definition OxInit.cc:108
void AttachTree(TTree *aTree)
Attach a TTree to the output file.
Definition OxInit.h:86