|
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, typename = std::enable_if_t<std::is_base_of<GaudiHistoAlg, PBASE>::value, U>> |
| 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, typename = std::enable_if_t<std::is_base_of<GaudiHistoTool, PBASE>::value, U>> |
| 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...
|
|
|
template<typename... Ts> |
using | indexed_by = boost::multi_index::indexed_by< Ts... > |
|
template<typename... Ts> |
using | hashed_unique = boost::multi_index::hashed_unique< Ts... > |
|
template<typename... Ts> |
using | ordered_unique = boost::multi_index::ordered_unique< Ts... > |
|
template<typename Obj , typename Type , Type Obj::* Member> |
using | member = boost::multi_index::member< Obj, Type, Member > |
|
template<typename T > |
using | tag = boost::multi_index::tag< T > |
|
using | nTupleMap = boost::multi_index_container< nTupleMapItem, indexed_by< hashed_unique< tag< title_t >, member< nTupleMapItem, std::string,&nTupleMapItem::title >>, hashed_unique< tag< id_t >, member< nTupleMapItem, TupleID,&nTupleMapItem::id >>, ordered_unique< tag< order_t >, member< nTupleMapItem, TupleID,&nTupleMapItem::id >>>> |
|
|
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 |
|
nTupleMap | m_nTupleMap |
| the actual storage of ntuples by title and ID More...
|
|
nTupleMap | m_evtColMap |
| the actual storage of event collections by title and ID More...
|
|
template<class PBASE>
class GaudiTuples< PBASE >
Templated base class providing common 'ntupling' methods.
- Author
- Chris Jones Chris.nosp@m.toph.nosp@m.er.Ro.nosp@m.b.Jo.nosp@m.nes@c.nosp@m.ern..nosp@m.ch
-
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
- Date
- 2005-08-08
Definition at line 43 of file GaudiTuples.h.
Access an Event Tag Collection object (book on-demand) with unique identifier.
tuple->column(
"A" ,
sin(0.1) );
tuple->column(
"B" ,
cos(0.1) );
tuple->column(
"C" ,
tan(0.1) );
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.
- Parameters
-
title | Unique title for Event Tag Collection |
clid | N-Tuple class identifier (row or column wise) |
- Returns
- ntuple The Event Tag Collection object
Definition at line 151 of file GaudiTuples.icpp.
154 auto&
m = evtColByTitle();
155 auto tuple =
m.find( title );
156 if ( tuple !=
m.end() )
return Tuple( tuple->tuple );
159 if ( this->useNumericAutoIDs() || title.
empty() ) {
160 if ( !this->useNumericAutoIDs() ) {
162 "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for evtCol ID",
170 ID =
TupleID( ID.numeric() + 1 );
174 ID =
TupleID( this->convertTitleToID( title ) );
177 ID =
TupleID( ID.idAsString() +
"_" );
181 return evtCol( ID, title, clid );
nTupleMap m_evtColMap
the actual storage of event collections by title and ID
bool nTupleExists(const TupleID &ID) const
check the existence AND validity of the N-Tuple with the given ID
Tuples::Tuple Tuple
the actual type of the tuple
Tuple evtCol(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an Event Tag Collection object (book on-demand) with unique identifier.
GaudiAlg::TupleID TupleID
the actual type of N-tuple ID
bool evtColExists(const TupleID &ID) const
check the existence AND validity of the Event Tag Collection with the given ID
constexpr static const auto SUCCESS
TupleID::NumericID evtColOffSet() const
get the value for Event Tag Collection offset (property "EvtColsOffSet")