GaudiTuples< PBASE > Class Template Reference

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

#include <GaudiAlg/GaudiTuples.h>

Inheritance diagram for GaudiTuples< PBASE >:
Collaboration diagram for GaudiTuples< PBASE >:

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...
 
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...
 
 GaudiTuples (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor. More...
 
 GaudiTuples (const std::string &type, const std::string &name, const IInterface *parent)
 Tool constructor. More...
 
 ~GaudiTuples () override=default
 Destructor. More...
 
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...
 
 GaudiTuples (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor. More...
 
 GaudiTuples (const std::string &type, const std::string &name, const IInterface *parent)
 Tool constructor. More...
 
 ~GaudiTuples () override=default
 Destructor. More...
 

Protected Member Functions

const TupleMapTitlenTupleMapTitle () const
 access to the all ntuples by title More...
 
const TupleMapTitleevtColMapTitle () const
 access to the all evet tag collections by title More...
 
const TupleMapIDnTupleMapID () const
 access to the all ntuples by numeric ID More...
 
const TupleMapIDevtColMapID () const
 access to the all evet tag collections by numeric ID More...
 
virtual Tuples::TupleObjcreateNTuple (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
 create TupleObj More...
 
virtual Tuples::TupleObjcreateEvtCol (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...
 
const TupleMapTitlenTupleMapTitle () const
 access to the all ntuples by title More...
 
const TupleMapTitleevtColMapTitle () const
 access to the all evet tag collections by title More...
 
const TupleMapIDnTupleMapID () const
 access to the all ntuples by numeric ID More...
 
const TupleMapIDevtColMapID () const
 access to the all evet tag collections by numeric ID More...
 
virtual Tuples::TupleObjcreateNTuple (const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
 create TupleObj More...
 
virtual Tuples::TupleObjcreateEvtCol (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 (Property &)
 handler for "NTuplePrint" property More...
 
void printEvtColHandler (Property &)
 handler for "EvtColsPrint" property More...
 
void initGaudiTuplesConstructor ()
 Constructor initialization and job options. More...
 
void printNTupleHandler (Property &)
 handler for "NTuplePrint" property More...
 
void printEvtColHandler (Property &)
 handler for "EvtColsPrint" property More...
 

Private Attributes

bool m_produceNTuples
 flag to switch ON/OFF the ntuple filling and booking More...
 
bool m_splitNTupleDir
 flag to indicate splitting of tuple directories (useful for HBOOK) More...
 
std::string m_nTupleLUN
 name of logical unit for tuple directory More...
 
std::string m_nTupleTopDir
 top level tuple directory More...
 
std::string m_nTupleDir
 local tuple directory More...
 
TupleID::NumericID m_nTupleOffSet
 the offset for ntuple numerical ID More...
 
bool m_produceEvtCols
 flag to switch ON/OFF the ntuple filling and booking More...
 
bool m_splitEvtColDir
 flag to indicate splitting of tuple directories (useful for HBOOK) More...
 
std::string m_evtColLUN
 name of Logical Unit for tuple directory More...
 
std::string m_evtColTopDir
 top level tuple directory More...
 
std::string m_evtColDir
 local tuple directory More...
 
TupleID::NumericID m_evtColOffSet
 the offset for ntuple numerical ID More...
 
bool m_tuplesPrint
 print tuples at finalization? More...
 
bool m_evtColsPrint
 print event collections at finalization More...
 
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...
 

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 37 of file GaudiTuples.h.

Member Typedef Documentation

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

the actual type for histogram identifier

Definition at line 42 of file GaudiTuples.h.

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

the actual type for histogram identifier

Definition at line 42 of file GaudiTuples.h.

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

the actual type of the tuple

Definition at line 44 of file GaudiTuples.h.

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

the actual type of the tuple

Definition at line 44 of file GaudiTuples.h.

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

the actual type of N-tuple ID

Definition at line 46 of file GaudiTuples.h.

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

the actual type of N-tuple ID

Definition at line 46 of file GaudiTuples.h.

template<class PBASE>
typedef GaudiAlg::TupleMapID GaudiTuples< PBASE >::TupleMapID

the actual type of (Numeric ID) -> (tuple) mappping

Definition at line 50 of file GaudiTuples.h.

template<class PBASE>
typedef GaudiAlg::TupleMapID GaudiTuples< PBASE >::TupleMapID

the actual type of (Numeric ID) -> (tuple) mappping

Definition at line 50 of file GaudiTuples.h.

template<class PBASE>
typedef GaudiAlg::TupleMapTitle GaudiTuples< PBASE >::TupleMapTitle

the actual type of (title) -> (tuple) mappping

Definition at line 48 of file GaudiTuples.h.

template<class PBASE>
typedef GaudiAlg::TupleMapTitle GaudiTuples< PBASE >::TupleMapTitle

the actual type of (title) -> (tuple) mappping

Definition at line 48 of file GaudiTuples.h.

Constructor & Destructor Documentation

template<class PBASE>
GaudiTuples< PBASE >::GaudiTuples ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Algorithm constructor.

template<class PBASE>
GaudiTuples< PBASE >::GaudiTuples ( const std::string &  type,
const std::string &  name,
const IInterface parent 
)

Tool constructor.

template<class PBASE>
GaudiTuples< PBASE >::~GaudiTuples ( )
overridedefault

Destructor.

template<class PBASE>
GaudiTuples< PBASE >::GaudiTuples ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Algorithm constructor.

template<class PBASE>
GaudiTuples< PBASE >::GaudiTuples ( const std::string &  type,
const std::string &  name,
const IInterface parent 
)

Tool constructor.

template<class PBASE>
GaudiTuples< PBASE >::~GaudiTuples ( )
overridedefault

Destructor.

Member Function Documentation

template<class PBASE >
Tuples::TupleObj * GaudiTuples< PBASE >::createEvtCol ( const std::string &  name,
NTuple::Tuple tuple,
const CLID clid 
) const
protectedvirtual

create TupleObj for event tag collection

Attention
The method should never used directly by users
Parameters
namename/title
tuplethe underlying ntuple implementation
clidunique classID for ntuple
Returns
pointer to newly created TupelObj

Definition at line 357 of file GaudiTuples.icpp.

360 {
362  ( this , "EvtCol '" + name + "'" , tuple , clid , Tuples::EVTCOL ) ;
363 }
TupleObj * 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:242
template<class PBASE>
virtual Tuples::TupleObj* GaudiTuples< PBASE >::createEvtCol ( const std::string &  name,
NTuple::Tuple tuple,
const CLID clid 
) const
protectedvirtual

create TupleObj for event tag collection

Attention
The method should never used directly by users
Parameters
namename/title
tuplethe underlying ntuple implementation
clidunique classID for ntuple
Returns
pointer to newly created TupelObj
template<class PBASE>
virtual Tuples::TupleObj* GaudiTuples< PBASE >::createNTuple ( const std::string &  name,
NTuple::Tuple tuple,
const CLID clid 
) const
protectedvirtual

create TupleObj

Attention
The method should never used directly by users
Parameters
namename/title
tuplethe underlying ntuple implementation
clidunique classID for ntuple
Returns
pointer to newly created TupleObj
template<class PBASE >
Tuples::TupleObj * GaudiTuples< PBASE >::createNTuple ( const std::string &  name,
NTuple::Tuple tuple,
const CLID clid 
) const
protectedvirtual

create TupleObj

Attention
The method should never used directly by users
Parameters
namename/title
tuplethe underlying ntuple implementation
clidunique classID for ntuple
Returns
pointer to newly created TupleObj

Definition at line 343 of file GaudiTuples.icpp.

346 {
348  ( this , "Tuple '" + name + "'" , tuple , clid , Tuples::NTUPLE ) ;
349 }
TupleObj * 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:242
template<class PBASE>
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
titleUnique title for Event Tag Collection
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The Event Tag Collection object
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
titleUnique title for Event Tag Collection
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The Event Tag Collection object

Definition at line 182 of file GaudiTuples.icpp.

184 {
185  // look up in the table
186  Tuples::TupleObj* tuple = m_evtColMapTitle[ title ] ;
187  if ( tuple ) { return Tuple( tuple ) ; } // RETURN
188  // Create the tuple ID
189  TupleID ID;
190  if ( this->useNumericAutoIDs() || title.empty() )
191  {
192  if ( ! this->useNumericAutoIDs() )
193  {
194  this -> Warning( "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for evtCol ID",
196  }
197  // proposed the tuple ID
198  ID = TupleID ( m_evtColMapID.size() + 1 + evtColOffSet() ) ;
199  // adjust the proposed ID
200  while ( nTupleExists(ID) || evtColExists(ID) )
201  { ID = TupleID ( ID.numeric() + 1 ) ; }
202  }
203  else
204  {
205  // use the title to create a unique literal ID
206  ID = TupleID( this->convertTitleToID(title) );
207  // Just in case ...
208  while ( nTupleExists(ID) || evtColExists(ID) )
209  { ID = TupleID ( ID.idAsString()+"_" ) ; }
210  }
211  // return
212  return evtCol( ID , title , clid ) ;
213 }
size_type size() const
Definition: Map.h:182
bool nTupleExists(const TupleID &ID) const
check the existence AND validity of the N-Tuple with the given ID
TupleMapTitle m_evtColMapTitle
the actual storage of event collections by title
Definition: GaudiTuples.h:443
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:44
Tuple evtCol(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an Event Tag Collection object (book on-demand) with unique identifier.
TupleMapID m_evtColMapID
the actual storage of event collections by ID
Definition: GaudiTuples.h:445
GaudiAlg::TupleID TupleID
the actual type of N-tuple ID
Definition: GaudiTuples.h:46
A simple wrapper class over standard Gaudi NTuple::Tuple facility.
Definition: TupleObj.h:190
bool evtColExists(const TupleID &ID) const
check the existence AND validity of the Event Tag Collection with the given ID
TupleID::NumericID evtColOffSet() const
get the value for Event Tag Collection offset (property "EvtColsOffSet")
Definition: GaudiTuples.h:232
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
IDThe forced Event Tag Collection ID
titleUnique title for Event Tag Collection
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The Event Tag Collection object

Definition at line 281 of file GaudiTuples.icpp.

284 {
285  // Check ID
286  if ( ID.undefined() )
287  { this->Error("Undefined NTuple ID : Title='"+title1+"'"); return Tuple(0); }
288 
289  // look up in the table
290  Tuples::TupleObj* tuple = m_evtColMapID[ID] ;
291  if ( tuple ) { return Tuple( tuple ) ; } // RETURN
292 
293  // convert ID to the string
294  const std::string tID = ID.idAsString() ;
295 
296  // adjust the NTuple title
297  const std::string title = title1.empty() ? ( "EvtCol #" + tID ) : title1 ;
298 
299  // book new ntuple
300  if( produceEvtCols() )
301  {
302  // book NTuple
303  NTuple::Tuple* tup = nullptr;
304  if ( ID.numeric() )
305  {
306  tup = this->evtColSvc()->book ( evtColPath() , ID.numericID() , clid , title ) ;
307  }
308  else if ( ID.literal() )
309  {
310  tup = this->evtColSvc()->book ( evtColPath() , ID.literalID() , clid , title ) ;
311  }
312  else { this->Error( "Undefined NTuple ID" ); }
313 
314  // assertion
315  this->Assert( tup , "Could not book the EvtCol='" + title + "'" ) ;
316  // some printout
317  if( tup -> registry() && this->msgLevel(MSG::DEBUG) )
318  { this->debug() << "Booked EvtCol '" << title << "' ID=" << tID
319  << "' Path='" << evtColPath() << "' TS='"
320  << tup -> registry() -> identifier() << "'" << endmsg ; }
321 
322  tuple = createEvtCol ( title , tup , clid ) ;
323  }
324  else
325  {
326  tuple = createEvtCol ( title , (NTuple::Tuple*) 0 , clid ) ;
327  }
328  // increment the reference
329  tuple -> addRef();
330  //
331  m_evtColMapID [ ID ] = tuple ;
332  //
333  tuple -> addRef();
334  m_evtColMapTitle[ title ] = tuple ;
335  // return
336  return Tuple( tuple ) ;
337 }
virtual Tuples::TupleObj * createEvtCol(const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
create TupleObj for event tag collection
TupleMapTitle m_evtColMapTitle
the actual storage of event collections by title
Definition: GaudiTuples.h:443
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:44
TupleMapID m_evtColMapID
the actual storage of event collections by ID
Definition: GaudiTuples.h:445
A simple wrapper class over standard Gaudi NTuple::Tuple facility.
Definition: TupleObj.h:190
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
std::string evtColPath() const
get the constructed Event Tag Collection path
bool produceEvtCols() const
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition: GaudiTuples.h:222
template<class PBASE>
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
IDThe forced Event Tag Collection ID
titleUnique title for Event Tag Collection
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The Event Tag Collection object
template<class PBASE>
const std::string& GaudiTuples< PBASE >::evtColDir ( ) const
inline

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

Definition at line 230 of file GaudiTuples.h.

230 { return m_evtColDir ; }
std::string m_evtColDir
local tuple directory
Definition: GaudiTuples.h:428
template<class PBASE>
const std::string& GaudiTuples< PBASE >::evtColDir ( ) const
inline

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

Definition at line 230 of file GaudiTuples.h.

230 { return m_evtColDir ; }
std::string m_evtColDir
local tuple directory
Definition: GaudiTuples.h:428
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

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

425 {
426  return m_evtColMapID.end() != m_evtColMapID.find ( ID ) ;
427 }
TupleMapID m_evtColMapID
the actual storage of event collections by ID
Definition: GaudiTuples.h:445
iterator end()
Definition: Map.h:132
iterator find(const key_type &key)
Definition: Map.h:149
template<class PBASE>
const std::string& GaudiTuples< PBASE >::evtColLUN ( ) const
inline

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

Definition at line 226 of file GaudiTuples.h.

226 { return m_evtColLUN ; }
std::string m_evtColLUN
name of Logical Unit for tuple directory
Definition: GaudiTuples.h:424
template<class PBASE>
const std::string& GaudiTuples< PBASE >::evtColLUN ( ) const
inline

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

Definition at line 226 of file GaudiTuples.h.

226 { return m_evtColLUN ; }
std::string m_evtColLUN
name of Logical Unit for tuple directory
Definition: GaudiTuples.h:424
template<class PBASE>
const TupleMapID& GaudiTuples< PBASE >::evtColMapID ( ) const
inlineprotected

access to the all evet tag collections by numeric ID

Definition at line 267 of file GaudiTuples.h.

267 { return m_evtColMapID ; }
TupleMapID m_evtColMapID
the actual storage of event collections by ID
Definition: GaudiTuples.h:445
template<class PBASE>
const TupleMapID& GaudiTuples< PBASE >::evtColMapID ( ) const
inlineprotected

access to the all evet tag collections by numeric ID

Definition at line 267 of file GaudiTuples.h.

267 { return m_evtColMapID ; }
TupleMapID m_evtColMapID
the actual storage of event collections by ID
Definition: GaudiTuples.h:445
template<class PBASE>
const TupleMapTitle& GaudiTuples< PBASE >::evtColMapTitle ( ) const
inlineprotected

access to the all evet tag collections by title

Definition at line 263 of file GaudiTuples.h.

263 { return m_evtColMapTitle ; }
TupleMapTitle m_evtColMapTitle
the actual storage of event collections by title
Definition: GaudiTuples.h:443
template<class PBASE>
const TupleMapTitle& GaudiTuples< PBASE >::evtColMapTitle ( ) const
inlineprotected

access to the all evet tag collections by title

Definition at line 263 of file GaudiTuples.h.

263 { return m_evtColMapTitle ; }
TupleMapTitle m_evtColMapTitle
the actual storage of event collections by title
Definition: GaudiTuples.h:443
template<class PBASE>
TupleID::NumericID GaudiTuples< PBASE >::evtColOffSet ( ) const
inline

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

Definition at line 232 of file GaudiTuples.h.

232 { return m_evtColOffSet ; }
TupleID::NumericID m_evtColOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:430
template<class PBASE>
TupleID::NumericID GaudiTuples< PBASE >::evtColOffSet ( ) const
inline

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

Definition at line 232 of file GaudiTuples.h.

232 { return m_evtColOffSet ; }
TupleID::NumericID m_evtColOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:430
template<class PBASE >
std::string GaudiTuples< PBASE >::evtColPath ( ) const

get the constructed Event Tag Collection path

Definition at line 461 of file GaudiTuples.icpp.

462 {
463  std::string path = evtColLUN() + "/" + evtColTopDir() + evtColDir();
464  return ( splitEvtColDir() ? dirHbookName( path ) : path );
465 }
bool splitEvtColDir() const
get the flag for Event Tag Collection path split (property "EvtColsSplitDir")
Definition: GaudiTuples.h:224
const std::string & evtColDir() const
get the Event Tag Collection directory (property "EvtColsDir")
Definition: GaudiTuples.h:230
list path
Definition: __init__.py:15
const std::string & evtColTopDir() const
get the top-level Event Tag Collection directory (property "EvtColsTopDir")
Definition: GaudiTuples.h:228
const std::string & evtColLUN() const
get the logical unit for Event Tag Collections (property "EvtColsLUN")
Definition: GaudiTuples.h:226
template<class PBASE>
std::string GaudiTuples< PBASE >::evtColPath ( ) const

get the constructed Event Tag Collection path

template<class PBASE>
bool GaudiTuples< PBASE >::evtColsPrint ( ) const
inline

print event collections at finalization

Definition at line 238 of file GaudiTuples.h.

238 { return m_evtColsPrint ; }
bool m_evtColsPrint
print event collections at finalization
Definition: GaudiTuples.h:435
template<class PBASE>
bool GaudiTuples< PBASE >::evtColsPrint ( ) const
inline

print event collections at finalization

Definition at line 238 of file GaudiTuples.h.

238 { return m_evtColsPrint ; }
bool m_evtColsPrint
print event collections at finalization
Definition: GaudiTuples.h:435
template<class PBASE>
const std::string& GaudiTuples< PBASE >::evtColTopDir ( ) const
inline

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

Definition at line 228 of file GaudiTuples.h.

228 { return m_evtColTopDir ; }
std::string m_evtColTopDir
top level tuple directory
Definition: GaudiTuples.h:426
template<class PBASE>
const std::string& GaudiTuples< PBASE >::evtColTopDir ( ) const
inline

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

Definition at line 228 of file GaudiTuples.h.

228 { return m_evtColTopDir ; }
std::string m_evtColTopDir
top level tuple directory
Definition: GaudiTuples.h:426
template<class PBASE >
StatusCode GaudiTuples< PBASE >::finalize ( )
overrideprotected

standard finalization method

Returns
status code

Definition at line 104 of file GaudiTuples.icpp.

105 {
106  if ( !( nTupleMapTitle () . empty () &&
107  nTupleMapID () . empty () &&
108  evtColMapTitle () . empty () &&
109  evtColMapID () . empty ()
110  ) )
111  {
112  const int nNtuples = nTupleMapID () . size () ;
113  const int nEvtCols = evtColMapID () . size ();
114  this->always()
115  << "Booked " << nNtuples << " N-Tuples and " << nEvtCols
116  << " Event Tag Collections" << endmsg ;
117  }
118 
119  if ( produceNTuples () && tuplesPrint () ) { printTuples () ; }
120  if ( produceEvtCols () && evtColsPrint () ) { printEvtCols () ; }
121 
122  // release ntuples and clear the container
123  releaseAndClear(m_nTupleMapTitle);
124 
125  // release ntuples and clear the container
126  releaseAndClear(m_nTupleMapID);
127 
128  // release ntuples and clear the container
129  releaseAndClear(m_evtColMapTitle);
130 
131  // release ntuples and clear the container
132  releaseAndClear(m_evtColMapID);
133 
134  // finalize base class
135  return PBASE::finalize();
136 }
TupleMapTitle m_nTupleMapTitle
the actual storage of ntuples by title
Definition: GaudiTuples.h:438
TupleMapTitle m_evtColMapTitle
the actual storage of event collections by title
Definition: GaudiTuples.h:443
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool evtColsPrint() const
print event collections at finalization
Definition: GaudiTuples.h:238
TupleMapID m_evtColMapID
the actual storage of event collections by ID
Definition: GaudiTuples.h:445
const TupleMapTitle & nTupleMapTitle() const
access to the all ntuples by title
Definition: GaudiTuples.h:261
const TupleMapTitle & evtColMapTitle() const
access to the all evet tag collections by title
Definition: GaudiTuples.h:263
long printTuples() const
perform the actual printout of N-tuples
long printEvtCols() const
perform the actual printout of Event Tag Collections
bool tuplesPrint() const
print tuples at finalization
Definition: GaudiTuples.h:236
const TupleMapID & nTupleMapID() const
access to the all ntuples by numeric ID
Definition: GaudiTuples.h:265
TupleMapID m_nTupleMapID
the actual storage of ntuples by ID
Definition: GaudiTuples.h:440
bool produceEvtCols() const
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition: GaudiTuples.h:222
bool produceNTuples() const
get the flag for N-Tuple production (property "NTupleProduce")
Definition: GaudiTuples.h:208
const TupleMapID & evtColMapID() const
access to the all evet tag collections by numeric ID
Definition: GaudiTuples.h:267
template<class PBASE>
StatusCode GaudiTuples< PBASE >::finalize ( )
overrideprotected

standard finalization method

Returns
status code
template<class PBASE>
void GaudiTuples< PBASE >::initGaudiTuplesConstructor ( )
inlineprivate

Constructor initialization and job options.

Definition at line 330 of file GaudiTuples.h.

331  {
332  m_produceNTuples = true ; // Switch ON/OFF ntuple production
333  m_splitNTupleDir = false ; // for HBOOK it is better to use 'true'
334  m_nTupleLUN = "FILE1" ; // logical unit for ntuples
335  m_nTupleTopDir = "" ; // top level ntuple directory
336  m_nTupleDir = boost::algorithm::replace_all_copy( this->name(), ":","_" ); // ntuple directory
337  m_nTupleOffSet = 0 ; // offset for ntuples
338  //
339  m_produceEvtCols = false ; // Switch ON/OFF ntupel production
340  m_splitEvtColDir = false ; // for HBOOK it is better to use 'true'
341  m_evtColLUN = "EVTCOL" ; // logical unit for ntuples
342  m_evtColTopDir = "" ; // top level ntuple directory
343  m_evtColDir = boost::algorithm::replace_all_copy( this->name(), ":", "_"); // ntuple directory
344  m_evtColOffSet = 0 ; // offset for ntuples
345  //
346  m_tuplesPrint = true ; // print tuples at end of job
347  m_evtColsPrint = false ; // print event collections at end of job
348  //
349  this -> declareProperty
350  ( "NTupleProduce" , m_produceNTuples ,
351  "General switch to enable/disable N-tuples" ) ;
352  this -> declareProperty
353  ( "NTuplePrint" , m_tuplesPrint ,
354  "Print N-tuple statistics" )
355  -> declareUpdateHandler ( &GaudiTuples<PBASE>::printNTupleHandler , this ) ;
356  this -> declareProperty
357  ( "NTupleSplitDir" , m_splitNTupleDir ,
358  "Split long directory names into short pieces (suitable for HBOOK)" ) ;
359  this -> declareProperty
360  ( "NTupleOffSet" , m_nTupleOffSet ,
361  "Offset for numerical N-tuple ID" ) ;
362  this -> declareProperty
363  ( "NTupleLUN" , m_nTupleLUN ,
364  "Logical File Unit for N-tuples" ) ;
365  this -> declareProperty
366  ( "NTupleTopDir" , m_nTupleTopDir ,
367  "Top-level directory for N-Tuples") ;
368  this -> declareProperty
369  ( "NTupleDir" , m_nTupleDir ,
370  "Subdirectory for N-Tuples" ) ;
371  // ========================================================================
372  this -> declareProperty
373  ( "EvtColsProduce" , m_produceEvtCols ,
374  "General switch to enable/disable Event Tag Collections" ) ;
375  this -> declareProperty
376  ( "EvtColsPrint" , m_evtColsPrint ,
377  "Print statistics for Event Tag Collections " )
378  -> declareUpdateHandler ( &GaudiTuples<PBASE>::printEvtColHandler , this ) ;
379  this -> declareProperty
380  ( "EvtColSplitDir" , m_splitEvtColDir ,
381  "Split long directory names into short pieces" ) ;
382  this -> declareProperty
383  ( "EvtColOffSet" , m_evtColOffSet ,
384  "Offset for numerical N-tuple ID" ) ;
385  this -> declareProperty
386  ( "EvtColLUN" , m_evtColLUN ,
387  "Logical File Unit for Event Tag Collections" ) ;
388  this -> declareProperty
389  ( "EvtColTopDir" , m_evtColTopDir ,
390  "Top-level directory for Event Tag Collections" ) ;
391  this -> declareProperty
392  ( "EvtColDir" , m_evtColDir ,
393  "Subdirectory for Event Tag Collections" ) ;
394  // ========================================================================
395  }
std::string m_nTupleTopDir
top level tuple directory
Definition: GaudiTuples.h:413
std::string m_nTupleLUN
name of logical unit for tuple directory
Definition: GaudiTuples.h:411
Templated base class providing common 'ntupling' methods.
Definition: GaudiTuples.h:37
std::string m_evtColDir
local tuple directory
Definition: GaudiTuples.h:428
TupleID::NumericID m_nTupleOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:417
TupleID::NumericID m_evtColOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:430
std::string m_evtColLUN
name of Logical Unit for tuple directory
Definition: GaudiTuples.h:424
bool m_splitEvtColDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:422
std::string m_evtColTopDir
top level tuple directory
Definition: GaudiTuples.h:426
bool m_splitNTupleDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:409
bool m_tuplesPrint
print tuples at finalization?
Definition: GaudiTuples.h:433
bool m_produceEvtCols
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:420
std::string m_nTupleDir
local tuple directory
Definition: GaudiTuples.h:415
bool m_produceNTuples
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:407
bool m_evtColsPrint
print event collections at finalization
Definition: GaudiTuples.h:435
template<class PBASE>
void GaudiTuples< PBASE >::initGaudiTuplesConstructor ( )
inlineprivate

Constructor initialization and job options.

Definition at line 330 of file GaudiTuples.h.

331  {
332  m_produceNTuples = true ; // Switch ON/OFF ntuple production
333  m_splitNTupleDir = false ; // for HBOOK it is better to use 'true'
334  m_nTupleLUN = "FILE1" ; // logical unit for ntuples
335  m_nTupleTopDir = "" ; // top level ntuple directory
336  m_nTupleDir = boost::algorithm::replace_all_copy( this->name(), ":","_" ); // ntuple directory
337  m_nTupleOffSet = 0 ; // offset for ntuples
338  //
339  m_produceEvtCols = false ; // Switch ON/OFF ntupel production
340  m_splitEvtColDir = false ; // for HBOOK it is better to use 'true'
341  m_evtColLUN = "EVTCOL" ; // logical unit for ntuples
342  m_evtColTopDir = "" ; // top level ntuple directory
343  m_evtColDir = boost::algorithm::replace_all_copy( this->name(), ":", "_"); // ntuple directory
344  m_evtColOffSet = 0 ; // offset for ntuples
345  //
346  m_tuplesPrint = true ; // print tuples at end of job
347  m_evtColsPrint = false ; // print event collections at end of job
348  //
349  this -> declareProperty
350  ( "NTupleProduce" , m_produceNTuples ,
351  "General switch to enable/disable N-tuples" ) ;
352  this -> declareProperty
353  ( "NTuplePrint" , m_tuplesPrint ,
354  "Print N-tuple statistics" )
355  -> declareUpdateHandler ( &GaudiTuples<PBASE>::printNTupleHandler , this ) ;
356  this -> declareProperty
357  ( "NTupleSplitDir" , m_splitNTupleDir ,
358  "Split long directory names into short pieces (suitable for HBOOK)" ) ;
359  this -> declareProperty
360  ( "NTupleOffSet" , m_nTupleOffSet ,
361  "Offset for numerical N-tuple ID" ) ;
362  this -> declareProperty
363  ( "NTupleLUN" , m_nTupleLUN ,
364  "Logical File Unit for N-tuples" ) ;
365  this -> declareProperty
366  ( "NTupleTopDir" , m_nTupleTopDir ,
367  "Top-level directory for N-Tuples") ;
368  this -> declareProperty
369  ( "NTupleDir" , m_nTupleDir ,
370  "Subdirectory for N-Tuples" ) ;
371  // ========================================================================
372  this -> declareProperty
373  ( "EvtColsProduce" , m_produceEvtCols ,
374  "General switch to enable/disable Event Tag Collections" ) ;
375  this -> declareProperty
376  ( "EvtColsPrint" , m_evtColsPrint ,
377  "Print statistics for Event Tag Collections " )
378  -> declareUpdateHandler ( &GaudiTuples<PBASE>::printEvtColHandler , this ) ;
379  this -> declareProperty
380  ( "EvtColSplitDir" , m_splitEvtColDir ,
381  "Split long directory names into short pieces" ) ;
382  this -> declareProperty
383  ( "EvtColOffSet" , m_evtColOffSet ,
384  "Offset for numerical N-tuple ID" ) ;
385  this -> declareProperty
386  ( "EvtColLUN" , m_evtColLUN ,
387  "Logical File Unit for Event Tag Collections" ) ;
388  this -> declareProperty
389  ( "EvtColTopDir" , m_evtColTopDir ,
390  "Top-level directory for Event Tag Collections" ) ;
391  this -> declareProperty
392  ( "EvtColDir" , m_evtColDir ,
393  "Subdirectory for Event Tag Collections" ) ;
394  // ========================================================================
395  }
std::string m_nTupleTopDir
top level tuple directory
Definition: GaudiTuples.h:413
std::string m_nTupleLUN
name of logical unit for tuple directory
Definition: GaudiTuples.h:411
Templated base class providing common 'ntupling' methods.
Definition: GaudiTuples.h:37
std::string m_evtColDir
local tuple directory
Definition: GaudiTuples.h:428
TupleID::NumericID m_nTupleOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:417
TupleID::NumericID m_evtColOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:430
std::string m_evtColLUN
name of Logical Unit for tuple directory
Definition: GaudiTuples.h:424
bool m_splitEvtColDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:422
std::string m_evtColTopDir
top level tuple directory
Definition: GaudiTuples.h:426
bool m_splitNTupleDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:409
bool m_tuplesPrint
print tuples at finalization?
Definition: GaudiTuples.h:433
bool m_produceEvtCols
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:420
std::string m_nTupleDir
local tuple directory
Definition: GaudiTuples.h:415
bool m_produceNTuples
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:407
bool m_evtColsPrint
print event collections at finalization
Definition: GaudiTuples.h:435
template<class PBASE >
StatusCode GaudiTuples< PBASE >::initialize ( )
overrideprotected

standard initialization method

Returns
status code

Definition at line 61 of file GaudiTuples.icpp.

62 {
63  // initialize base class
65  if ( sc.isFailure() ) return sc;
66 
67  if ( produceNTuples() )
68  {
69  // check the existance of service
70  if ( this->ntupleSvc() == 0 )
71  { return this->Error( "INTupleSvc* points to NULL!" ); }
72  // Print ntuple path
73  this->Print( "The N-Tuple path is set to be '" + nTuplePath() + "'",
74  StatusCode(StatusCode::SUCCESS, true) , MSG::DEBUG).ignore();
75  }
76  else
77  { this->debug() << "Production of N-Tuples is switched OFF" << endmsg; }
78 
79  if ( produceEvtCols() )
80  {
81  // check the existance of service
82  if ( 0 == this->evtColSvc() )
83  { return this->Error( "INTupleSvc* points to NULL!" ); }
84  // Print EvtCol path
85  this->Print( "The EventCol path is set to be '" + evtColPath() + "'",
86  StatusCode(StatusCode::SUCCESS, true) , MSG::DEBUG ).ignore();
87  }
88  else
89  { this->debug() << "Production of Event Collections is switched OFF" << endmsg; }
90 
91  return sc;
92 }
def initialize()
Definition: AnalysisTest.py:12
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::string evtColPath() const
get the constructed Event Tag Collection path
std::string nTuplePath() const
get the constructed N-Tuple path
bool produceEvtCols() const
get the flag for Event Tag Collection production (property "EvtColsProduce")
Definition: GaudiTuples.h:222
bool produceNTuples() const
get the flag for N-Tuple production (property "NTupleProduce")
Definition: GaudiTuples.h:208
template<class PBASE>
StatusCode GaudiTuples< PBASE >::initialize ( )
overrideprotected

standard initialization method

Returns
status code
template<class PBASE>
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
titleUnique title for N-Tuple
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The ntuple object
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
titleUnique title for N-Tuple
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The ntuple object

Definition at line 143 of file GaudiTuples.icpp.

145 {
146  // look up in the table
147  auto* tuple = m_nTupleMapTitle[ title ] ;
148  if ( tuple ) { return Tuple( tuple ) ; } // RETURN
149  // Create the tuple ID
150  TupleID ID;
151  if ( this->useNumericAutoIDs() || title.empty() )
152  {
153  if ( ! this->useNumericAutoIDs() )
154  {
155  this -> Warning( "Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for nTuple ID",
157  }
158  // propose the tuple ID
159  ID = TupleID ( m_nTupleMapID.size() + 1 + nTupleOffSet() );
160  // adjust the proposed ID
161  while ( nTupleExists(ID) || evtColExists(ID) )
162  { ID = TupleID ( ID.numeric() + 1 ) ; }
163  }
164  else
165  {
166  // use the title to create a unique literal ID
167  ID = TupleID( this->convertTitleToID(title) );
168  // Just in case ...
169  while ( nTupleExists(ID) || evtColExists(ID) )
170  { ID = TupleID(ID.idAsString()+"_"); }
171  }
172  // return
173  return nTuple( ID , title , clid ) ;
174 }
TupleMapTitle m_nTupleMapTitle
the actual storage of ntuples by title
Definition: GaudiTuples.h:438
size_type size() const
Definition: Map.h:182
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
Definition: GaudiTuples.h:44
GaudiAlg::TupleID TupleID
the actual type of N-tuple ID
Definition: GaudiTuples.h:46
TupleID::NumericID nTupleOffSet() const
get the value for N-Tuple offset (property "NTupleOffSet")
Definition: GaudiTuples.h:218
Tuple nTuple(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an N-Tuple object (book on-demand) with unique identifier.
bool evtColExists(const TupleID &ID) const
check the existence AND validity of the Event Tag Collection with the given ID
TupleMapID m_nTupleMapID
the actual storage of ntuples by ID
Definition: GaudiTuples.h:440
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
IDThe forced N-Tuple ID
titleUnique title for N-Tuple
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The ntuple object

Definition at line 221 of file GaudiTuples.icpp.

224 {
225  // Check ID
226  if ( ID.undefined() )
227  { this->Error("Undefined NTuple ID : Title='"+title1+"'"); return Tuple(0); }
228 
229  // look up in the table
230  Tuples::TupleObj * tuple = m_nTupleMapID[ ID ] ;
231  if( tuple ) { return Tuple( tuple ) ; } // RETURN
232 
233  // convert ID to the string
234  const std::string tID = ID.idAsString() ;
235 
236  // adjust the NTuple title
237  const std::string title = title1.empty() ? ( "NTuple #" + tID ) : title1 ;
238 
239  // book new ntuple
240  if( produceNTuples() )
241  {
242  // book NTupel
243  NTuple::Tuple * tup = nullptr;
244  if ( ID.numeric() )
245  {
246  tup = this->ntupleSvc() -> book ( nTuplePath() , ID.numericID() , clid , title );
247  }
248  else if ( ID.literal() )
249  {
250  tup = this->ntupleSvc() -> book ( nTuplePath() , ID.literalID() , clid , title );
251  }
252  else { this->Error( "Undefined NTuple ID" ); }
253 
254  // assertion
255  this->Assert( tup , "Could not book the N-Tuple='" + title + "'" ) ;
256  // some printout
257  if( tup -> registry() && this->msgLevel(MSG::DEBUG) )
258  { this->debug() << "Booked NTuple '" << title << "' ID=" << tID
259  << "' Path='" << nTuplePath() << "' TS='"
260  << tup -> registry() -> identifier() << "'" << endmsg; }
261 
262  tuple = createNTuple ( title , tup , clid ) ;
263  }
264  else
265  {
266  tuple = createNTuple ( title , (NTuple::Tuple*) 0 , clid ) ;
267  }
268  // increment the reference
269  tuple -> addRef();
270  //
271  m_nTupleMapID [ ID ] = tuple ;
272  //
273  tuple -> addRef();
274  m_nTupleMapTitle[ title ] = tuple ;
275  // return
276  return Tuple( tuple ) ;
277 }
TupleMapTitle m_nTupleMapTitle
the actual storage of ntuples by title
Definition: GaudiTuples.h:438
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
Tuples::Tuple Tuple
the actual type of the tuple
Definition: GaudiTuples.h:44
A simple wrapper class over standard Gaudi NTuple::Tuple facility.
Definition: TupleObj.h:190
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
virtual Tuples::TupleObj * createNTuple(const std::string &name, NTuple::Tuple *tuple, const CLID &clid) const
create TupleObj
TupleMapID m_nTupleMapID
the actual storage of ntuples by ID
Definition: GaudiTuples.h:440
std::string nTuplePath() const
get the constructed N-Tuple path
bool produceNTuples() const
get the flag for N-Tuple production (property "NTupleProduce")
Definition: GaudiTuples.h:208
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
Definition: HistoDef.cpp:127
template<class PBASE>
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
IDThe forced N-Tuple ID
titleUnique title for N-Tuple
clidN-Tuple class identifier (row or column wise)
Returns
ntuple The ntuple object
template<class PBASE>
const std::string& GaudiTuples< PBASE >::nTupleDir ( ) const
inline

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

Definition at line 216 of file GaudiTuples.h.

216 { return m_nTupleDir ; }
std::string m_nTupleDir
local tuple directory
Definition: GaudiTuples.h:415
template<class PBASE>
const std::string& GaudiTuples< PBASE >::nTupleDir ( ) const
inline

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

Definition at line 216 of file GaudiTuples.h.

216 { return m_nTupleDir ; }
std::string m_nTupleDir
local tuple directory
Definition: GaudiTuples.h:415
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 416 of file GaudiTuples.icpp.

417 {
418  return m_nTupleMapID.end() != m_nTupleMapID.find ( ID ) ;
419 }
iterator end()
Definition: Map.h:132
iterator find(const key_type &key)
Definition: Map.h:149
TupleMapID m_nTupleMapID
the actual storage of ntuples by ID
Definition: GaudiTuples.h:440
template<class PBASE>
bool GaudiTuples< PBASE >::nTupleExists ( const TupleID ID) const

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

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

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

Definition at line 212 of file GaudiTuples.h.

212 { return m_nTupleLUN ; }
std::string m_nTupleLUN
name of logical unit for tuple directory
Definition: GaudiTuples.h:411
template<class PBASE>
const std::string& GaudiTuples< PBASE >::nTupleLUN ( ) const
inline

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

Definition at line 212 of file GaudiTuples.h.

212 { return m_nTupleLUN ; }
std::string m_nTupleLUN
name of logical unit for tuple directory
Definition: GaudiTuples.h:411
template<class PBASE>
const TupleMapID& GaudiTuples< PBASE >::nTupleMapID ( ) const
inlineprotected

access to the all ntuples by numeric ID

Definition at line 265 of file GaudiTuples.h.

265 { return m_nTupleMapID ; }
TupleMapID m_nTupleMapID
the actual storage of ntuples by ID
Definition: GaudiTuples.h:440
template<class PBASE>
const TupleMapID& GaudiTuples< PBASE >::nTupleMapID ( ) const
inlineprotected

access to the all ntuples by numeric ID

Definition at line 265 of file GaudiTuples.h.

265 { return m_nTupleMapID ; }
TupleMapID m_nTupleMapID
the actual storage of ntuples by ID
Definition: GaudiTuples.h:440
template<class PBASE>
const TupleMapTitle& GaudiTuples< PBASE >::nTupleMapTitle ( ) const
inlineprotected

access to the all ntuples by title

Definition at line 261 of file GaudiTuples.h.

261 { return m_nTupleMapTitle ; }
TupleMapTitle m_nTupleMapTitle
the actual storage of ntuples by title
Definition: GaudiTuples.h:438
template<class PBASE>
const TupleMapTitle& GaudiTuples< PBASE >::nTupleMapTitle ( ) const
inlineprotected

access to the all ntuples by title

Definition at line 261 of file GaudiTuples.h.

261 { return m_nTupleMapTitle ; }
TupleMapTitle m_nTupleMapTitle
the actual storage of ntuples by title
Definition: GaudiTuples.h:438
template<class PBASE>
TupleID::NumericID GaudiTuples< PBASE >::nTupleOffSet ( ) const
inline

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

Definition at line 218 of file GaudiTuples.h.

218 { return m_nTupleOffSet ; }
TupleID::NumericID m_nTupleOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:417
template<class PBASE>
TupleID::NumericID GaudiTuples< PBASE >::nTupleOffSet ( ) const
inline

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

Definition at line 218 of file GaudiTuples.h.

218 { return m_nTupleOffSet ; }
TupleID::NumericID m_nTupleOffSet
the offset for ntuple numerical ID
Definition: GaudiTuples.h:417
template<class PBASE >
std::string GaudiTuples< PBASE >::nTuplePath ( ) const

get the constructed N-Tuple path

Definition at line 452 of file GaudiTuples.icpp.

453 {
454  const std::string path = nTupleLUN() + "/" + nTupleTopDir() + nTupleDir();
455  return ( splitNTupleDir() ? dirHbookName( path ) : path ) ;
456 }
const std::string & nTupleLUN() const
get the logical unit for N-Tuples (property "NTupleLUN")
Definition: GaudiTuples.h:212
list path
Definition: __init__.py:15
const std::string & nTupleTopDir() const
get the top-level N-Tuple directory (property "NTupleTopDir")
Definition: GaudiTuples.h:214
const std::string & nTupleDir() const
get the N-Tuple directory (property "NTupleDir")
Definition: GaudiTuples.h:216
bool splitNTupleDir() const
get the flag for N-Tuple path split (property "NTupleSplitDir")
Definition: GaudiTuples.h:210
template<class PBASE>
std::string GaudiTuples< PBASE >::nTuplePath ( ) const

get the constructed N-Tuple path

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

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

Definition at line 214 of file GaudiTuples.h.

214 { return m_nTupleTopDir ; }
std::string m_nTupleTopDir
top level tuple directory
Definition: GaudiTuples.h:413
template<class PBASE>
const std::string& GaudiTuples< PBASE >::nTupleTopDir ( ) const
inline

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

Definition at line 214 of file GaudiTuples.h.

214 { return m_nTupleTopDir ; }
std::string m_nTupleTopDir
top level tuple directory
Definition: GaudiTuples.h:413
template<class PBASE >
void GaudiTuples< PBASE >::printEvtColHandler ( Property )
private

handler for "EvtColsPrint" property

Definition at line 442 of file GaudiTuples.icpp.

443 {
444  // no action if not yet initialized
445  if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
446  if ( this -> evtColsPrint() ) { this -> printEvtCols () ; }
447 }
bool evtColsPrint() const
print event collections at finalization
Definition: GaudiTuples.h:238
long printEvtCols() const
perform the actual printout of Event Tag Collections
template<class PBASE>
void GaudiTuples< PBASE >::printEvtColHandler ( Property )
private

handler for "EvtColsPrint" property

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

393 {
394  if ( evtColMapTitle().empty() && evtColMapID().empty() )
395  { this->always() << "No Event Tag Collections are booked" << endmsg ; }
396  else
397  { this->always() << "List of booked Event Tag Collections in directory "
398  << "\"" << evtColPath() << "\"" << endmsg ; }
399  for ( const auto& entry : ordered( evtColMapID() ) )
400  {
401  if ( !entry.second ) { continue ; }
402  const auto tuple = entry.second->tuple() ;
403  if ( !tuple )
404  { this->error() << " NTuple::Tuple* points to NULL" << endmsg ; continue ; }
405  this->always() << GaudiAlg::PrintTuple::print ( tuple , entry.first )
406  << " Items:"
407  << Gaudi::Utils::toString ( entry.second->items() ) << endmsg ;
408  }
409  //
410  return this->evtColMapID().size() ;
411 }
static std::string print(const INTuple *tuple, const GaudiAlg::TupleID &ID)
Definition: Print.cpp:168
size_type size() const
Definition: Map.h:182
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:400
const TupleMapTitle & evtColMapTitle() const
access to the all evet tag collections by title
Definition: GaudiTuples.h:263
std::string evtColPath() const
get the constructed Event Tag Collection path
const TupleMapID & evtColMapID() const
access to the all evet tag collections by numeric ID
Definition: GaudiTuples.h:267
template<class PBASE>
long GaudiTuples< PBASE >::printEvtCols ( ) const

perform the actual printout of Event Tag Collections

Returns
number of active Event Tag Collections
template<class PBASE>
void GaudiTuples< PBASE >::printNTupleHandler ( Property )
private

handler for "NTuplePrint" property

template<class PBASE >
void GaudiTuples< PBASE >::printNTupleHandler ( Property )
private

handler for "NTuplePrint" property

Definition at line 432 of file GaudiTuples.icpp.

433 {
434  // no action if not yet initialized
435  if ( this -> FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
436  if ( this -> tuplesPrint() ) { this -> printTuples () ; }
437 }
long printTuples() const
perform the actual printout of N-tuples
bool tuplesPrint() const
print tuples at finalization
Definition: GaudiTuples.h:236
template<class PBASE >
long GaudiTuples< PBASE >::printTuples ( ) const

perform the actual printout of N-tuples

Returns
number of active N-Tuples

Definition at line 368 of file GaudiTuples.icpp.

369 {
370 
371  if ( nTupleMapTitle().empty() && nTupleMapID().empty() )
372  { if (this->msgLevel(MSG::DEBUG)) this->debug() << "No N-Tuples are booked" << endmsg ; }
373  else
374  { this->always() << "List of booked N-Tuples in directory "
375  << "\"" << nTuplePath() << "\"" << endmsg ; }
376 
377  for ( const auto& entry : ordered(nTupleMapID()) )
378  {
379  if ( !entry.second ) { continue ; }
380  const NTuple::Tuple* tuple = entry.second->tuple() ;
381  if ( !tuple )
382  { this->error() << " NTuple::Tuple* points to NULL" << endmsg ; continue ; }
383  this->always() << GaudiAlg::PrintTuple::print ( tuple , entry.first ) << endmsg ;
384  }
385  //
386  return this->nTupleMapID().size() ;
387 }
static std::string print(const INTuple *tuple, const GaudiAlg::TupleID &ID)
Definition: Print.cpp:168
size_type size() const
Definition: Map.h:182
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
const TupleMapTitle & nTupleMapTitle() const
access to the all ntuples by title
Definition: GaudiTuples.h:261
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
const TupleMapID & nTupleMapID() const
access to the all ntuples by numeric ID
Definition: GaudiTuples.h:265
std::string nTuplePath() const
get the constructed N-Tuple path
template<class PBASE>
long GaudiTuples< PBASE >::printTuples ( ) const

perform the actual printout of N-tuples

Returns
number of active N-Tuples
template<class PBASE>
bool GaudiTuples< PBASE >::produceEvtCols ( ) const
inline

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

Definition at line 222 of file GaudiTuples.h.

222 { return m_produceEvtCols ; }
bool m_produceEvtCols
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:420
template<class PBASE>
bool GaudiTuples< PBASE >::produceEvtCols ( ) const
inline

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

Definition at line 222 of file GaudiTuples.h.

222 { return m_produceEvtCols ; }
bool m_produceEvtCols
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:420
template<class PBASE>
bool GaudiTuples< PBASE >::produceNTuples ( ) const
inline

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

Definition at line 208 of file GaudiTuples.h.

208 { return m_produceNTuples ; }
bool m_produceNTuples
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:407
template<class PBASE>
bool GaudiTuples< PBASE >::produceNTuples ( ) const
inline

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

Definition at line 208 of file GaudiTuples.h.

208 { return m_produceNTuples ; }
bool m_produceNTuples
flag to switch ON/OFF the ntuple filling and booking
Definition: GaudiTuples.h:407
template<class PBASE>
bool GaudiTuples< PBASE >::splitEvtColDir ( ) const
inline

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

Definition at line 224 of file GaudiTuples.h.

224 { return m_splitEvtColDir ; }
bool m_splitEvtColDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:422
template<class PBASE>
bool GaudiTuples< PBASE >::splitEvtColDir ( ) const
inline

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

Definition at line 224 of file GaudiTuples.h.

224 { return m_splitEvtColDir ; }
bool m_splitEvtColDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:422
template<class PBASE>
bool GaudiTuples< PBASE >::splitNTupleDir ( ) const
inline

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

Definition at line 210 of file GaudiTuples.h.

210 { return m_splitNTupleDir ; }
bool m_splitNTupleDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:409
template<class PBASE>
bool GaudiTuples< PBASE >::splitNTupleDir ( ) const
inline

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

Definition at line 210 of file GaudiTuples.h.

210 { return m_splitNTupleDir ; }
bool m_splitNTupleDir
flag to indicate splitting of tuple directories (useful for HBOOK)
Definition: GaudiTuples.h:409
template<class PBASE>
bool GaudiTuples< PBASE >::tuplesPrint ( ) const
inline

print tuples at finalization

Definition at line 236 of file GaudiTuples.h.

236 { return m_tuplesPrint ; }
bool m_tuplesPrint
print tuples at finalization?
Definition: GaudiTuples.h:433
template<class PBASE>
bool GaudiTuples< PBASE >::tuplesPrint ( ) const
inline

print tuples at finalization

Definition at line 236 of file GaudiTuples.h.

236 { return m_tuplesPrint ; }
bool m_tuplesPrint
print tuples at finalization?
Definition: GaudiTuples.h:433

Member Data Documentation

template<class PBASE>
std::string GaudiTuples< PBASE >::m_evtColDir
private

local tuple directory

Definition at line 428 of file GaudiTuples.h.

template<class PBASE>
std::string GaudiTuples< PBASE >::m_evtColLUN
private

name of Logical Unit for tuple directory

Definition at line 424 of file GaudiTuples.h.

template<class PBASE>
TupleMapID GaudiTuples< PBASE >::m_evtColMapID
mutableprivate

the actual storage of event collections by ID

Definition at line 445 of file GaudiTuples.h.

template<class PBASE>
TupleMapTitle GaudiTuples< PBASE >::m_evtColMapTitle
mutableprivate

the actual storage of event collections by title

Definition at line 443 of file GaudiTuples.h.

template<class PBASE>
TupleID::NumericID GaudiTuples< PBASE >::m_evtColOffSet
private

the offset for ntuple numerical ID

Definition at line 430 of file GaudiTuples.h.

template<class PBASE>
bool GaudiTuples< PBASE >::m_evtColsPrint
private

print event collections at finalization

Definition at line 435 of file GaudiTuples.h.

template<class PBASE>
std::string GaudiTuples< PBASE >::m_evtColTopDir
private

top level tuple directory

Definition at line 426 of file GaudiTuples.h.

template<class PBASE>
std::string GaudiTuples< PBASE >::m_nTupleDir
private

local tuple directory

Definition at line 415 of file GaudiTuples.h.

template<class PBASE>
std::string GaudiTuples< PBASE >::m_nTupleLUN
private

name of logical unit for tuple directory

Definition at line 411 of file GaudiTuples.h.

template<class PBASE>
TupleMapID GaudiTuples< PBASE >::m_nTupleMapID
mutableprivate

the actual storage of ntuples by ID

Definition at line 440 of file GaudiTuples.h.

template<class PBASE>
TupleMapTitle GaudiTuples< PBASE >::m_nTupleMapTitle
mutableprivate

the actual storage of ntuples by title

Definition at line 438 of file GaudiTuples.h.

template<class PBASE>
TupleID::NumericID GaudiTuples< PBASE >::m_nTupleOffSet
private

the offset for ntuple numerical ID

Definition at line 417 of file GaudiTuples.h.

template<class PBASE>
std::string GaudiTuples< PBASE >::m_nTupleTopDir
private

top level tuple directory

Definition at line 413 of file GaudiTuples.h.

template<class PBASE>
bool GaudiTuples< PBASE >::m_produceEvtCols
private

flag to switch ON/OFF the ntuple filling and booking

Definition at line 420 of file GaudiTuples.h.

template<class PBASE>
bool GaudiTuples< PBASE >::m_produceNTuples
private

flag to switch ON/OFF the ntuple filling and booking

Definition at line 407 of file GaudiTuples.h.

template<class PBASE>
bool GaudiTuples< PBASE >::m_splitEvtColDir
private

flag to indicate splitting of tuple directories (useful for HBOOK)

Definition at line 422 of file GaudiTuples.h.

template<class PBASE>
bool GaudiTuples< PBASE >::m_splitNTupleDir
private

flag to indicate splitting of tuple directories (useful for HBOOK)

Definition at line 409 of file GaudiTuples.h.

template<class PBASE>
bool GaudiTuples< PBASE >::m_tuplesPrint
private

print tuples at finalization?

Definition at line 433 of file GaudiTuples.h.


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