This Class is designed to store and run dependent information. It is used to store run numbers, existence of detector systems, reconstruction windows, etc. The TRunInfo is written alongside both the fragment and analysis trees.
TRunInfo designed to be made as the FragmentTree is created. Right now, it simple remembers the run and subrunnumber and sets which systems are present in the odb.
Due to some root quarkiness, I have done something a bit strange. The info is written ok at the end of the fragment tree process.
Definition at line 56 of file TRunInfo.h.
Public Member Functions | |
TRunInfo () | |
~TRunInfo () override | |
void | Add (TRunInfo *runinfo) |
void | AddBadCycle (int bad_cycle) |
virtual TEventBuildingLoop::EBuildMode | BuildMode () const |
void | Clear (Option_t *opt="") override |
bool | IsBadCycle (int cycle) const |
Long64_t | Merge (TCollection *list) |
void | Print (Option_t *opt="") const override |
void | PrintBadCycles () const |
void | PrintRunList () |
std::string | PrintToString (Option_t *opt="") |
void | RemoveBadCycle (int cycle) |
Static Public Member Functions | |
static TRunInfo * | AddCurrent () |
static void | ClearDate () |
static void | ClearFullVersion () |
static void | ClearLibraryVersion () |
static void | ClearVersion () |
static int | FirstRunNumber () |
static int | FirstSubRunNumber () |
static TRunInfo * | Get (bool verbose=false) |
static TRunInfo * | GetAll () |
static const char * | GetCalFileData () |
static const char * | GetCalFileName () |
static const char * | GetDate () |
static TDetectorInformation * | GetDetectorInformation () |
static const char * | GetFullVersion () |
static const char * | GetLibraryVersion () |
static const char * | GetRunInfoFileData () |
static const char * | GetRunInfoFileName () |
static const char * | GetVersion () |
static const char * | GetXMLODBFileData () |
static const char * | GetXMLODBFileName () |
static double | HPGeArrayPosition () |
static int | LastRunNumber () |
static int | LastSubRunNumber () |
static Bool_t | ParseInputData (const char *inputdata="", Option_t *opt="q") |
static void | PrintDirectory () |
static Bool_t | ReadInfoFile (const char *filename="") |
static Bool_t | ReadInfoFromFile (TFile *tempf=nullptr) |
static std::string | RunComment () |
static double | RunLength () |
static int | RunNumber () |
static double | RunStart () |
static double | RunStop () |
static std::string | RunTitle () |
static void | Set (TRunInfo *val) |
static void | SetAnalysisTreeBranches (TTree *) |
static void | SetCalFileData (const char *data) |
static void | SetCalFileName (const char *name) |
static void | SetDate (const char *ver) |
static void | SetDetectorInformation (TDetectorInformation *inf) |
static void | SetFullVersion (const char *ver) |
static void | SetHPGeArrayPosition (const double arr_pos) |
static void | SetLibraryVersion (const char *ver) |
static void | SetRunComment (const char *run_comment) |
static void | SetRunInfo (int runnum=0, int subrunnum=-1) |
static void | SetRunInfoFile (const char *ffile) |
static void | SetRunInfoFileName (const char *fname) |
static void | SetRunLength (double tmp) |
static void | SetRunLength () |
static void | SetRunNumber (int tmp) |
static void | SetRunStart (double tmp) |
static void | SetRunStop (double tmp) |
static void | SetRunTitle (const char *run_title) |
static void | SetSubRunNumber (int tmp) |
static void | SetVersion (const char *ver) |
static void | SetXMLODBFileData (const char *data) |
static void | SetXMLODBFileName (const char *name) |
static int | SubRunNumber () |
static bool | WriteInfoFile (const std::string &filename) |
static bool | WriteToRoot (TFile *fileptr=nullptr) |
Static Private Member Functions | |
static void | trim (std::string *, const std::string &trimChars=" \\\) |
Private Attributes | |
std::vector< int > | fBadCycleList |
unsigned int | fBadCycleListSize |
std::string | fCalFile |
std::string | fCalFileName |
TDetectorInformation * | fDetectorInformation |
int | fFirstRunNumber {0} |
int | fFirstSubRunNumber {-1} |
double | fHPGeArrayPosition |
int | fLastRunNumber {0} |
int | fLastSubRunNumber {-1} |
std::string | fRunComment |
std::string | fRunInfoFile |
std::string | fRunInfoFileName |
double | fRunLength {0.} |
std::vector< std::pair< int, int > > | fRunList |
int | fRunNumber |
double | fRunStart {0.} |
double | fRunStop {0.} |
std::string | fRunTitle |
int | fSubRunNumber |
std::string | fXMLODBFile |
std::string | fXMLODBFileName |
Static Private Attributes | |
static std::string | fDate |
static std::string | fFullVersion |
static std::string | fLibraryVersion |
static std::string | fVersion |
Friends | |
class | TSingleton< TRunInfo > |
#include <TRunInfo.h>
|
overridedefault |
TRunInfo::TRunInfo | ( | ) |
Default ctor for TRunInfo. The default values are:
fHPGeArrayPosition = 110.0;
Definition at line 71 of file TRunInfo.cxx.
References Clear(), and fDetectorInformation.
void TRunInfo::Add | ( | TRunInfo * | runinfo | ) |
Definition at line 421 of file TRunInfo.cxx.
References DYELLOW, fFirstRunNumber, fFirstSubRunNumber, fLastRunNumber, fLastSubRunNumber, fRunLength, fRunList, fRunNumber, fRunStart, fRunStop, fSubRunNumber, and RESET_COLOR.
Referenced by Merge().
void TRunInfo::AddBadCycle | ( | int | bad_cycle | ) |
Definition at line 317 of file TRunInfo.cxx.
References fBadCycleList, fBadCycleListSize, and TSingleton< TRunInfo >::Get().
Referenced by ParseInputData().
|
inlinestaticinherited |
Definition at line 137 of file TSingleton.h.
Referenced by Analyze().
|
virtual |
Definition at line 415 of file TRunInfo.cxx.
References TEventBuildingLoop::kDefault.
|
override |
Definition at line 124 of file TRunInfo.cxx.
References fBadCycleList, fBadCycleListSize, fDetectorInformation, and fHPGeArrayPosition.
Referenced by TRunInfo().
|
inlinestatic |
Definition at line 92 of file TRunInfo.h.
References fDate.
Referenced by TGRSIint::ApplyOptions(), and SetRunInfo().
|
inlinestatic |
Definition at line 81 of file TRunInfo.h.
References fFullVersion.
Referenced by TGRSIint::ApplyOptions(), and SetRunInfo().
|
inlinestatic |
Definition at line 103 of file TRunInfo.h.
References fLibraryVersion.
Referenced by TMidasFile::Open().
|
inlinestatic |
Definition at line 70 of file TRunInfo.h.
References fVersion.
Referenced by TGRSIint::ApplyOptions(), TLstFile::Open(), TTdrFile::Open(), TRlmdFile::Open(), and SetRunInfo().
|
inlinestatic |
Definition at line 122 of file TRunInfo.h.
References fFirstRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by AtExitHandler(), Print(), and TGRSISelector::Terminate().
|
inlinestatic |
Definition at line 123 of file TRunInfo.h.
References fFirstSubRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by AtExitHandler(), Print(), and TGRSISelector::Terminate().
|
inlinestaticinherited |
Definition at line 34 of file TSingleton.h.
Referenced by AddBadCycle(), Analyze(), AtExitHandler(), TEpicsFrag::BuildScalerMap(), FirstRunNumber(), FirstSubRunNumber(), GetCalFileData(), GetCalFileName(), GetDetectorInformation(), GetRunInfoFileData(), GetRunInfoFileName(), GetXMLODBFileData(), GetXMLODBFileName(), HPGeArrayPosition(), IsBadCycle(), LastRunNumber(), LastSubRunNumber(), main(), ParseInputData(), PrintBadCycles(), PrintToString(), TGRSIDataParser::Process(), ReadInfoFile(), ReadInfoFromFile(), RemoveBadCycle(), RunComment(), RunLength(), RunNumber(), RunStart(), RunStop(), RunTitle(), SetCalFileData(), SetCalFileName(), SetDetectorInformation(), SetHPGeArrayPosition(), SetRunComment(), TMidasFile::SetRunInfo(), SetRunInfo(), SetRunInfoFile(), SetRunInfoFileName(), SetRunLength(), SetRunNumber(), SetRunStart(), SetRunStop(), SetRunTitle(), SetSubRunNumber(), TGRSIint::SetupPipeline(), SetXMLODBFileData(), SetXMLODBFileName(), SubRunNumber(), TGRSISelector::Terminate(), TAnalysisWriteLoop::Write(), TFragWriteLoop::Write(), WriteInfoFile(), and WriteToRoot().
|
inlinestaticinherited |
Definition at line 62 of file TSingleton.h.
|
inlinestatic |
Definition at line 150 of file TRunInfo.h.
References fCalFile, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 149 of file TRunInfo.h.
References fCalFileName, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 91 of file TRunInfo.h.
References fDate.
|
inlinestatic |
Definition at line 180 of file TRunInfo.h.
References fDetectorInformation, and TSingleton< TRunInfo >::Get().
Referenced by TDescant::GetPosition(), and TGRSIint::SetupPipeline().
|
inlinestatic |
Definition at line 80 of file TRunInfo.h.
References fFullVersion.
|
inlinestatic |
Definition at line 102 of file TRunInfo.h.
References fLibraryVersion.
|
inlinestatic |
Definition at line 156 of file TRunInfo.h.
References fRunInfoFile, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 155 of file TRunInfo.h.
References fRunInfoFileName, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 69 of file TRunInfo.h.
References fVersion.
|
inlinestatic |
Definition at line 153 of file TRunInfo.h.
References fXMLODBFile, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 152 of file TRunInfo.h.
References fXMLODBFileName, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 165 of file TRunInfo.h.
References fHPGeArrayPosition, and TSingleton< TRunInfo >::Get().
Referenced by ParseInputData(), Print(), and PrintToString().
bool TRunInfo::IsBadCycle | ( | int | cycle | ) | const |
Definition at line 338 of file TRunInfo.cxx.
References fBadCycleList, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 125 of file TRunInfo.h.
References fLastRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by AtExitHandler(), Print(), and TGRSISelector::Terminate().
|
inlinestatic |
Definition at line 126 of file TRunInfo.h.
References fLastSubRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by AtExitHandler(), Print(), and TGRSISelector::Terminate().
Long64_t TRunInfo::Merge | ( | TCollection * | list | ) |
Definition at line 289 of file TRunInfo.cxx.
References Add().
|
static |
Definition at line 211 of file TRunInfo.cxx.
References AddBadCycle(), DBLUE, DRED, TSingleton< TRunInfo >::Get(), HPGeArrayPosition(), RESET_COLOR, SetHPGeArrayPosition(), and trim().
Referenced by ReadInfoFile(), and SetRunInfo().
|
override |
Prints the TRunInfo. Options: a: Print out more details (array position and detector information).
Definition at line 83 of file TRunInfo.cxx.
References DBLUE, DRED, fDetectorInformation, FirstRunNumber(), FirstSubRunNumber(), HPGeArrayPosition(), LastRunNumber(), LastSubRunNumber(), TDetectorInformation::Print(), TSingleton< T >::PrintDirectory(), RESET_COLOR, RunComment(), RunLength(), RunNumber(), RunStart(), RunStop(), RunTitle(), and SubRunNumber().
Referenced by Analyze(), main(), and TGRSISelector::Terminate().
void TRunInfo::PrintBadCycles | ( | ) | const |
Definition at line 304 of file TRunInfo.cxx.
References fBadCycleList, and TSingleton< TRunInfo >::Get().
|
inlinestaticinherited |
Definition at line 166 of file TSingleton.h.
void TRunInfo::PrintRunList | ( | ) |
Definition at line 553 of file TRunInfo.cxx.
References fRunList.
std::string TRunInfo::PrintToString | ( | Option_t * | opt = "" | ) |
Definition at line 397 of file TRunInfo.cxx.
References fBadCycleList, TSingleton< TRunInfo >::Get(), and HPGeArrayPosition().
Referenced by WriteInfoFile().
|
static |
Definition at line 177 of file TRunInfo.cxx.
References CYAN, TSingleton< TRunInfo >::Get(), ParseInputData(), RESET_COLOR, SetRunInfoFile(), and SetRunInfoFileName().
Referenced by TGRSIint::SetupPipeline().
|
static |
Definition at line 23 of file TRunInfo.cxx.
References fDetectorInformation, TSingleton< TRunInfo >::Get(), and TSingleton< TRunInfo >::Set().
Referenced by TGRSIint::OpenRootFile().
void TRunInfo::RemoveBadCycle | ( | int | cycle | ) |
Definition at line 331 of file TRunInfo.cxx.
References fBadCycleList, fBadCycleListSize, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 132 of file TRunInfo.h.
References fRunComment, and TSingleton< TRunInfo >::Get().
Referenced by Print().
|
inlinestatic |
Definition at line 141 of file TRunInfo.h.
References fRunLength, and TSingleton< TRunInfo >::Get().
Referenced by Print().
|
inlinestatic |
Definition at line 119 of file TRunInfo.h.
References fRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by AtExitHandler(), main(), MakeAnalysisHistograms(), Print(), TGRSISortInfo::SetRunInfo(), SetRunInfo(), TPPG::Setup(), and TGRSISelector::Terminate().
|
inlinestatic |
Definition at line 139 of file TRunInfo.h.
References fRunStart, and TSingleton< TRunInfo >::Get().
Referenced by TEpicsFrag::BuildScalerMap(), and Print().
|
inlinestatic |
Definition at line 140 of file TRunInfo.h.
References fRunStop, and TSingleton< TRunInfo >::Get().
Referenced by Print().
|
inlinestatic |
Definition at line 131 of file TRunInfo.h.
References fRunTitle, and TSingleton< TRunInfo >::Get().
Referenced by Print().
|
inlinestaticinherited |
Definition at line 129 of file TSingleton.h.
Referenced by ReadInfoFromFile().
|
static |
Definition at line 172 of file TRunInfo.cxx.
|
inlinestatic |
Definition at line 144 of file TRunInfo.h.
References fCalFile, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 143 of file TRunInfo.h.
References fCalFileName, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 93 of file TRunInfo.h.
References ALERTTEXT, fDate, and RESET_COLOR.
Referenced by TGRSIint::ApplyOptions(), and SetRunInfo().
|
inlinestatic |
Definition at line 179 of file TRunInfo.h.
References fDetectorInformation, and TSingleton< TRunInfo >::Get().
Referenced by TLstFile::Open(), TTdrFile::Open(), TMidasFile::Open(), and TRlmdFile::Open().
|
inlinestatic |
Definition at line 82 of file TRunInfo.h.
References ALERTTEXT, fFullVersion, and RESET_COLOR.
Referenced by TGRSIint::ApplyOptions(), and SetRunInfo().
|
inlinestatic |
Definition at line 164 of file TRunInfo.h.
References fHPGeArrayPosition, and TSingleton< TRunInfo >::Get().
Referenced by ParseInputData().
|
inlinestatic |
Definition at line 104 of file TRunInfo.h.
References ALERTTEXT, fLibraryVersion, and RESET_COLOR.
Referenced by TMidasFile::Open().
|
inlinestatic |
Definition at line 129 of file TRunInfo.h.
References fRunComment, and TSingleton< TRunInfo >::Get().
Referenced by main(), and TMidasFile::SetRunInfo().
|
static |
Sets the run info. This figures out what systems are available.
Definition at line 138 of file TRunInfo.cxx.
References ClearDate(), ClearFullVersion(), ClearVersion(), fRunInfoFile, TSingleton< TRunInfo >::Get(), TChannel::GetNumberOfChannels(), GRSI_GIT_COMMIT, GRSI_GIT_COMMIT_TIME, GRSI_RELEASE, ParseInputData(), RunNumber(), SetDate(), SetFullVersion(), SetRunNumber(), SetSubRunNumber(), SetVersion(), and SubRunNumber().
Referenced by TLstFile::Open(), TTdrFile::Open(), TMidasFile::Open(), TRlmdFile::Open(), and TGRSIint::SetupPipeline().
|
inlinestatic |
Definition at line 162 of file TRunInfo.h.
References fRunInfoFile, and TSingleton< TRunInfo >::Get().
Referenced by ReadInfoFile().
|
inlinestatic |
Definition at line 161 of file TRunInfo.h.
References fRunInfoFileName, and TSingleton< TRunInfo >::Get().
Referenced by ReadInfoFile().
|
inlinestatic |
Definition at line 136 of file TRunInfo.h.
References fRunLength, and TSingleton< TRunInfo >::Get().
Referenced by main().
|
inlinestatic |
Definition at line 137 of file TRunInfo.h.
References fRunLength, fRunStart, fRunStop, and TSingleton< TRunInfo >::Get().
Referenced by TLstFile::Open(), TRlmdFile::Open(), and TRlmdFile::Read().
|
inlinestatic |
Definition at line 116 of file TRunInfo.h.
References fRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by main(), and SetRunInfo().
|
inlinestatic |
Definition at line 134 of file TRunInfo.h.
References fRunStart, and TSingleton< TRunInfo >::Get().
Referenced by main(), TRlmdFile::Read(), and TMidasFile::SetRunInfo().
|
inlinestatic |
Definition at line 135 of file TRunInfo.h.
References fRunStop, and TSingleton< TRunInfo >::Get().
Referenced by main(), and TRlmdFile::Read().
|
inlinestatic |
Definition at line 128 of file TRunInfo.h.
References fRunTitle, and TSingleton< TRunInfo >::Get().
Referenced by main(), and TMidasFile::SetRunInfo().
|
inlinestatic |
Definition at line 117 of file TRunInfo.h.
References fSubRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by main(), and SetRunInfo().
|
inlinestatic |
Definition at line 71 of file TRunInfo.h.
References ALERTTEXT, fVersion, and RESET_COLOR.
Referenced by TGRSIint::ApplyOptions(), TLstFile::Open(), TTdrFile::Open(), TRlmdFile::Open(), and SetRunInfo().
|
inlinestatic |
Definition at line 147 of file TRunInfo.h.
References fXMLODBFile, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 146 of file TRunInfo.h.
References fXMLODBFileName, and TSingleton< TRunInfo >::Get().
|
inlinestatic |
Definition at line 120 of file TRunInfo.h.
References fSubRunNumber, and TSingleton< TRunInfo >::Get().
Referenced by AtExitHandler(), Print(), TGRSISortInfo::SetRunInfo(), TMidasFile::SetRunInfo(), SetRunInfo(), TPPG::Setup(), and TGRSISelector::Terminate().
|
staticprivate |
Removes the string "trimCars" from the string 'line'
Definition at line 272 of file TRunInfo.cxx.
Referenced by ParseInputData().
|
static |
Definition at line 378 of file TRunInfo.cxx.
References TSingleton< TRunInfo >::Get(), and PrintToString().
|
static |
Writes Info File information to the tree
Definition at line 343 of file TRunInfo.cxx.
References fDetectorInformation, and TSingleton< TRunInfo >::Get().
Referenced by TAnalysisWriteLoop::Write(), and TFragWriteLoop::Write().
|
friend |
Definition at line 58 of file TRunInfo.h.
|
private |
!List of bad cycles to be used for cycle rejection
Definition at line 219 of file TRunInfo.h.
Referenced by AddBadCycle(), Clear(), IsBadCycle(), PrintBadCycles(), PrintToString(), and RemoveBadCycle().
|
private |
Definition at line 218 of file TRunInfo.h.
Referenced by AddBadCycle(), Clear(), and RemoveBadCycle().
|
private |
Definition at line 203 of file TRunInfo.h.
Referenced by GetCalFileData(), and SetCalFileData().
|
private |
Definition at line 202 of file TRunInfo.h.
Referenced by GetCalFileName(), and SetCalFileName().
|
staticprivate |
Definition at line 199 of file TRunInfo.h.
Referenced by ClearDate(), GetDate(), and SetDate().
|
private |
! pointer to detector specific information (set by each parser library)
Definition at line 221 of file TRunInfo.h.
Referenced by Clear(), GetDetectorInformation(), Print(), ReadInfoFromFile(), SetDetectorInformation(), TRunInfo(), and WriteToRoot().
|
private |
The first run number (for combined runs)
Definition at line 187 of file TRunInfo.h.
Referenced by Add(), and FirstRunNumber().
|
private |
The first sub run number (for combined subruns)
Definition at line 188 of file TRunInfo.h.
Referenced by Add(), and FirstSubRunNumber().
|
staticprivate |
Definition at line 198 of file TRunInfo.h.
Referenced by ClearFullVersion(), GetFullVersion(), and SetFullVersion().
|
private |
Definition at line 216 of file TRunInfo.h.
Referenced by Clear(), HPGeArrayPosition(), and SetHPGeArrayPosition().
|
private |
The last run number (for combined runs)
Definition at line 189 of file TRunInfo.h.
Referenced by Add(), and LastRunNumber().
|
private |
The last sub run number (for combined subruns)
Definition at line 190 of file TRunInfo.h.
Referenced by Add(), and LastSubRunNumber().
|
staticprivate |
Definition at line 200 of file TRunInfo.h.
Referenced by ClearLibraryVersion(), GetLibraryVersion(), and SetLibraryVersion().
|
private |
The comment on the run.
Definition at line 184 of file TRunInfo.h.
Referenced by RunComment(), and SetRunComment().
|
private |
Definition at line 213 of file TRunInfo.h.
Referenced by GetRunInfoFileData(), SetRunInfo(), and SetRunInfoFile().
|
private |
Definition at line 212 of file TRunInfo.h.
Referenced by GetRunInfoFileName(), and SetRunInfoFileName().
|
private |
Definition at line 195 of file TRunInfo.h.
Referenced by Add(), RunLength(), and SetRunLength().
|
private |
List of all runs added to this run info.
Definition at line 191 of file TRunInfo.h.
Referenced by Add(), and PrintRunList().
|
private |
The current run number.
Definition at line 185 of file TRunInfo.h.
Referenced by Add(), RunNumber(), and SetRunNumber().
|
private |
Definition at line 193 of file TRunInfo.h.
Referenced by Add(), RunStart(), SetRunLength(), and SetRunStart().
|
private |
Definition at line 194 of file TRunInfo.h.
Referenced by Add(), RunStop(), SetRunLength(), and SetRunStop().
|
private |
The title of the run.
Definition at line 183 of file TRunInfo.h.
Referenced by RunTitle(), and SetRunTitle().
|
private |
The current sub run number.
Definition at line 186 of file TRunInfo.h.
Referenced by Add(), SetSubRunNumber(), and SubRunNumber().
|
staticprivate |
Definition at line 197 of file TRunInfo.h.
Referenced by ClearVersion(), GetVersion(), and SetVersion().
|
private |
Definition at line 206 of file TRunInfo.h.
Referenced by GetXMLODBFileData(), and SetXMLODBFileData().
|
private |
Definition at line 205 of file TRunInfo.h.
Referenced by GetXMLODBFileName(), and SetXMLODBFileName().