| The Gaudi Framework v32r1 (f65d50dc)

Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
GaudiTuples< PBASE > Class Template Reference

Templated base class providing common 'ntupling' methods. More...

`#include <GaudiAlg/GaudiTuples.h>`

Inheritance diagram for GaudiTuples< PBASE >:
[legend]
Collaboration diagram for GaudiTuples< PBASE >:
[legend]

## Classes
struct | id_t
struct | nTupleMapItem
struct | order_t
struct | title_t

## 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...

## 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, typename = std::enable_if_t<std::is_base_of_v<GaudiHistoAlg, PBASE>, 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_v<GaudiHistoTool, PBASE>, 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...

## Protected Member Functions
virtual std::unique_ptr< Tuples::TupleObj > | createNTuple (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
| create TupleObj More...
virtual std::unique_ptr< 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 Types
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 > >> >

## Private Attributes
Gaudi::Property< bool > | m_produceNTuples {this, "NTupleProduce", true, "general switch to enable/disable N-tuples"}
Gaudi::Property< bool > | m_tuplesPrint
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
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...

## Detailed Description

### 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.

## Member Typedef Documentation

## ◆ hashed_unique

template<class PBASE>
template<typename... Ts>

using GaudiTuples< PBASE >::hashed_unique = boost::multi_index::hashed_unique<Ts...>
| private

Definition at line 357 of file GaudiTuples.h.

## ◆ HistoID

template<class PBASE>

typedef GaudiAlg::HistoID GaudiTuples< PBASE >::HistoID

the actual type for histogram identifier

Definition at line 47 of file GaudiTuples.h.

## ◆ indexed_by

template<class PBASE>
template<typename... Ts>

using GaudiTuples< PBASE >::indexed_by = boost::multi_index::indexed_by<Ts...>
| private

Definition at line 355 of file GaudiTuples.h.

## ◆ member

template<class PBASE>
template<typename Obj , typename Type , Type Obj::* Member>

using GaudiTuples< PBASE >::member = boost::multi_index::member<Obj, Type, Member>
| private

Definition at line 361 of file GaudiTuples.h.

## ◆ nTupleMap

template<class PBASE>

using GaudiTuples< PBASE >::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> >> >
| private

Definition at line 367 of file GaudiTuples.h.

## ◆ ordered_unique

template<class PBASE>
template<typename... Ts>

using GaudiTuples< PBASE >::ordered_unique = boost::multi_index::ordered_unique<Ts...>
| private

Definition at line 359 of file GaudiTuples.h.

## ◆ tag

template<class PBASE>
template<typename T >

using GaudiTuples< PBASE >::tag = boost::multi_index::tag<T>
| private

Definition at line 363 of file GaudiTuples.h.

## ◆ Tuple

template<class PBASE>

typedef Tuples::Tuple GaudiTuples< PBASE >::Tuple

the actual type of the tuple

Definition at line 49 of file GaudiTuples.h.

## ◆ TupleID

template<class PBASE>

typedef GaudiAlg::TupleID GaudiTuples< PBASE >::TupleID

the actual type of N-tuple ID

Definition at line 51 of file GaudiTuples.h.

## Constructor & Destructor Documentation

## ◆ GaudiTuples() [1/2]

template<class PBASE>
template<typename U = PBASE, typename = std::enable_if_t<std::is_base_of_v<GaudiHistoAlg, PBASE>, U>>

GaudiTuples< PBASE >::GaudiTuples | ( | const std::string & | name,
|  | ISvcLocator * | pSvcLocator
| ) |  |
| inline

Algorithm constructor - the SFINAE constraint below ensures that this is constructor is only defined if PBASE derives from GaudiHistoAlg.

Definition at line 277 of file GaudiTuples.h.

277 : PBASE( name, pSvcLocator ) {}
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41

## ◆ GaudiTuples() [2/2]

template<class PBASE>
template<typename U = PBASE, typename = std::enable_if_t<std::is_base_of_v<GaudiHistoTool, PBASE>, U>>

GaudiTuples< PBASE >::GaudiTuples | ( | const std::string & | type,
|  | const std::string & | name,
|  | const IInterface * | parent
| ) |  |
| inline

Tool constructor - SFINAE-ed to insure this constructor is only defined if PBASE derives from AlgTool.

Definition at line 281 of file GaudiTuples.h.

282 : PBASE( type, name, parent ) {}
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
gaudirun.type
type
Definition: gaudirun.py:142

## Member Function Documentation

## ◆ createEvtCol()

template<class PBASE >

std::unique_ptr< Tuples::TupleObj > GaudiTuples< PBASE >::createEvtCol | ( | const std::string & | name,
|  | NTuple::Tuple * | tuple,
|  | const CLID & | clid
| ) |  | const
| protected virtual

create TupleObj for event tag collection

Attention
  The method should never used directly by users

Parameters

  name | name/title
  tuple | the underlying ntuple implementation
  clid | unique classID for ntuple

Returns
  pointer to newly created TupelObj

Definition at line 281 of file GaudiTuples.icpp.

282 {
283 return Tuples::createTupleObj( this, "EvtCol '" + name + "'", tuple, clid, Tuples::EVTCOL );
284 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Tuples::createTupleObj
auto createTupleObj(const OWNER *owner, const std::string &name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE)
Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class Tupl...
Definition: TupleDetail.h:215
Tuples::EVTCOL
Definition: TupleObj.h:81

## ◆ createNTuple()

template<class PBASE >

std::unique_ptr< Tuples::TupleObj > GaudiTuples< PBASE >::createNTuple | ( | const std::string & | name,
|  | NTuple::Tuple * | tuple,
|  | const CLID & | clid
| ) |  | const
| protected virtual

create TupleObj

Attention
  The method should never used directly by users

Parameters

  name | name/title
  tuple | the underlying ntuple implementation
  clid | unique classID for ntuple

Returns
  pointer to newly created TupleObj

Definition at line 271 of file GaudiTuples.icpp.

272 {
273 return Tuples::createTupleObj( this, "Tuple '" + name + "'", tuple, clid, Tuples::NTUPLE );
274 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Tuples::createTupleObj
auto createTupleObj(const OWNER *owner, const std::string &name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE)
Templated helper functions allow to avoid heavy semantics of dealing with explicit type of class Tupl...
Definition: TupleDetail.h:215
Tuples::NTUPLE
Definition: TupleObj.h:80

## ◆ evtCol() [1/2]

template<class PBASE >

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.

Tuple tuple = evtCol( "My Tag Collection" ) ;
tuple->column( "A" , sin(0.1) );
tuple->column( "B" , cos(0.1) );
tuple->column( "C" , tan(0.1) );
tuple->write();

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 140 of file GaudiTuples.icpp.

140 {
141 // look up in the table
142 auto& m = evtColByTitle();
143 auto tuple = m.find( title );
144 if ( tuple != m.end() ) return Tuple( tuple->tuple ); // RETURN
145 // Create the tuple ID
146 TupleID ID;
147 if ( this->useNumericAutoIDs() || title.empty() ) {
148 if ( !this->useNumericAutoIDs() ) {
149 this->Warning(
150 "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for evtCol ID",
151 StatusCode::SUCCESS )
152 .ignore();
153 }
154 // proposed the tuple ID
155 ID = TupleID( m_evtColMap.size() + 1 + evtColOffSet() );
156 // adjust the proposed ID
157 while ( nTupleExists( ID ) || evtColExists( ID ) ) { ID = TupleID( ID.numeric() + 1 ); }
158 } else {
159 // use the title to create a unique literal ID
160 ID = TupleID( this->convertTitleToID( title ) );
161 // Just in case ...
162 while ( nTupleExists( ID ) || evtColExists( ID ) ) { ID = TupleID( ID.idAsString() + "_" ); }
163 }
164 // return
165 return evtCol( ID, title, clid );
166 }
GaudiTuples::m_evtColMap
nTupleMap m_evtColMap
the actual storage of event collections by title and ID
Definition: GaudiTuples.h:379
std::string::empty
T empty(T... args)
GaudiTuples::evtColOffSet
TupleID::NumericID evtColOffSet() const
get the value for Event Tag Collection offset (property "EvtColsOffSet")
Definition: GaudiTuples.h:227
GaudiTuples::Tuple
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:49
GaudiTuples::evtColExists
bool evtColExists(const TupleID &ID) const
check the existence AND validity of the Event Tag Collection with the given ID
Definition: GaudiTuples.icpp:342
GaudiTuples::nTupleExists
bool nTupleExists(const TupleID &ID) const
check the existence AND validity of the N-Tuple with the given ID
Definition: GaudiTuples.icpp:334
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
GaudiTuples::TupleID
GaudiAlg::TupleID TupleID
the actual type of N-tuple ID
Definition: GaudiTuples.h:51
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:92
GaudiTuples::evtCol
Tuple evtCol(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an Event Tag Collection object (book on-demand) with unique identifier.
Definition: GaudiTuples.icpp:140

## ◆ evtCol() [2/2]

template<class PBASE >

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.

// Book Ntuple with a numeric ID
Tuple tuple = evtCol( 1, "My Tag Collection" ) ;
// ... or
Tuple tuple = evtCol( "1", "My Tag Collection" ) ;
// ... or, Book Ntuple with a literal ID
Tuple tuple = evtCol( "mytuple", "My Tag Collection" ) ;
// ... or, Book Ntuple with a literal ID in a sub-dir
Tuple tuple = evtCol( "subdir/mytuple", "My Tag Collection" ) ;
// Fill and write
tuple->column( "A" , sin(0.1) );
tuple->column( "B" , cos(0.1) );
tuple->column( "C" , tan(0.1) );
tuple->write();

Attention
  If the Event Tag Collection with given ID is already booked through automatic assignment of Event Tag Collection ID, the error will not be detected. Therefore it is recommended to use a non-trivial Event Tag Collection ID offset (property "EvtColOffSet") if one need to combine these techniques together It is still desirable to use the unique Event Tag Collection title to avoid a bad interference.

Parameters

  ID | The forced Event Tag Collection ID
  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 222 of file GaudiTuples.icpp.

222 {
223 // Check ID
224 if ( ID.undefined() ) {
225 this->Error( "Undefined NTuple ID : Title='" + title1 + "'" ).ignore();
226 return Tuple( 0 );
227 }
228
229 // look up in the table
230 auto& tuple = evtColByID();
231 auto i = tuple.find( ID );
232 if ( i != tuple.end() ) return Tuple( i->tuple ); // RETURN
233
234 // convert ID to the string
235 const std::string tID = ID.idAsString();
236
237 // adjust the NTuple title
238 const std::string title = title1.empty() ? ( "EvtCol #" + tID ) : title1;
239
240 // book new ntuple
241 if ( !produceEvtCols() ) {
242 auto r = m_evtColMap.insert( nTupleMapItem{title, ID, createEvtCol( title, nullptr, clid )} );
243 if ( !r.second ) this->Error( "Failure to createEvtCol" ).ignore();
244 return Tuple( r.first->tuple );
245 }
246 // book NTuple
247 NTuple::Tuple* tup = nullptr;
248 if ( ID.numeric() ) {
249 tup = this->evtColSvc()->book( evtColPath(), ID.numericID(), clid, title );
250 } else if ( ID.literal() ) {
251 tup = this->evtColSvc()->book( evtColPath(), ID.literalID(), clid, title );
252 } else {
253 this->Error( "Undefined NTuple ID" ).ignore();
254 }
255
256 // assertion
257 this->Assert( tup, "Could not book the EvtCol='" + title + "'" );
258 // some printout
259 if ( tup->registry() && this->msgLevel( MSG::DEBUG ) ) {
260 this->debug() << "Booked EvtCol '" << title << "' ID=" << tID << "' Path='" << evtColPath() << "' TS='"
261 << tup->registry()->identifier() << "'" << endmsg;
262 }
263 auto r = m_evtColMap.insert( nTupleMapItem{title, ID, createEvtCol( title, tup, clid )} );
264 if ( !r.second ) this->Error( "Failure to createEvtCol" ).ignore();
265 return Tuple( r.first->tuple );
266 }
GaudiTuples::m_evtColMap
nTupleMap m_evtColMap
the actual storage of event collections by title and ID
Definition: GaudiTuples.h:379
std::string::empty
T empty(T... args)
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
GaudiTuples::createEvtCol
virtual std::unique_ptr< Tuples::TupleObj > createEvtCol(const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
create TupleObj for event tag collection
Definition: GaudiTuples.icpp:281
GaudiTuples::produceEvtCols
bool produceEvtCols() const
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition: GaudiTuples.h:217
GaudiTuples::Tuple
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:49
MSG::DEBUG
Definition: IMessageSvc.h:15
std::string
STL class.
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:375
GaudiTuples::evtColPath
std::string evtColPath() const
get the constructed Event Tag Collection path
Definition: GaudiTuples.icpp:358
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ evtColDir()

template<class PBASE>

const std::string& GaudiTuples< PBASE >::evtColDir | ( |  | ) | const
| inline

get the Event Tag Collection directory (property "EvtColsDir")

Definition at line 225 of file GaudiTuples.h.

225 { return m_evtColDir; }
GaudiTuples::m_evtColDir
Gaudi::Property< std::string > m_evtColDir
Definition: GaudiTuples.h:343

## ◆ evtColExists()

template<class PBASE >

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 342 of file GaudiTuples.icpp.

342 {
343 auto& m = evtColByID();
344 return m.find( ID ) != m.end();
345 }
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:92

## ◆ evtColLUN()

template<class PBASE>

const std::string& GaudiTuples< PBASE >::evtColLUN | ( |  | ) | const
| inline

get the logical unit for Event Tag Collections (property "EvtColsLUN")

Definition at line 221 of file GaudiTuples.h.

221 { return m_evtColLUN; }
GaudiTuples::m_evtColLUN
Gaudi::Property< std::string > m_evtColLUN
Definition: GaudiTuples.h:340

## ◆ evtColOffSet()

template<class PBASE>

TupleID::NumericID GaudiTuples< PBASE >::evtColOffSet | ( |  | ) | const
| inline

get the value for Event Tag Collection offset (property "EvtColsOffSet")

Definition at line 227 of file GaudiTuples.h.

227 { return m_evtColOffSet; }
GaudiTuples::m_evtColOffSet
Gaudi::Property< TupleID::NumericID > m_evtColOffSet
Definition: GaudiTuples.h:339

## ◆ evtColPath()

template<class PBASE >

std::string GaudiTuples< PBASE >::evtColPath | ( |  | ) | const

get the constructed Event Tag Collection path

Definition at line 358 of file GaudiTuples.icpp.

358 {
359 std::string path = evtColLUN() + "/" + evtColTopDir() + evtColDir();
360 return splitEvtColDir() ? dirHbookName( path ) : path;
361 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
GaudiTuples::evtColDir
const std::string & evtColDir() const
get the Event Tag Collection directory (property "EvtColsDir")
Definition: GaudiTuples.h:225
GaudiTuples::evtColLUN
const std::string & evtColLUN() const
get the logical unit for Event Tag Collections (property "EvtColsLUN")
Definition: GaudiTuples.h:221
std::string
STL class.
GaudiTuples::evtColTopDir
const std::string & evtColTopDir() const
get the top-level Event Tag Collection directory (property "EvtColsTopDir")
Definition: GaudiTuples.h:223
GaudiTuples::splitEvtColDir
bool splitEvtColDir() const
get the flag for Event Tag Collection path split (property "EvtColsSplitDir")
Definition: GaudiTuples.h:219

## ◆ evtColsPrint()

template<class PBASE>

bool GaudiTuples< PBASE >::evtColsPrint | ( |  | ) | const
| inline

print event collections at finalization

Definition at line 233 of file GaudiTuples.h.

233 { return m_evtColsPrint; }
GaudiTuples::m_evtColsPrint
Gaudi::Property< bool > m_evtColsPrint
Definition: GaudiTuples.h:330

## ◆ evtColTopDir()

template<class PBASE>

const std::string& GaudiTuples< PBASE >::evtColTopDir | ( |  | ) | const
| inline

get the top-level Event Tag Collection directory (property "EvtColsTopDir")

Definition at line 223 of file GaudiTuples.h.

223 { return m_evtColTopDir; }
GaudiTuples::m_evtColTopDir
Gaudi::Property< std::string > m_evtColTopDir
Definition: GaudiTuples.h:341

## ◆ finalize()

template<class PBASE >

StatusCode GaudiTuples< PBASE >::finalize | ( |  | ) |
| override protected

standard finalization method

Returns
  status code

Definition at line 83 of file GaudiTuples.icpp.

83 {
84 if ( !( m_nTupleMap.empty() && m_evtColMap.empty() ) ) {
85 const int nNtuples = m_nTupleMap.size();
86 const int nEvtCols = m_evtColMap.size();
87 this->always() << "Booked " << nNtuples << " N-Tuples and " << nEvtCols << " Event Tag Collections" << endmsg;
88 }
89
90 if ( produceNTuples() && tuplesPrint() ) printTuples();
91 if ( produceEvtCols() && evtColsPrint() ) printEvtCols();
92
93 // release ntuples and clear the container
94 m_nTupleMap.clear();
95
96 // release ntuples and clear the container
97 m_evtColMap.clear();
98
99 // finalize base class
100 return PBASE::finalize();
101 }
GaudiTuples::m_evtColMap
nTupleMap m_evtColMap
the actual storage of event collections by title and ID
Definition: GaudiTuples.h:379
GaudiTuples::printTuples
long printTuples() const
perform the actual printout of N-tuples
Definition: GaudiTuples.icpp:289
GaudiTuples::produceEvtCols
bool produceEvtCols() const
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition: GaudiTuples.h:217
GaudiTuples::printEvtCols
long printEvtCols() const
perform the actual printout of Event Tag Collections
Definition: GaudiTuples.icpp:312
GaudiTuples::produceNTuples
bool produceNTuples() const
get the flag for N-Tuple production (property "NTupleProduce")
Definition: GaudiTuples.h:203
GaudiTuples::tuplesPrint
bool tuplesPrint() const
print tuples at finalization
Definition: GaudiTuples.h:231
GaudiTuples::m_nTupleMap
nTupleMap m_nTupleMap
the actual storage of ntuples by title and ID
Definition: GaudiTuples.h:371
GaudiTuples::evtColsPrint
bool evtColsPrint() const
print event collections at finalization
Definition: GaudiTuples.h:233
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ initialize()

template<class PBASE >

StatusCode GaudiTuples< PBASE >::initialize | ( |  | ) |
| override protected

standard initialization method

Returns
  status code

Definition at line 43 of file GaudiTuples.icpp.

43 {
44 // initialize base class
45 const StatusCode sc = PBASE::initialize();
46 if ( sc.isFailure() ) return sc;
47
48 if ( produceNTuples() ) {
49 // check the existance of service
50 if ( this->ntupleSvc() == 0 ) { return this->Error( "INTupleSvc* points to NULL!" ); }
51 // Print ntuple path
52 this->Print( "The N-Tuple path is set to be '" + nTuplePath() + "'", StatusCode( StatusCode::SUCCESS, true ),
53 MSG::DEBUG )
54 .ignore();
55 } else {
56 this->debug() << "Production of N-Tuples is switched OFF" << endmsg;
57 }
58
59 if ( produceEvtCols() ) {
60 // check the existance of service
61 if ( 0 == this->evtColSvc() ) { return this->Error( "INTupleSvc* points to NULL!" ); }
62 // Print EvtCol path
63 this->Print( "The EventCol path is set to be '" + evtColPath() + "'", StatusCode( StatusCode::SUCCESS, true ),
64 MSG::DEBUG )
65 .ignore();
66 } else {
67 this->debug() << "Production of Event Collections is switched OFF" << endmsg;
68 }
69
70 return sc;
71 }
GaudiTuples::nTuplePath
std::string nTuplePath() const
get the constructed N-Tuple path
Definition: GaudiTuples.icpp:350
GaudiTuples::produceEvtCols
bool produceEvtCols() const
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition: GaudiTuples.h:217
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
GaudiTuples::produceNTuples
bool produceNTuples() const
get the flag for N-Tuple production (property "NTupleProduce")
Definition: GaudiTuples.h:203
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
GaudiTuples::evtColPath
std::string evtColPath() const
get the constructed Event Tag Collection path
Definition: GaudiTuples.icpp:358
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ nTuple() [1/2]

template<class PBASE >

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.

Tuple tuple = nTuple( "My N-Tuple" ) ;
tuple->column( "A" , sin(0.1) );
tuple->column( "B" , cos(0.1) );
tuple->column( "C" , tan(0.1) );
tuple->write();

Attention
  The NTuple 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 NTuple 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 NTuple will be given when filled under conditional statements, since in these circumstances the order in which the NTuple 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 NTuple 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 N-Tuple
  clid | N-Tuple class identifier (row or column wise)

Returns
  ntuple The ntuple object

Definition at line 107 of file GaudiTuples.icpp.

107 {
108 // look up in the table
109 auto& m = nTupleByTitle();
110 auto tuple = m.find( title );
111 if ( tuple != m.end() ) return Tuple( tuple->tuple ); // RETURN
112 // Create the tuple ID
113 TupleID ID;
114 if ( this->useNumericAutoIDs() || title.empty() ) {
115 if ( !this->useNumericAutoIDs() ) {
116 this->Warning(
117 "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for nTuple ID",
118 StatusCode::SUCCESS )
119 .ignore();
120 }
121 // propose the tuple ID
122 ID = TupleID( m_nTupleMap.size() + 1 + nTupleOffSet() );
123 // adjust the proposed ID
124 while ( nTupleExists( ID ) || evtColExists( ID ) ) { ID = TupleID( ID.numeric() + 1 ); }
125 } else {
126 // use the title to create a unique literal ID
127 ID = TupleID( this->convertTitleToID( title ) );
128 // Just in case ...
129 while ( nTupleExists( ID ) || evtColExists( ID ) ) { ID = TupleID( ID.idAsString() + "_" ); }
130 }
131 // return
132 return nTuple( ID, title, clid );
133 }
std::string::empty
T empty(T... args)
GaudiTuples::Tuple
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:49
GaudiTuples::evtColExists
bool evtColExists(const TupleID &ID) const
check the existence AND validity of the Event Tag Collection with the given ID
Definition: GaudiTuples.icpp:342
GaudiTuples::nTupleExists
bool nTupleExists(const TupleID &ID) const
check the existence AND validity of the N-Tuple with the given ID
Definition: GaudiTuples.icpp:334
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
GaudiTuples::nTupleOffSet
TupleID::NumericID nTupleOffSet() const
get the value for N-Tuple offset (property "NTupleOffSet")
Definition: GaudiTuples.h:213
GaudiTuples::TupleID
GaudiAlg::TupleID TupleID
the actual type of N-tuple ID
Definition: GaudiTuples.h:51
GaudiTuples::nTuple
Tuple nTuple(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an N-Tuple object (book on-demand) with unique identifier.
Definition: GaudiTuples.icpp:107
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:92
GaudiTuples::m_nTupleMap
nTupleMap m_nTupleMap
the actual storage of ntuples by title and ID
Definition: GaudiTuples.h:371

## ◆ nTuple() [2/2]

template<class PBASE >

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.

// Book Ntuple with a numeric ID
Tuple tuple = nTuple( 1, "My tuple" ) ;
// ... or
Tuple tuple = nTuple( "1", "My tuple" ) ;
// ... or, Book Ntuple with a literal ID
Tuple tuple = nTuple( "mytuple", "My tuple" ) ;
// ... or, Book Ntuple with a literal ID in a sub-dir
Tuple tuple = nTuple( "subdir/mytuple", "My tuple" ) ;
// Fill and write NTuple
tuple->column( "A" , sin(0.1) );
tuple->column( "B" , cos(0.1) );
tuple->column( "C" , tan(0.1) );
tuple->write();

Attention
  If the N-Tuple with given ID is already booked through automatic assignment of N-Tuple ID, the error will not be detected. Therefore it is recommended to use a non-trivial N-Tuple ID offset (property "NTupleOffSet") if one need to combine these techniques together It is still desirable to use the unique N-Tuple title to avoid a bad interference.

Parameters

  ID | The forced N-Tuple ID
  title | Unique title for N-Tuple
  clid | N-Tuple class identifier (row or column wise)

Returns
  ntuple The ntuple object

Definition at line 173 of file GaudiTuples.icpp.

173 {
174 // Check ID
175 if ( ID.undefined() ) {
176 this->Error( "Undefined NTuple ID : Title='" + title1 + "'" ).ignore();
177 return Tuple( 0 );
178 }
179
180 // look up in the table
181 auto& m = nTupleByID();
182 auto tuple = m.find( ID );
183 if ( tuple != m.end() ) return Tuple( tuple->tuple ); // RETURN
184
185 // convert ID to the string
186 const std::string tID = ID.idAsString();
187
188 // adjust the NTuple title
189 const std::string title = title1.empty() ? ( "NTuple #" + tID ) : title1;
190
191 // book new ntuple
192 if ( !produceNTuples() ) {
193 auto r = m_nTupleMap.insert( nTupleMapItem{title, ID, createNTuple( title, nullptr, clid )} );
194 if ( !r.second ) this->Error( "Failure to createNTuple" ).ignore();
195 return Tuple( r.first->tuple );
196 }
197 // book NTupel
198 NTuple::Tuple* tup = nullptr;
199 if ( ID.numeric() ) {
200 tup = this->ntupleSvc()->book( nTuplePath(), ID.numericID(), clid, title );
201 } else if ( ID.literal() ) {
202 tup = this->ntupleSvc()->book( nTuplePath(), ID.literalID(), clid, title );
203 } else {
204 this->Error( "Undefined NTuple ID" ).ignore();
205 }
206
207 // assertion
208 this->Assert( tup, "Could not book the N-Tuple='" + title + "'" );
209 // some printout
210 if ( tup->registry() && this->msgLevel( MSG::DEBUG ) ) {
211 this->debug() << "Booked NTuple '" << title << "' ID=" << tID << "' Path='" << nTuplePath() << "' TS='"
212 << tup->registry()->identifier() << "'" << endmsg;
213 }
214
215 auto r = m_nTupleMap.insert( nTupleMapItem{title, ID, createNTuple( title, tup, clid )} );
216 if ( !r.second ) this->Error( "Failure to createNTuple" ).ignore();
217 return Tuple( r.first->tuple );
218 //
219 }
std::string::empty
T empty(T... args)
GaudiTuples::nTuplePath
std::string nTuplePath() const
get the constructed N-Tuple path
Definition: GaudiTuples.icpp:350
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:72
GaudiTuples::Tuple
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:49
MSG::DEBUG
Definition: IMessageSvc.h:15
GaudiTuples::produceNTuples
bool produceNTuples() const
get the flag for N-Tuple production (property "NTupleProduce")
Definition: GaudiTuples.h:203
std::string
STL class.
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:92
GaudiTuples::m_nTupleMap
nTupleMap m_nTupleMap
the actual storage of ntuples by title and ID
Definition: GaudiTuples.h:371
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:375
GaudiTuples::createNTuple
virtual std::unique_ptr< Tuples::TupleObj > createNTuple(const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
create TupleObj
Definition: GaudiTuples.icpp:271
IRegistry::identifier
virtual const id_type & identifier() const =0
Full identifier (or key)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ nTupleDir()

template<class PBASE>

const std::string& GaudiTuples< PBASE >::nTupleDir | ( |  | ) | const
| inline

get the N-Tuple directory (property "NTupleDir")

Definition at line 211 of file GaudiTuples.h.

211 { return m_nTupleDir; }
GaudiTuples::m_nTupleDir
Gaudi::Property< std::string > m_nTupleDir
Definition: GaudiTuples.h:325

## ◆ nTupleExists()

template<class PBASE >

bool GaudiTuples< PBASE >::nTupleExists | ( | const TupleID & | ID | ) | const

check the existence AND validity of the N-Tuple with the given ID

Definition at line 334 of file GaudiTuples.icpp.

334 {
335 auto& m = nTupleByID();
336 return m.find( ID ) != m.end();
337 }
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:92

## ◆ nTupleLUN()

template<class PBASE>

const std::string& GaudiTuples< PBASE >::nTupleLUN | ( |  | ) | const
| inline

get the logical unit for N-Tuples (property "NTupleLUN")

Definition at line 207 of file GaudiTuples.h.

207 { return m_nTupleLUN; }
GaudiTuples::m_nTupleLUN
Gaudi::Property< std::string > m_nTupleLUN
Definition: GaudiTuples.h:323

## ◆ nTupleOffSet()

template<class PBASE>

TupleID::NumericID GaudiTuples< PBASE >::nTupleOffSet | ( |  | ) | const
| inline

get the value for N-Tuple offset (property "NTupleOffSet")

Definition at line 213 of file GaudiTuples.h.

213 { return m_nTupleOffSet; }
GaudiTuples::m_nTupleOffSet
Gaudi::Property< TupleID::NumericID > m_nTupleOffSet
Definition: GaudiTuples.h:322

## ◆ nTuplePath()

template<class PBASE >

std::string GaudiTuples< PBASE >::nTuplePath | ( |  | ) | const

get the constructed N-Tuple path

Definition at line 350 of file GaudiTuples.icpp.

350 {
351 const std::string path = nTupleLUN() + "/" + nTupleTopDir() + nTupleDir();
352 return splitNTupleDir() ? dirHbookName( path ) : path;
353 }
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
GaudiTuples::splitNTupleDir
bool splitNTupleDir() const
get the flag for N-Tuple path split (property "NTupleSplitDir")
Definition: GaudiTuples.h:205
std::string
STL class.
GaudiTuples::nTupleTopDir
const std::string & nTupleTopDir() const
get the top-level N-Tuple directory (property "NTupleTopDir")
Definition: GaudiTuples.h:209
GaudiTuples::nTupleLUN
const std::string & nTupleLUN() const
get the logical unit for N-Tuples (property "NTupleLUN")
Definition: GaudiTuples.h:207
GaudiTuples::nTupleDir
const std::string & nTupleDir() const
get the N-Tuple directory (property "NTupleDir")
Definition: GaudiTuples.h:211

## ◆ nTupleTopDir()

template<class PBASE>

const std::string& GaudiTuples< PBASE >::nTupleTopDir | ( |  | ) | const
| inline

get the top-level N-Tuple directory (property "NTupleTopDir")

Definition at line 209 of file GaudiTuples.h.

209 { return m_nTupleTopDir; }
GaudiTuples::m_nTupleTopDir
Gaudi::Property< std::string > m_nTupleTopDir
Definition: GaudiTuples.h:324

## ◆ printEvtCols()

template<class PBASE >

long GaudiTuples< PBASE >::printEvtCols | ( |  | ) | const

perform the actual printout of Event Tag Collections

Returns
  number of active Event Tag Collections

Definition at line 312 of file GaudiTuples.icpp.

312 {
313 if ( m_evtColMap.empty() ) {
314 this->always() << "No Event Tag Collections are booked" << endmsg;
315 } else {
316 this->always() << "List of booked Event Tag Collections in directory "
317 << "\"" << evtColPath() << "\"" << endmsg;
318 }
319 for ( const auto& entry : this->evtColOrdered() ) {
320 if ( !entry.tuple->tuple() ) {
321 this->error() << " NTuple::Tuple* points to NULL" << endmsg;
322 continue;
323 }
324 this->always() << GaudiAlg::PrintTuple::print( entry.tuple->tuple(), entry.id )
325 << " Items:" << Gaudi::Utils::toString( entry.tuple->items() ) << endmsg;
326 }
327 //
328 return this->m_evtColMap.size();
329 }
GaudiTuples::m_evtColMap
nTupleMap m_evtColMap
the actual storage of event collections by title and ID
Definition: GaudiTuples.h:379
GaudiAlg::PrintTuple::print
static std::string print(const INTuple *tuple, const GaudiAlg::TupleID &ID)
Definition: Print.cpp:134
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:334
GaudiTuples::evtColPath
std::string evtColPath() const
get the constructed Event Tag Collection path
Definition: GaudiTuples.icpp:358
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ printTuples()

template<class PBASE >

long GaudiTuples< PBASE >::printTuples | ( |  | ) | const

perform the actual printout of N-tuples

Returns
  number of active N-Tuples

Definition at line 289 of file GaudiTuples.icpp.

289 {
290
291 if ( m_nTupleMap.empty() ) {
292 if ( this->msgLevel( MSG::DEBUG ) ) this->debug() << "No N-Tuples are booked" << endmsg;
293 } else {
294 this->always() << "List of booked N-Tuples in directory "
295 << "\"" << nTuplePath() << "\"" << endmsg;
296 }
297
298 for ( const auto& entry : this->nTupleOrdered() ) {
299 if ( !entry.tuple->tuple() ) {
300 this->error() << " NTuple::Tuple* points to NULL" << endmsg;
301 continue;
302 }
303 this->always() << GaudiAlg::PrintTuple::print( entry.tuple->tuple(), entry.id ) << endmsg;
304 }
305 //
306 return this->m_nTupleMap.size();
307 }
GaudiAlg::PrintTuple::print
static std::string print(const INTuple *tuple, const GaudiAlg::TupleID &ID)
Definition: Print.cpp:134
GaudiTuples::nTuplePath
std::string nTuplePath() const
get the constructed N-Tuple path
Definition: GaudiTuples.icpp:350
MSG::DEBUG
Definition: IMessageSvc.h:15
GaudiTuples::m_nTupleMap
nTupleMap m_nTupleMap
the actual storage of ntuples by title and ID
Definition: GaudiTuples.h:371
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ produceEvtCols()

template<class PBASE>

bool GaudiTuples< PBASE >::produceEvtCols | ( |  | ) | const
| inline

get the flag for Event Tag Collection production (property "EvtColsProduce")

Definition at line 217 of file GaudiTuples.h.

217 { return m_produceEvtCols; }
GaudiTuples::m_produceEvtCols
Gaudi::Property< bool > m_produceEvtCols
Definition: GaudiTuples.h:328

## ◆ produceNTuples()

template<class PBASE>

bool GaudiTuples< PBASE >::produceNTuples | ( |  | ) | const
| inline

get the flag for N-Tuple production (property "NTupleProduce")

Definition at line 203 of file GaudiTuples.h.

203 { return m_produceNTuples; }
GaudiTuples::m_produceNTuples
Gaudi::Property< bool > m_produceNTuples
Definition: GaudiTuples.h:311

## ◆ splitEvtColDir()

template<class PBASE>

bool GaudiTuples< PBASE >::splitEvtColDir | ( |  | ) | const
| inline

get the flag for Event Tag Collection path split (property "EvtColsSplitDir")

Definition at line 219 of file GaudiTuples.h.

219 { return m_splitEvtColDir; }
GaudiTuples::m_splitEvtColDir
Gaudi::Property< bool > m_splitEvtColDir
Definition: GaudiTuples.h:338

## ◆ splitNTupleDir()

template<class PBASE>

bool GaudiTuples< PBASE >::splitNTupleDir | ( |  | ) | const
| inline

get the flag for N-Tuple path split (property "NTupleSplitDir")

Definition at line 205 of file GaudiTuples.h.

205 { return m_splitNTupleDir; }
GaudiTuples::m_splitNTupleDir
Gaudi::Property< bool > m_splitNTupleDir
Definition: GaudiTuples.h:320

## ◆ tuplesPrint()

template<class PBASE>

bool GaudiTuples< PBASE >::tuplesPrint | ( |  | ) | const
| inline

print tuples at finalization

Definition at line 231 of file GaudiTuples.h.

231 { return m_tuplesPrint; }
GaudiTuples::m_tuplesPrint
Gaudi::Property< bool > m_tuplesPrint
Definition: GaudiTuples.h:312

## Member Data Documentation

## ◆ m_evtColDir

template<class PBASE>

Gaudi::Property<std::string> GaudiTuples< PBASE >::m_evtColDir
| private

Initial value:
{this, "EvtColDir",
boost::algorithm::replace_all_copy( this->name(), ":", "_" ),
"Subdirectory for Event Tag Collections"}

Definition at line 343 of file GaudiTuples.h.

## ◆ m_evtColLUN

template<class PBASE>

Gaudi::Property<std::string> GaudiTuples< PBASE >::m_evtColLUN {this, "EvtColLUN", "EVTCOL", "Logical File Unit for Event Tag Collections"}
| private

Definition at line 340 of file GaudiTuples.h.

## ◆ m_evtColMap

template<class PBASE>

nTupleMap GaudiTuples< PBASE >::m_evtColMap
| mutable private

the actual storage of event collections by title and ID

Definition at line 379 of file GaudiTuples.h.

## ◆ m_evtColOffSet

template<class PBASE>

Gaudi::Property<TupleID::NumericID> GaudiTuples< PBASE >::m_evtColOffSet {this, "EvtColOffSet", 0, "offset for numerical N-tuple ID"}
| private

Definition at line 339 of file GaudiTuples.h.

## ◆ m_evtColsPrint

template<class PBASE>

Gaudi::Property<bool> GaudiTuples< PBASE >::m_evtColsPrint
| private

Initial value:
{this, "EvtColsPrint", false,
[this]( auto& ) {
if ( this->FSMState() >= Gaudi::StateMachine::INITIALIZED &&
this->evtColsPrint() )
this->printEvtCols();
},
"print statistics for Event Tag Collections "}

Definition at line 330 of file GaudiTuples.h.

## ◆ m_evtColTopDir

template<class PBASE>

Gaudi::Property<std::string> GaudiTuples< PBASE >::m_evtColTopDir
| private

Initial value:
{this, "EvtColTopDir", "",
"Top-level directory for Event Tag Collections"}

Definition at line 341 of file GaudiTuples.h.

## ◆ m_nTupleDir

template<class PBASE>

Gaudi::Property<std::string> GaudiTuples< PBASE >::m_nTupleDir
| private

Initial value:
{
this, "NTupleDir", boost::algorithm::replace_all_copy( this->name(), ":", "_" ), "subdirectory for N-Tuples"}

Definition at line 325 of file GaudiTuples.h.

## ◆ m_nTupleLUN

template<class PBASE>

Gaudi::Property<std::string> GaudiTuples< PBASE >::m_nTupleLUN {this, "NTupleLUN", "FILE1", "Logical File Unit for N-tuples"}
| private

Definition at line 323 of file GaudiTuples.h.

## ◆ m_nTupleMap

template<class PBASE>

nTupleMap GaudiTuples< PBASE >::m_nTupleMap
| mutable private

the actual storage of ntuples by title and ID

Definition at line 371 of file GaudiTuples.h.

## ◆ m_nTupleOffSet

template<class PBASE>

Gaudi::Property<TupleID::NumericID> GaudiTuples< PBASE >::m_nTupleOffSet {this, "NTupleOffSet", 0, "offset for numerical N-tuple ID"}
| private

Definition at line 322 of file GaudiTuples.h.

## ◆ m_nTupleTopDir

template<class PBASE>

Gaudi::Property<std::string> GaudiTuples< PBASE >::m_nTupleTopDir {this, "NTupleTopDir", "", "top-level directory for N-Tuples"}
| private

Definition at line 324 of file GaudiTuples.h.

## ◆ m_produceEvtCols

template<class PBASE>

Gaudi::Property<bool> GaudiTuples< PBASE >::m_produceEvtCols
| private

Initial value:
{this, "EvtColsProduce", false,
"general switch to enable/disable Event Tag Collections"}

Definition at line 328 of file GaudiTuples.h.

## ◆ m_produceNTuples

template<class PBASE>

Gaudi::Property<bool> GaudiTuples< PBASE >::m_produceNTuples {this, "NTupleProduce", true, "general switch to enable/disable N-tuples"}
| private

Definition at line 311 of file GaudiTuples.h.

## ◆ m_splitEvtColDir

template<class PBASE>

Gaudi::Property<bool> GaudiTuples< PBASE >::m_splitEvtColDir {this, "EvtColSplitDir", false, "split long directory names into short pieces"}
| private

Definition at line 338 of file GaudiTuples.h.

## ◆ m_splitNTupleDir

template<class PBASE>

Gaudi::Property<bool> GaudiTuples< PBASE >::m_splitNTupleDir
| private

Initial value:
{this, "NTupleSplitDir", false,
"split long directory names into short pieces (suitable for HBOOK)"}

Definition at line 320 of file GaudiTuples.h.

## ◆ m_tuplesPrint

template<class PBASE>

Gaudi::Property<bool> GaudiTuples< PBASE >::m_tuplesPrint
| private

Initial value:
{this, "NTuplePrint", true,
[this]( auto& ) {
if ( this->FSMState() >= Gaudi::StateMachine::INITIALIZED &&
this->tuplesPrint() )
this->printTuples();
},
"print N-tuple statistics"}

Definition at line 312 of file GaudiTuples.h.

The documentation for this class was generated from the following files:

- GaudiAlg/GaudiAlg/GaudiTuples.h
- GaudiAlg/GaudiAlg/GaudiTuples.icpp