The Gaudi Framework
v29r0 (ff2e7097)
|
Templated base class providing common 'ntupling' methods. More...
#include <GaudiAlg/GaudiTuples.h>
Public Types | |
typedef GaudiAlg::HistoID | HistoID |
the actual type for histogram identifier More... | |
typedef Tuples::Tuple | Tuple |
the actual type of the tuple More... | |
typedef GaudiAlg::TupleID | TupleID |
the actual type of N-tuple ID More... | |
typedef GaudiAlg::TupleMapTitle | TupleMapTitle |
the actual type of (title) -> (tuple) mappping More... | |
typedef GaudiAlg::TupleMapID | TupleMapID |
the actual type of (Numeric ID) -> (tuple) mappping More... | |
Public Member Functions | |
Tuple | nTuple (const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an N-Tuple object (book on-demand) with unique identifier. More... | |
Tuple | nTuple (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an N-Tuple object (book on-demand) with forced identifier. More... | |
Tuple | evtCol (const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an Event Tag Collection object (book on-demand) with unique identifier. More... | |
Tuple | evtCol (const TupleID &ID, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const |
Access an Event Tag Collection object (book on-demand) with forced identifier. More... | |
bool | produceNTuples () const |
get the flag for N-Tuple production (property "NTupleProduce") More... | |
bool | splitNTupleDir () const |
get the flag for N-Tuple path split (property "NTupleSplitDir") More... | |
const std::string & | nTupleLUN () const |
get the logical unit for N-Tuples (property "NTupleLUN") More... | |
const std::string & | nTupleTopDir () const |
get the top-level N-Tuple directory (property "NTupleTopDir") More... | |
const std::string & | nTupleDir () const |
get the N-Tuple directory (property "NTupleDir") More... | |
TupleID::NumericID | nTupleOffSet () const |
get the value for N-Tuple offset (property "NTupleOffSet") More... | |
std::string | nTuplePath () const |
get the constructed N-Tuple path More... | |
bool | produceEvtCols () const |
get the flag for Event Tag Collection production (property "EvtColsProduce") More... | |
bool | splitEvtColDir () const |
get the flag for Event Tag Collection path split (property "EvtColsSplitDir") More... | |
const std::string & | evtColLUN () const |
get the logical unit for Event Tag Collections (property "EvtColsLUN") More... | |
const std::string & | evtColTopDir () const |
get the top-level Event Tag Collection directory (property "EvtColsTopDir") More... | |
const std::string & | evtColDir () const |
get the Event Tag Collection directory (property "EvtColsDir") More... | |
TupleID::NumericID | evtColOffSet () const |
get the value for Event Tag Collection offset (property "EvtColsOffSet") More... | |
std::string | evtColPath () const |
get the constructed Event Tag Collection path More... | |
bool | tuplesPrint () const |
print tuples at finalization More... | |
bool | evtColsPrint () const |
print event collections at finalization More... | |
long | printTuples () const |
perform the actual printout of N-tuples More... | |
long | printEvtCols () const |
perform the actual printout of Event Tag Collections More... | |
bool | nTupleExists (const TupleID &ID) const |
check the existence AND validity of the N-Tuple with the given ID More... | |
bool | evtColExists (const TupleID &ID) const |
check the existence AND validity of the Event Tag Collection with the given ID More... | |
template<typename U = PBASE, class = typename std::enable_if<std::is_base_of<GaudiHistoAlg, PBASE>::value, U>::type> | |
GaudiTuples (const std::string &name, ISvcLocator *pSvcLocator) | |
Algorithm constructor - the SFINAE constraint below ensures that this is constructor is only defined if PBASE derives from GaudiHistoAlg. More... | |
template<typename U = PBASE, class = typename std::enable_if<std::is_base_of<GaudiHistoTool, PBASE>::value, U>::type> | |
GaudiTuples (const std::string &type, const std::string &name, const IInterface *parent) | |
Tool constructor - SFINAE-ed to insure this constructor is only defined if PBASE derives from AlgTool. More... | |
~GaudiTuples () override=default | |
Destructor. More... | |
Protected Member Functions | |
const TupleMapTitle & | nTupleMapTitle () const |
access to the all ntuples by title More... | |
const TupleMapTitle & | evtColMapTitle () const |
access to the all evet tag collections by title More... | |
const TupleMapID & | nTupleMapID () const |
access to the all ntuples by numeric ID More... | |
const TupleMapID & | evtColMapID () const |
access to the all evet tag collections by numeric ID More... | |
virtual Tuples::TupleObj * | createNTuple (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const |
create TupleObj More... | |
virtual Tuples::TupleObj * | createEvtCol (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const |
create TupleObj for event tag collection More... | |
StatusCode | initialize () override |
standard initialization method More... | |
StatusCode | finalize () override |
standard finalization method More... | |
Private Member Functions | |
void | initGaudiTuplesConstructor () |
Constructor initialization and job options. More... | |
void | printNTupleHandler (Gaudi::Details::PropertyBase &) |
handler for "NTuplePrint" property More... | |
void | printEvtColHandler (Gaudi::Details::PropertyBase &) |
handler for "EvtColsPrint" property More... | |
Private Attributes | |
Gaudi::Property< bool > | m_produceNTuples {this, "NTupleProduce", true, "general switch to enable/disable N-tuples"} |
Gaudi::Property< bool > | m_tuplesPrint {this, "NTuplePrint", true, "print N-tuple statistics"} |
Gaudi::Property< bool > | m_splitNTupleDir |
Gaudi::Property< TupleID::NumericID > | m_nTupleOffSet {this, "NTupleOffSet", 0, "offset for numerical N-tuple ID"} |
Gaudi::Property< std::string > | m_nTupleLUN {this, "NTupleLUN", "FILE1", "Logical File Unit for N-tuples"} |
Gaudi::Property< std::string > | m_nTupleTopDir {this, "NTupleTopDir", "", "top-level directory for N-Tuples"} |
Gaudi::Property< std::string > | m_nTupleDir |
Gaudi::Property< bool > | m_produceEvtCols |
Gaudi::Property< bool > | m_evtColsPrint {this, "EvtColsPrint", false, "print statistics for Event Tag Collections "} |
Gaudi::Property< bool > | m_splitEvtColDir {this, "EvtColSplitDir", false, "split long directory names into short pieces"} |
Gaudi::Property< TupleID::NumericID > | m_evtColOffSet {this, "EvtColOffSet", 0, "offset for numerical N-tuple ID"} |
Gaudi::Property< std::string > | m_evtColLUN {this, "EvtColLUN", "EVTCOL", "Logical File Unit for Event Tag Collections"} |
Gaudi::Property< std::string > | m_evtColTopDir |
Gaudi::Property< std::string > | m_evtColDir |
TupleMapTitle | m_nTupleMapTitle |
the actual storage of ntuples by title More... | |
TupleMapID | m_nTupleMapID |
the actual storage of ntuples by ID More... | |
TupleMapTitle | m_evtColMapTitle |
the actual storage of event collections by title More... | |
TupleMapID | m_evtColMapID |
the actual storage of event collections by ID More... | |
Templated base class providing common 'ntupling' methods.
Definition at line 39 of file GaudiTuples.h.
typedef GaudiAlg::HistoID GaudiTuples< PBASE >::HistoID |
the actual type for histogram identifier
Definition at line 44 of file GaudiTuples.h.
typedef Tuples::Tuple GaudiTuples< PBASE >::Tuple |
the actual type of the tuple
Definition at line 46 of file GaudiTuples.h.
typedef GaudiAlg::TupleID GaudiTuples< PBASE >::TupleID |
the actual type of N-tuple ID
Definition at line 48 of file GaudiTuples.h.
typedef GaudiAlg::TupleMapID GaudiTuples< PBASE >::TupleMapID |
the actual type of (Numeric ID) -> (tuple) mappping
Definition at line 52 of file GaudiTuples.h.
typedef GaudiAlg::TupleMapTitle GaudiTuples< PBASE >::TupleMapTitle |
the actual type of (title) -> (tuple) mappping
Definition at line 50 of file GaudiTuples.h.
|
inline |
Algorithm constructor - the SFINAE constraint below ensures that this is constructor is only defined if PBASE derives from GaudiHistoAlg.
Definition at line 289 of file GaudiTuples.h.
|
inline |
Tool constructor - SFINAE-ed to insure this constructor is only defined if PBASE derives from AlgTool.
Definition at line 296 of file GaudiTuples.h.
|
overridedefault |
Destructor.
|
protectedvirtual |
create TupleObj for event tag collection
name | name/title |
tuple | the underlying ntuple implementation |
clid | unique classID for ntuple |
Definition at line 347 of file GaudiTuples.icpp.
|
protectedvirtual |
create TupleObj
name | name/title |
tuple | the underlying ntuple implementation |
clid | unique classID for ntuple |
Definition at line 336 of file GaudiTuples.icpp.
Tuples::Tuple GaudiTuples< PBASE >::evtCol | ( | const std::string & | title, |
const CLID & | clid = CLID_ColumnWiseTuple |
||
) | const |
Access an Event Tag Collection object (book on-demand) with unique identifier.
The Event Tag Collection will get a unique identifier automatically assigned which by default will be equal to the histogram title. An option exists to instead use numerical IDs. In this case the first Event Tag Collection booked will be ID=1 the next ID=2 and so on. Note though this scheme is not recommended as it does NOT guarantee predictability of the ID a given Event Tag Collection will be given when filled under conditional statements, since in these circumstances the order in which the Event Tag Collection are first filled, and thus booked, will depend on the nature of the first few events read. This is particularly problematic when users submit many parallel 'sub-jobs' and then attempt to merge the final output ROOT (or HBOOK) files, since a given Event Tag Collection could have different IDs in each of the sub-jobs. Consequently it is strongly recommended that users do not use numerical automatic IDs unless they are sure they understand what they are doing.
title | Unique title for Event Tag Collection |
clid | N-Tuple class identifier (row or column wise) |
Definition at line 184 of file GaudiTuples.icpp.
Tuples::Tuple GaudiTuples< PBASE >::evtCol | ( | const TupleID & | ID, |
const std::string & | title, | ||
const CLID & | clid = CLID_ColumnWiseTuple |
||
) | const |
Access an Event Tag Collection object (book on-demand) with forced identifier.
ID | The forced Event Tag Collection ID |
title | Unique title for Event Tag Collection |
clid | N-Tuple class identifier (row or column wise) |
Definition at line 278 of file GaudiTuples.icpp.
|
inline |
get the Event Tag Collection directory (property "EvtColsDir")
Definition at line 226 of file GaudiTuples.h.
bool GaudiTuples< PBASE >::evtColExists | ( | const TupleID & | ID | ) | const |
check the existence AND validity of the Event Tag Collection with the given ID
Definition at line 419 of file GaudiTuples.icpp.
|
inline |
get the logical unit for Event Tag Collections (property "EvtColsLUN")
Definition at line 222 of file GaudiTuples.h.
|
inlineprotected |
access to the all evet tag collections by numeric ID
Definition at line 263 of file GaudiTuples.h.
|
inlineprotected |
access to the all evet tag collections by title
Definition at line 259 of file GaudiTuples.h.
|
inline |
get the value for Event Tag Collection offset (property "EvtColsOffSet")
Definition at line 228 of file GaudiTuples.h.
std::string GaudiTuples< PBASE >::evtColPath | ( | ) | const |
get the constructed Event Tag Collection path
Definition at line 464 of file GaudiTuples.icpp.
|
inline |
|
inline |
get the top-level Event Tag Collection directory (property "EvtColsTopDir")
Definition at line 224 of file GaudiTuples.h.
|
overrideprotected |
standard finalization method
Definition at line 111 of file GaudiTuples.icpp.
|
inlineprivate |
Constructor initialization and job options.
Definition at line 332 of file GaudiTuples.h.
|
overrideprotected |
standard initialization method
Definition at line 66 of file GaudiTuples.icpp.
Tuples::Tuple GaudiTuples< PBASE >::nTuple | ( | const std::string & | title, |
const CLID & | clid = CLID_ColumnWiseTuple |
||
) | const |
Access an N-Tuple object (book on-demand) with unique identifier.
title | Unique title for N-Tuple |
clid | N-Tuple class identifier (row or column wise) |
Definition at line 146 of file GaudiTuples.icpp.
Tuples::Tuple GaudiTuples< PBASE >::nTuple | ( | const TupleID & | ID, |
const std::string & | title, | ||
const CLID & | clid = CLID_ColumnWiseTuple |
||
) | const |
Access an N-Tuple object (book on-demand) with forced identifier.
ID | The forced N-Tuple ID |
title | Unique title for N-Tuple |
clid | N-Tuple class identifier (row or column wise) |
Definition at line 222 of file GaudiTuples.icpp.
|
inline |
bool GaudiTuples< PBASE >::nTupleExists | ( | const TupleID & | ID | ) | const |
check the existence AND validity of the N-Tuple with the given ID
Definition at line 411 of file GaudiTuples.icpp.
|
inline |
get the logical unit for N-Tuples (property "NTupleLUN")
Definition at line 208 of file GaudiTuples.h.
|
inlineprotected |
access to the all ntuples by numeric ID
Definition at line 261 of file GaudiTuples.h.
|
inlineprotected |
access to the all ntuples by title
Definition at line 257 of file GaudiTuples.h.
|
inline |
get the value for N-Tuple offset (property "NTupleOffSet")
Definition at line 214 of file GaudiTuples.h.
std::string GaudiTuples< PBASE >::nTuplePath | ( | ) | const |
get the constructed N-Tuple path
Definition at line 455 of file GaudiTuples.icpp.
|
inline |
get the top-level N-Tuple directory (property "NTupleTopDir")
Definition at line 210 of file GaudiTuples.h.
|
private |
handler for "EvtColsPrint" property
Definition at line 441 of file GaudiTuples.icpp.
long GaudiTuples< PBASE >::printEvtCols | ( | ) | const |
perform the actual printout of Event Tag Collections
Definition at line 384 of file GaudiTuples.icpp.
|
private |
handler for "NTuplePrint" property
Definition at line 427 of file GaudiTuples.icpp.
long GaudiTuples< PBASE >::printTuples | ( | ) | const |
perform the actual printout of N-tuples
Definition at line 356 of file GaudiTuples.icpp.
|
inline |
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition at line 218 of file GaudiTuples.h.
|
inline |
get the flag for N-Tuple production (property "NTupleProduce")
Definition at line 204 of file GaudiTuples.h.
|
inline |
get the flag for Event Tag Collection path split (property "EvtColsSplitDir")
Definition at line 220 of file GaudiTuples.h.
|
inline |
get the flag for N-Tuple path split (property "NTupleSplitDir")
Definition at line 206 of file GaudiTuples.h.
|
inline |
|
private |
Definition at line 365 of file GaudiTuples.h.
|
private |
Definition at line 362 of file GaudiTuples.h.
|
mutableprivate |
the actual storage of event collections by ID
Definition at line 377 of file GaudiTuples.h.
|
mutableprivate |
the actual storage of event collections by title
Definition at line 375 of file GaudiTuples.h.
|
private |
Definition at line 361 of file GaudiTuples.h.
|
private |
Definition at line 359 of file GaudiTuples.h.
|
private |
Definition at line 363 of file GaudiTuples.h.
|
private |
Definition at line 354 of file GaudiTuples.h.
|
private |
Definition at line 352 of file GaudiTuples.h.
|
mutableprivate |
the actual storage of ntuples by ID
Definition at line 372 of file GaudiTuples.h.
|
mutableprivate |
the actual storage of ntuples by title
Definition at line 370 of file GaudiTuples.h.
|
private |
Definition at line 351 of file GaudiTuples.h.
|
private |
Definition at line 353 of file GaudiTuples.h.
|
private |
Definition at line 357 of file GaudiTuples.h.
|
private |
Definition at line 347 of file GaudiTuples.h.
|
private |
Definition at line 360 of file GaudiTuples.h.
|
private |
Definition at line 349 of file GaudiTuples.h.
|
private |
Definition at line 348 of file GaudiTuples.h.