updated the docu and removed unused DrawHeader.
This commit is contained in:
95
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
95
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
@@ -335,6 +335,8 @@ void TMusrRunHeader::CleanUp()
|
||||
* it, if it is already present.
|
||||
*
|
||||
* \param folder to be filled
|
||||
*
|
||||
* \return true on success
|
||||
*/
|
||||
Bool_t TMusrRunHeader::FillFolder(TFolder *folder)
|
||||
{
|
||||
@@ -405,6 +407,8 @@ Bool_t TMusrRunHeader::FillFolder(TFolder *folder)
|
||||
* it, if it is already present.
|
||||
*
|
||||
* \param dir to be filled
|
||||
*
|
||||
* \return true in success
|
||||
*/
|
||||
Bool_t TMusrRunHeader::FillDirectory(TDirectory *dir)
|
||||
{
|
||||
@@ -467,9 +471,9 @@ Bool_t TMusrRunHeader::FillDirectory(TDirectory *dir)
|
||||
/**
|
||||
* <p>Get type of path-name, e.g. RunInfo/Sample Name.
|
||||
*
|
||||
* @param pathName path-name for which the type is requested
|
||||
* \param pathName path-name for which the type is requested
|
||||
*
|
||||
* @return the type, or 'undef' if path-name is not found.
|
||||
* \return the type, or 'undef' if path-name is not found.
|
||||
*/
|
||||
TString TMusrRunHeader::GetTypeOfPath(TString pathName)
|
||||
{
|
||||
@@ -923,7 +927,9 @@ void TMusrRunHeader::Set(TString pathName, TDoubleVector value)
|
||||
* <p>Reads all data from an open ROOT-file structure and feeds all the necessary
|
||||
* internal data objects.
|
||||
*
|
||||
* \param folder
|
||||
* \param folder top folder 'RunHeader'.
|
||||
*
|
||||
* \return true on success
|
||||
*/
|
||||
Bool_t TMusrRunHeader::ExtractAll(TFolder *folder)
|
||||
{
|
||||
@@ -947,7 +953,9 @@ Bool_t TMusrRunHeader::ExtractAll(TFolder *folder)
|
||||
* <p>Reads all data from an open ROOT-file structure and feeds all the necessary
|
||||
* internal data objects.
|
||||
*
|
||||
* \param dir
|
||||
* \param dir TDirectory object. The top one will be 'RunHeader'.
|
||||
*
|
||||
* \return true on success.
|
||||
*/
|
||||
Bool_t TMusrRunHeader::ExtractAll(TDirectory *dir)
|
||||
{
|
||||
@@ -957,7 +965,6 @@ Bool_t TMusrRunHeader::ExtractAll(TDirectory *dir)
|
||||
|
||||
// clean up all internal structures - just in case this is called multiple times
|
||||
if (dir->GetName() == "RunHeader") {
|
||||
std::cout << "as35> dir->GetName()=" << dir->GetName() << std::endl;
|
||||
CleanUp();
|
||||
}
|
||||
|
||||
@@ -982,10 +989,12 @@ std::cout << "as35> dir->GetName()=" << dir->GetName() << std::endl;
|
||||
// ExtractHeaderInformationData (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
* <p>Extract the header information data and fills the corresponing objects.
|
||||
*
|
||||
* \param headerData
|
||||
* \param requestedPath
|
||||
* \param headerData encoded header data.
|
||||
* \param requestedPath corresponding TFolder/TDiretory path.
|
||||
*
|
||||
* \return true on success
|
||||
*/
|
||||
Bool_t TMusrRunHeader::ExtractHeaderInformationData(TObjString *headerData, TString requestedPath)
|
||||
{
|
||||
@@ -1188,10 +1197,12 @@ Bool_t TMusrRunHeader::ExtractHeaderInformationData(TObjString *headerData, TStr
|
||||
// ExtractHeaderInformation (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
* <p>TFolder releated routine needed to recursively decode the header information.
|
||||
*
|
||||
* \param headerInfo
|
||||
* \param requestedPath
|
||||
* \param headerInfo header info object. It is either a TObjArray or a data object.
|
||||
* \param requestedPath corresponding TFolder/TDiretory path.
|
||||
*
|
||||
* \return true on success
|
||||
*/
|
||||
Bool_t TMusrRunHeader::ExtractHeaderInformation(TObjArray *headerInfo, TString requestedPath)
|
||||
{
|
||||
@@ -1223,7 +1234,7 @@ Bool_t TMusrRunHeader::ExtractHeaderInformation(TObjArray *headerInfo, TString r
|
||||
// DumpHeader (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
* <p>Dumps the header informaton onto the stdout.
|
||||
*/
|
||||
void TMusrRunHeader::DumpHeader()
|
||||
{
|
||||
@@ -1376,29 +1387,6 @@ void TMusrRunHeader::DumpHeader()
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// DrawHeader (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
*/
|
||||
void TMusrRunHeader::DrawHeader()
|
||||
{
|
||||
std::unique_ptr<TPaveText> pt;
|
||||
std::unique_ptr<TCanvas> ca;
|
||||
|
||||
ca = std::make_unique<TCanvas>("MusrRoot RunHeader","MusrRoot RunHeader", 147,37,699,527);
|
||||
ca->Range(0., 0., 100., 100.);
|
||||
|
||||
pt = std::make_unique<TPaveText>(10.,10.,90.,90.,"br");
|
||||
pt->SetFillColor(19);
|
||||
pt->SetTextAlign(12);
|
||||
|
||||
pt->Draw();
|
||||
|
||||
ca->Modified(kTRUE);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetDecimalPlace (private)
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -1407,6 +1395,9 @@ void TMusrRunHeader::DrawHeader()
|
||||
* the first decimal place found will be returned.
|
||||
*
|
||||
* \param val value from which the first significant digit shall be determined
|
||||
*
|
||||
* \return If val > 1.0, the function will return 0, otherwise
|
||||
* the first decimal place found will be returned.
|
||||
*/
|
||||
UInt_t TMusrRunHeader::GetDecimalPlace(Double_t val)
|
||||
{
|
||||
@@ -1432,6 +1423,8 @@ UInt_t TMusrRunHeader::GetDecimalPlace(Double_t val)
|
||||
* <p>returns the number of significant digits
|
||||
*
|
||||
* \param val value from which the lowest significant digit shall be determined
|
||||
*
|
||||
* \return returns the number of significant digits
|
||||
*/
|
||||
UInt_t TMusrRunHeader::GetLeastSignificantDigit(Double_t val) const
|
||||
{
|
||||
@@ -1484,6 +1477,8 @@ void TMusrRunHeader::SplitPathName(TString pathName, TString &path, TString &nam
|
||||
* <p>extracts form the run header line, as written to the MusrROOT file, the run header label, e.g. Run Number.
|
||||
*
|
||||
* \param str runHeader string as written to the MusrROOT file.
|
||||
*
|
||||
* \return run header label extracted from the encoded runHeader string
|
||||
*/
|
||||
TString TMusrRunHeader::GetLabel(TString str)
|
||||
{
|
||||
@@ -1516,6 +1511,8 @@ TString TMusrRunHeader::GetLabel(TString str)
|
||||
* <p>extracts form the run header line, as written to the MusrROOT file, the run header str value, e.g. 557 (for Run Number).
|
||||
*
|
||||
* \param str runHeader string as written to the MusrROOT file.
|
||||
*
|
||||
* \return string value extracted from the encoded runHeader string
|
||||
*/
|
||||
TString TMusrRunHeader::GetStrValue(TString str)
|
||||
{
|
||||
@@ -1548,6 +1545,8 @@ TString TMusrRunHeader::GetStrValue(TString str)
|
||||
* <p>extracts form the run header line, as written to the MusrROOT file, the encoded type and retruns it.
|
||||
*
|
||||
* \param str runHeader string with encoded type
|
||||
*
|
||||
* \return type value extracted from the encoded runHeader string. If not found it will have the value 'n/a'.
|
||||
*/
|
||||
TString TMusrRunHeader::GetType(TString str)
|
||||
{
|
||||
@@ -1612,12 +1611,10 @@ TString TMusrRunHeader::GetType(TString str)
|
||||
/**
|
||||
* <p>Update folder structure
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - true if everything is all right
|
||||
* - false otherwise
|
||||
*
|
||||
* \param treeObj to be updated
|
||||
* \param path to be added within 'treeObj'
|
||||
*
|
||||
* \return true on success
|
||||
*/
|
||||
bool TMusrRunHeader::UpdateFolder(TObject *treeObj, TString path)
|
||||
{
|
||||
@@ -1662,7 +1659,7 @@ bool TMusrRunHeader::UpdateFolder(TObject *treeObj, TString path)
|
||||
*
|
||||
* \param dir top directory pointer
|
||||
*
|
||||
* \return true on success, false otherwise
|
||||
* \return true on success
|
||||
*/
|
||||
bool TMusrRunHeader::UpdateDirTree(TDirectory *topdir)
|
||||
{
|
||||
@@ -1704,12 +1701,10 @@ bool TMusrRunHeader::UpdateDirTree(TDirectory *topdir)
|
||||
/**
|
||||
* <p>Check if 'path' is present in 'treeObj'
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - pointer to the 'path' object if present
|
||||
* - otherwise return 0
|
||||
*
|
||||
* \param treeObj to be searched
|
||||
* \param path searched for within 'treeObj'
|
||||
*
|
||||
* \return pointer to the 'path' object if present, otherwise return nullptr
|
||||
*/
|
||||
TObject* TMusrRunHeader::FindObject(TObject *treeObj, TString path)
|
||||
{
|
||||
@@ -1740,9 +1735,11 @@ TObject* TMusrRunHeader::FindObject(TObject *treeObj, TString path)
|
||||
// GetHeaderString (private)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
* <p>Encodes the header information into the MusrRoot header line in the file.
|
||||
*
|
||||
* \param pathName
|
||||
* \param idx absolut index of the header string.
|
||||
*
|
||||
* \return TObjString with the encoded header information if idx is found, 'n/a' otherwise.
|
||||
*/
|
||||
TObjString TMusrRunHeader::GetHeaderString(UInt_t idx)
|
||||
{
|
||||
@@ -1894,6 +1891,8 @@ TObjString TMusrRunHeader::GetHeaderString(UInt_t idx)
|
||||
*
|
||||
* \param str string to be truncated
|
||||
* \param splitter the start of the string up to the splitter character removed
|
||||
*
|
||||
* \return true on success
|
||||
*/
|
||||
bool TMusrRunHeader::RemoveFirst(TString &str, const char splitter)
|
||||
{
|
||||
@@ -1917,10 +1916,10 @@ bool TMusrRunHeader::RemoveFirst(TString &str, const char splitter)
|
||||
*
|
||||
* <p>If splitter is <b>not</b> present in str the original str is returned.
|
||||
*
|
||||
* <p><b>return:</b> first part of up to the splitter in struct
|
||||
*
|
||||
* \param str
|
||||
* \param splitter
|
||||
*
|
||||
* \return first part of up to the splitter in struct
|
||||
*/
|
||||
TString TMusrRunHeader::GetFirst(TString &str, const char splitter)
|
||||
{
|
||||
|
||||
1
src/external/MusrRoot/TMusrRunHeader.h
vendored
1
src/external/MusrRoot/TMusrRunHeader.h
vendored
@@ -158,7 +158,6 @@ public:
|
||||
virtual void Set(TString pathName, TDoubleVector value);
|
||||
|
||||
virtual void DumpHeader();
|
||||
virtual void DrawHeader();
|
||||
|
||||
private:
|
||||
bool fQuiet;
|
||||
|
||||
Reference in New Issue
Block a user