Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
blob
master
A_N
Ana
AndersonAnalysisModules
AntiSigma
BBCStudy
Calo_Validation_Package
Calo_waveform_sim
Calorimeter
CalorimeterEmbedding
CalorimeterJets
cdbEMCalExample
cemcRecoAna
Centrality_Validation_Package
dNdEta_Run2023
EIC-IR
EIC-SynRad
EICAnalysis
EICMCAnalysis
EICTrigger
ElectronID
EMCal-analysis
EMCal-calibration
EMCal-commissioning
EMCal-LEDs
EMCal-position-dependent-calibration
EMCal-QA
EMCal_pi0_Calib_2023
EMCTemplateFitting
EpFinder
Event-Display
EventMix
FilterEvents
FilterEventsUpsilon
Fluence
ForwardCalo
ForwardTracking
FrawleyTrackEvalMacros
hbcup
HCal-analysis
HCalCosmicCalib
HCalHotTowerFinder
HCalib
HcalSingleHadronCalib
HF-Jet
HF-Particle
isoCluster
IsolatedTrackAnalysis
JS-Jet
Calibrations
FastJetMedianBkg
src_JetMedianTree
macro
loc_lib
JetIndicesMatcher.cc
JetIndicesMatcher.h
JetIndicesMatcher_bkup.cc
loc_lib.h
loc_libs.h
noi_fmt.h
noi_fnc.h
noiBinVec.h
noiDict.h
noiGetter.h
noiMsgTree.h
noiPads.h
noiPtrDbl.h
pAu_bins.h
pAu_bins_.h
plot
Fun4All_JetRhoMedian.C
Fun4All_RhoFluct.C
make_inp_lists.py
JetRhoMedian.cc
JetRhoMedian.h
PrintTowers.cc
PrintTowers.h
RhoFluct.cc
RhoFluct.h
FullJetFinder
HCalJetPhiShift
jet-kinematics-mc
JetAnalysis
JetBkgdSub
JetMultSub
JetNconstituents
JetRTrack
JetSeedCount
JetUESize-v2Psi2Centrality
JetUnderlyingEvent
JetValidation
RandomConeAna
TracksInJets
TruthJetTagging
mbdAnalysis
MBDStudy
MultiDetectorMultiplicity
MvtxTelescope
mybuild
ParticleID
PHFlowJetMaker
PhotonConversion
PhotonJet
pi0ClusterAna
pi0Efficiency
Pi0MassAnalysis
Prototype2
Prototype3
Prototype4
psTOF
pythiaEMCalAna
pythiaInfo
QuarkoniaBG
quickHIJING
ResonanceJetTaggingOutputs
runTrackingDiagnostics
Shift_emcal_g4hits
SimpleTrackingAnalysis
singlePhotonClusterAna
sPhenixAj
SvtxSimPerformanceCheckReco
TemplateCreation
Test
TowerInfoExample
TPC
TPC-ClusterAnimation
TPC-GemGain
Tracking
TrackPid
TreeMaker
ZDC-CALIB
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
noiMsgTree.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file noiMsgTree.h
1
#ifndef noiMsgTree__h
2
#define noiMsgTree__h
3
class
noiMsgTree
{
4
private
:
5
string
b_msg
;
6
TTree
tree
;
7
public
:
8
bool
echo_to_cout
{
false
};
9
noiMsgTree
(
bool
set_echo) :
10
b_msg
{
""
},
11
tree
{
"Messages"
,
"Tree of messages"
}
12
{
13
tree
.Branch(
"messages"
, &
b_msg
);
14
dash
();
15
msg
(
" Start of msg tree "
);
16
dash
();
17
echo_to_cout
= set_echo;
18
};
19
void
msg
(
string
msg
) {
20
b_msg
=
msg
;
21
if
(
echo_to_cout
) cout <<
b_msg
<< endl;
22
tree
.Fill();
23
};
24
void
msg
(vector<string> messages) {
25
for
(
auto
&
msg
: messages) {
26
b_msg
=
msg
;
27
if
(
echo_to_cout
) cout <<
b_msg
<< endl;
28
tree
.Fill();
29
}
30
};
31
void
dash
() {
32
b_msg
=
"---------------"
;
33
if
(
echo_to_cout
) cout <<
b_msg
<< endl;
34
tree
.Fill();
35
};
36
void
write
(){
37
tree
.Write();
38
};
39
static
void
read_messages
(
const
char
* f_name){
40
cout <<
" Reading file: "
<< f_name << endl;
41
/* TTree *tree; */
42
TFile* fin =
new
TFile(f_name,
"read"
);
43
if
(!fin->IsOpen()) {
44
cout <<
" Input file: "
<< f_name <<
" is not open."
<< endl;
45
delete
fin;
46
return
;
47
}
48
TTreeReader myReader(
"Messages"
,fin);
49
TTreeReaderValue<string>
msg
(myReader,
"messages"
);
50
cout <<
" Contents of TFile(\""
<<f_name<<
"\") TTree(\"Messages\"):"
<< endl;
51
while
(myReader.Next()) cout <<
" "
<< *msg << endl;
52
fin->Close();
53
delete
fin;
54
/* } */
55
};
56
void
slurp_file
(
const
char
* which_file) {
57
// try and read all lines of which_file into the tree
58
msg
(Form(
"--Begin contents of file \"%s\""
,which_file));
59
ifstream f_in {which_file};
60
if
(!f_in.is_open()) {
61
msg
(Form(
" error: couldn't open file \"%s\""
,which_file));
62
}
else
{
63
string
line
;
64
while
(getline(f_in,line))
msg
(line);
65
}
66
msg
(Form(
"--End contents of file \"%s\""
,which_file));
67
return
;
68
};
69
};
70
#endif
71
analysis
blob
master
JS-Jet
FastJetMedianBkg
src_JetMedianTree
macro
loc_lib
noiMsgTree.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:53
using
1.8.2 with
sPHENIX GitHub integration