Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tree/tree/inc/TTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ class TTree : public TNamed, public TAttLine, public TAttFill, public TAttMarker
* \brief Sets the default maximum number of lines to be shown before `<CR>` when calling Scan().
* \param n the maximum number of lines. Default=50, if 0, all entries of the Tree are shown
* and there is no need to press `<CR>` or `q` to exit the function.
* \see TTreePlayer::Scan for more details on how to redirect the output to an ASCII file
* \note See TTreePlayer::Scan for more details on how to redirect the output to an ASCII file
*/
virtual void SetScanField(Int_t n = 50) { fScanField = n; } // *MENU*
void SetTargetMemoryRatio(Float_t ratio) { fTargetMemoryRatio = ratio; }
Expand Down
6 changes: 3 additions & 3 deletions tree/tree/src/TTree.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ It is strongly recommended to persistify those as objects rather than lists of l
name of the leaf, but have no effect.) If no type is given, the
type of the variable is assumed to be the same as the previous
variable. If the first variable does not have a type, it is
assumed of type F by default. The list of currently supported
assumed of type `F` by default. The list of currently supported
types is given below:
- `C` : a character string terminated by the 0 character
- `B` : an 8 bit integer (`Char_t`); Mostly signed, might be unsigned in special platforms or depending on compiler flags, thus do not use std::int8_t as underlying variable since they are not equivalent; Treated as a character when in an array.
Expand Down Expand Up @@ -1968,7 +1968,7 @@ Int_t TTree::Branch(const char* foldername, Int_t bufsize /* = 32000 */, Int_t s
/// The variable type may be 0,1 or 2 characters. If no type is given,
/// the type of the variable is assumed to be the same as the previous
/// variable. If the first variable does not have a type, it is assumed
/// of type F by default. The list of currently supported types is given below:
/// of type `F` by default. The list of currently supported types is given below:
/// - `C` : a character string terminated by the 0 character
/// - `B` : an 8 bit integer (`Char_t`); Mostly signed, might be unsigned in special platforms or depending on compiler flags, thus do not use std::int8_t as underlying variable since they are not equivalent; Treated as a character when in an array.
/// - `b` : an 8 bit unsigned integer (`UChar_t`)
Expand Down Expand Up @@ -8264,7 +8264,7 @@ void TTree::ResetBranchAddresses()
/// \param firstentry first entry to scan
/// \param nentries total number of entries to scan (starting from firstentry). Defaults to all entries.
/// \note see TTree::SetScanField to control how many lines are printed between pagination breaks (Use 0 to disable pagination)
/// \see TTreePlayer::Scan
/// \see TTreePlayer::Scan, TTreePlayer::SetScanFileName, TTreePlayer::SetScanRedirect

Long64_t TTree::Scan(const char* varexp, const char* selection, Option_t* option, Long64_t nentries, Long64_t firstentry)
{
Expand Down
4 changes: 2 additions & 2 deletions tree/treeplayer/inc/TTreePlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class TTreePlayer : public TVirtualTreePlayer {
TSQLResult *Query(const char *varexp, const char *selection, Option_t *option
,Long64_t nentries, Long64_t firstentry) override;
void SetEstimate(Long64_t n) override;
void SetScanRedirect(bool on=false) {fScanRedirect = on;}
void SetScanFileName(const char *name) {fScanFileName=name;}
void SetScanRedirect(bool on=false) {fScanRedirect = on;} ///< Redirect Scan output to a text file
void SetScanFileName(const char *name) {fScanFileName=name;} ///< Set name of text file where Scan output will be dumped, if `SetScanRedirect(true)` was called
void SetTree(TTree *t) override {fTree = t;}
void StartViewer(Int_t ww, Int_t wh) override;
Int_t UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
Expand Down
12 changes: 11 additions & 1 deletion tree/treeplayer/src/TTreePlayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,17 @@ void TTreePlayer::RecursiveRemove(TObject *obj)
/// tree->Scan("*");
/// .>
/// ~~~
/// will create a file tree.log
/// will create a file `tree.log`
/// ### From a script
/// One could use TSystem::RedirectOutput, but it's cleaner to call:
/// ~~~{.cpp}
/// /// tree->SetScanField(0);
/// auto logname = TString(tree->GetName())+".log";
/// auto player = static_cast<TTreePlayer *>(tree->GetPlayer());
/// player->SetScanFileName(logname);
/// player->SetScanRedirect(true);
/// tree->Scan();
/// ~~~
///
/// Arrays (within an entry) are printed in their linear forms.
/// If several arrays with multiple dimensions are printed together,
Expand Down