13 #include "AIDA/IHistogram1D.h" 14 #include "AIDA/IHistogram2D.h" 15 #include "AIDA/IHistogram3D.h" 16 #include "AIDA/IProfile1D.h" 17 #include "AIDA/IProfile2D.h" 33 #include "boost/format.hpp" 47 static const std::string s_invalidLocation =
"<UNKNOWN LOCATION>" ;
51 (
const AIDA::IHistogram* aida )
53 if ( !aida ) {
return s_invalidLocation ; }
55 if ( !
object ) {
return s_invalidLocation ; }
57 if ( !registry ) {
return s_invalidLocation ; }
63 const AIDA::IHistogram1D* aida ,
68 (
const AIDA::IHistogram1D* aida ,
72 (
" ID=%|-25|%|30t| \"%|.45s|\" %|79t| Ents/All=%|5|/%|-5|<X>/sX=%|.5|/%|-.5|" ) ;
74 fmt % (aida->allEntries()-aida->extraEntries()) % aida->allEntries() ;
75 fmt % aida->mean() % aida->rms() ;
82 const AIDA::IHistogram2D* aida ,
87 (
const AIDA::IHistogram2D* aida ,
91 (
" ID=%|-25|%|30t| \"%|.45s|\" %|79t| Ents/All=%|5|/%|-5|<X>/sX=%|.5|/%|-.5|,<Y>/sY=%|.5|/%|-.5|" ) ;
93 fmt % (aida->allEntries()-aida->extraEntries()) % aida->allEntries() ;
94 fmt % aida->meanX() % aida->rmsX() ;
95 fmt % aida->meanY() % aida->rmsY() ;
102 const AIDA::IHistogram3D* aida ,
107 (
const AIDA::IHistogram3D* aida ,
111 (
" ID=%|-25|%|30t| \"%|.45s|\" %|79t| Ents/All=%|5|/%|-5|<X>/sX=%|.5|/%|-.5|,<Y>/sY=%|.5|/%|-.5|,<Z>/sZ=%|.5|/%|-.5|" ) ;
113 fmt % (aida->allEntries()-aida->extraEntries()) % aida->allEntries() ;
114 fmt % aida->meanX() % aida->rmsX() ;
115 fmt % aida->meanY() % aida->rmsY() ;
116 fmt % aida->meanZ() % aida->rmsZ() ;
123 const AIDA::IProfile1D* aida ,
128 (
const AIDA::IProfile1D* aida ,
132 (
" ID=%|-25|%|30t| \"%|.55s|\" %|79t| Ents/All=%|5|/%|-5|<X>/sX=%|.5|/%|-.5|" ) ;
134 fmt % (aida->allEntries()-aida->extraEntries()) % aida->allEntries() ;
135 fmt % aida->mean() % aida->rms() ;
142 const AIDA::IProfile2D* aida ,
147 (
const AIDA::IProfile2D* aida ,
151 (
" ID=%|-25|%|30t| \"%|.55s|\" %|79t| Ents/All=%|5|/%|-5|<X>/sX=%|.5|/%|-.5|,<Y>/sY=%|.5|/%|-.5|" );
153 fmt % (aida->allEntries()-aida->extraEntries()) % aida->allEntries() ;
154 fmt % aida->meanX() % aida->rmsX() ;
155 fmt % aida->meanY() % aida->rmsY() ;
181 for (
const auto& item : items )
183 if ( !item ) { continue ; }
184 if ( !str.
empty() ) { str +=
"," ; }
185 str += item->name() ;
186 if ( 0 != item->ndim() )
188 if ( item->hasIndex() ) { str +=
"/V" ; }
198 (
"Title=\"%|.39s|\" %|48t|#items=%|-3|%|50t|{%|.81s|}" ) ;
199 fmt % tuple->
title() ;
201 fmt % _print( tuple->
items() ) ;
static std::string print(const INTuple *tuple, const GaudiAlg::TupleID &ID)
Definition of the MsgStream class used to transmit messages.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
static std::string print(const StatEntity &stat, const std::string &tag)
static void print(MsgStream &stream, const AIDA::IHistogram3D *aida, const GaudiAlg::HistoID &ID)
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
static std::string toString(const AIDA::IHistogram1D *aida, const GaudiAlg::HistoID &ID)
static void print(MsgStream &stream, const AIDA::IProfile1D *aida, const GaudiAlg::HistoID &ID)
GAUDI_API std::string formatAsTableRow(const StatEntity &counter, const bool flag, const std::string &format1=" |%|7d| |%|11.7g| |%|#11.5g| |%|#10.5g| |%|#10.5g| |%|#10.5g| |", const std::string &format2="*|%|7d| |%|11.5g| |(%|#9.7g| +- %|-#8.6g|)%%| ----- | ----- |")
print the counter in a form of the table row
NTuple interface class definition.
virtual const id_type & identifier() const =0
Full identifier (or key)
static const std::string & location(const AIDA::IHistogram *aida)
The IRegistry represents the entry door to the environment any data object residing in a transient da...
collection of useful utilities to print certain objects (currently used for implementation in class G...
static std::string toString(const AIDA::IHistogram3D *aida, const GaudiAlg::HistoID &ID)
static void print(MsgStream &stream, const AIDA::IHistogram1D *aida, const GaudiAlg::HistoID &ID)
static void print(MsgStream &stream, const AIDA::IProfile2D *aida, const GaudiAlg::HistoID &ID)
GAUDI_API LiteralID idAsString() const
Return ID as string, for both numeric and literal IDs.
static void print(MsgStream &stream, const AIDA::IHistogram2D *aida, const GaudiAlg::HistoID &ID)
static std::string toString(const AIDA::IHistogram2D *aida, const GaudiAlg::HistoID &ID)
virtual ItemContainer & items()=0
Access item container.
static std::string toString(const AIDA::IProfile1D *aida, const GaudiAlg::HistoID &ID)
The basic counter used for Monitoring purposes.
A DataObject is the base class of any identifiable object on any data store.
virtual const std::string & title() const =0
Object title.
static std::string toString(const AIDA::IProfile2D *aida, const GaudiAlg::HistoID &ID)
ID class for Histogram and Ntuples.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.